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

Revision 12363, 2.6 KB checked in by tomop, 4 years ago (diff)

updated 6 packages

NetworkManager-1.22.10-1

initscripts-8.91.16-2

jitterentropy-2.2.0-3

rng-tools-6.10-4

samba-4.12.0-2

sysfsutils-2.1.0-5

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