-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbsdutils.spec.in
83 lines (68 loc) · 2.2 KB
/
bsdutils.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Historically, commerical Unix systems derived from AT&T System V
# would provide software that originated at the University of
# California Berkeley in the /usr/ucb directory. Some systems used
# /usr/bsd. This package uses the /usr/ucb directory as the bindir as
# that's how older Unix systems did it.
%define _bindir %{_prefix}/ucb
%define _sbindir %{_bindir}
Name: bsdutils
Version: %%VERSION%%
Release: 1%{?dist}
Summary: Userspace commands from FreeBSD
Group: Development/Tools
License: BSD-2-Clause AND BSD-3-Clause
URL: https://github.com/dcantrell/bsdutils
Source0: https://github.com/dcantrell/bsdutils/releases/download/v%{version}/%{name}-%{version}.tar.xz
Source1: https://github.com/dcantrell/bsdutils/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc
Source2: %%GPGKEYRING%%
BuildRequires: meson
BuildRequires: ninja-build
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: flex
BuildRequires: bison
BuildRequires: ncurses-devel
BuildRequires: libedit-devel
BuildRequires: openssl-devel
BuildRequires: libxo-devel
BuildRequires: gnupg2
%description
Build deviation and compliance tool. This program runs a number of tests
against one or two builds of source RPM files. The built artifacts are
inspected and compared to report changes and validate policy compliance
against the defined parameters.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup
%build
%meson
%meson_build
%install
%meson_install
# Put all man pages in *b sections
cd %{buildroot}%{_mandir}
for section in 1 6 7 8 ; do
cd man"${section}"
for page in *."${section}" ; do
if [ -L "${page}" ]; then
target="$(readlink "${page}")"
ln -sf "${target}"b "${page}"b
rm "${page}"
else
mv "${page}" "${page}"b
sed -i -e '/^\.Dt/ s/$/B/' "${page}"b
fi
done
cd ..
done
cd ..
%files
%doc AUTHORS.md DIFFERENCES README.md TODO TRADEOFFS
%license COPYRIGHT LICENSE
%{_bindir}/*
%{_mandir}/man1/*.1b*
%{_mandir}/man6/*.6b*
%{_mandir}/man7/*.7b*
%{_mandir}/man8/*.8b*
%{_datadir}/misc/bc.library
%changelog