File timer-entropyd.spec of Package timer-entropyd
# norootforbuild
Name: timer-entropyd
Version: 0.1
Release: 0
Summary: Feeds /dev/random with Entropy Data read from Timers
Source: http://www.vanheusden.com/te/timer_entropyd-%{version}.tgz
Source1: timer-entropyd.init
Patch1: timer-entropyd-optflags.patch
Patch2: timer-entropyd-fix_warnings.patch
Patch3: timer_entropyd-0.1-drop-capabilitites.patch
URL: http://www.vanheusden.com/te/
Group: Productivity/Security
License: GNU General Public License version 2 or later (GPL v2 or later)
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: gcc make glibc-devel libcap-ng-devel
%if 0%{?suse_version} >= 1030
BuildRequires: licenses
Requires: licenses
%endif
%description
This program feeds the /dev/random device with entropy-data (random values)
read from timers.
It does this by measuring how much longer or shorter a sleep takes (this
fluctuates a little - microseconds). The time for a sleep jitters due to that
the frequency of the clocks of the timers change when they become colder or
hotter (and a few other parameters).
This program does not require any extra hardware.
It produces around 500 bits per second.
%prep
%setup -q -n "timer_entropyd-%{version}"
%patch1
%patch2
%patch3
%build
%__make %{?jobs:-j%{jobs}} \
CC="%__cc" \
DEBUG="%{optflags}"
%install
%__install -D timer_entropyd "%{buildroot}%{_sbindir}/timer_entropyd"
%__install -D "%{SOURCE1}" "%{buildroot}/etc/init.d/%{name}"
%__install -d "%{buildroot}/usr/sbin"
%__ln_s "../../etc/init.d/%{name}" "%{buildroot}/usr/sbin/rc%{name}"
h=/usr/share/doc/licenses/md5/$(md5sum license.txt|cut -f1 -d" ")
test -e "$h" && %__ln_s -f "$h" .
%preun
%stop_on_removal %{name}
%postun
%restart_on_update %{name}
%insserv_cleanup
%clean
%__rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%doc Changes *.txt
%{_sbindir}/timer_entropyd
/etc/init.d/%{name}
/usr/sbin/rc%{name}
%changelog
# vim: set sw=3 ts=3 noet:
# Local Variables:
# mode: rpm-spec
# tab-width: 3
# End: