source: projects/specs/trunk/r/rng-tools/rng-tools-vl.spec @ 12458

Revision 12458, 2.8 KB checked in by tomop, 4 years ago (diff)

updated 4 packages

cronie-1.5.5-2

geoclue2-2.5.6-1

kernel-5.4.57-1

rng-tools-6.10-5

Line 
1%bcond_with systemd
2
3%global _hardened_build 1
4%global _sbindir /sbin
5
6Summary:        Random number generator related utilities
7Summary(ja):    乱数生成器関連のユーティリティ
8Name:           rng-tools
9Version:        6.10
10Release:        5%{?_dist_release}%{?with_systemd:.systemd}
11Group:          system
12Vendor:         Project Vine
13Distribution:   Vine Linux
14
15License:        GPLv2+
16URL:            https://github.com/nhorman/rng-tools
17Source0:        https://github.com/nhorman/rng-tools/archive/rng-tools-%{version}.tar.gz
18Source1:        rngd.service
19Source100:      rngd.init
20Source101:      rngd.sysconfig
21Source1000:     Changelog.fedora
22
23# https://sourceforge.net/p/gkernel/patches/111/
24
25BuildRequires: gcc make
26BuildRequires: gettext
27BuildRequires: libgcrypt-devel
28BuildRequires: autoconf automake
29BuildRequires: libsysfs-devel curl-devel
30BuildRequires: libxml2-devel openssl-devel
31BuildRequires: jansson-devel
32BuildRequires: jitterentropy-devel
33#BuildRequires: libp11-devel
34#BuildRequires: rtl-sdr-devel
35Provides: jitterentropy-rngd
36
37%if %{with systemd}
38BuildRequires:  systemd-units
39Requires(post): systemd-units
40Requires(preun): systemd-units
41Requires(postun): systemd-units
42%else
43Requires(post): chkconfig
44Requires(preun): chkconfig
45Requires(postun): chkconfig
46%endif
47
48%description
49Hardware random number generation tools.
50
51
52%prep
53%autosetup
54
55
56%build
57./autogen.sh
58%configure \
59        --without-pkcs11 \
60        --without-rtlsdr \
61        %{nil}
62
63%make_build
64
65
66%install
67%make_install
68
69%if %{with systemd}
70# install systemd unit file
71install -Dt %{buildroot}%{_unitdir} -m0644 %{SOURCE1}
72%else
73mkdir -p %{buildroot}%{_initdir}
74mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
75install -m755 %{SOURCE100} %{buildroot}%{_initdir}/rngd
76install -m644 %{SOURCE101} %{buildroot}%{_sysconfdir}/sysconfig/rngd
77%endif
78
79
80%post
81%if %{with systemd}
82%systemd_post rngd.service
83%else
84/sbin/chkconfig --add rngd
85%endif
86
87%preun
88%if %{with systemd}
89%systemd_preun rngd.service
90%else
91if [ "$1" = 0 -o -x /bin/systemctl ]; then
92  /sbin/service stop rngd >/dev/null 2>&1 ||:
93  /sbin/chkconfig --del rngd
94fi
95%endif
96
97%postun
98%if %{with systemd}
99%systemd_postun_with_restart rngd.service
100%else
101if [ "$1" != 0 ]; then
102  /sbin/service stop condrestart >/dev/null 2>&1 ||:
103fi
104%endif
105
106
107%files
108%{!?_licensedir:%global license %%doc}
109%license COPYING
110%doc AUTHORS NEWS README
111%{_bindir}/rngtest
112%{_sbindir}/rngd
113%{_mandir}/man1/rngtest.1.*
114%{_mandir}/man8/rngd.8.*
115%if %{with systemd}
116%attr(0644,root,root)   %{_unitdir}/rngd.service
117%else
118%attr(0755,root,root)   %{_initdir}/rngd
119%attr(0644,root,root)   %config(noreplace) %{_sysconfdir}/sysconfig/rngd
120%endif
121
122
123%changelog
124* Sun Aug 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 6.10-5
125* added suffix to %%release with systemd build.
126
127* Thu Apr 02 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 6.10-4
128- initial build for Vine Linux.
Note: See TracBrowser for help on using the repository browser.