]>
Commit | Line | Data |
---|---|---|
5b41b6a6 ER |
1 | # TODO |
2 | # - pldize initscript | |
3 | %include /usr/lib/rpm/macros.perl | |
4 | Summary: Downloads Certificate Revocation Lists | |
5 | Name: fetch-crl | |
6 | Version: 3.0.6 | |
7 | Release: 1 | |
8 | License: ASL 2.0 | |
9 | Group: Applications/System | |
10 | URL: http://www.nikhef.nl/grid/gridwiki/index.php/FetchCRL3 | |
11 | Source0: https://dist.eugridpma.info/distribution/util/fetch-crl3/%{name}-%{version}.tar.gz | |
12 | # Source0-md5: b58f10fb76bab3a34fd4d80541956ef3 | |
13 | BuildRequires: rpm-perlprov >= 4.1-13 | |
14 | Requires: openssl | |
15 | Obsoletes: fetch-crl3 | |
16 | # These requires are only added since file is currently broken so they don't get autogenerated. | |
17 | # https://bugzilla.redhat.com/show_bug.cgi?id=699548 | |
18 | # (file(1) considers file 'data' as it sees ^A inside script) | |
19 | Requires: /usr/bin/perl | |
20 | Requires: perl(File::Basename) | |
21 | Requires: perl(File::Temp) | |
22 | Requires: perl(Getopt::Long) | |
23 | Requires: perl(IO::Select) | |
24 | Requires: perl(IPC::Open3) | |
25 | Requires: perl(LWP) | |
26 | Requires: perl(POSIX) | |
27 | Requires: perl(Sys::Syslog) | |
28 | Requires: perl(Time::Local) | |
29 | Requires: perl(integer) | |
30 | Requires: perl(strict) | |
31 | Requires: perl(vars) | |
32 | BuildArch: noarch | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | This tool and associated cron entry ensure that Certificate Revocation | |
37 | Lists (CRLs) are periodically retrieved from the web sites of the | |
38 | respective Certification Authorities. It assumes that the installed CA | |
39 | files follow the hash.crl_url convention. | |
40 | ||
41 | %prep | |
42 | %setup -q | |
43 | # use this to figure out deps | |
44 | #sed -i -e 's,\ 1,BLAAA,' %{name} | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}.d,/etc/{cron.d,rc.d/init.d}} | |
49 | %{__make} install \ | |
50 | PREFIX=$RPM_BUILD_ROOT%{_usr} \ | |
51 | ETC=$RPM_BUILD_ROOT%{_sysconfdir} \ | |
52 | CACHE=$RPM_BUILD_ROOT%{_var}/cache | |
53 | ||
54 | install -p fetch-crl-cron.init $RPM_BUILD_ROOT%{_initrddir}/%{name}-cron | |
55 | install -p fetch-crl-boot.init $RPM_BUILD_ROOT%{_initrddir}/%{name}-boot | |
56 | cp -p fetch-crl-cron.cron $RPM_BUILD_ROOT/etc/cron.d/%{name} | |
57 | ||
58 | # Remove some files that have been duplicated as docs. | |
59 | rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %post | |
65 | /sbin/chkconfig --add %{name}-cron | |
66 | /sbin/chkconfig --add %{name}-boot | |
67 | ||
68 | %preun | |
69 | if [ $1 = 0 ]; then | |
70 | %service %{name}-cron stop | |
71 | %service %{name}-boot stop | |
72 | /sbin/chkconfig --del %{name}-cron | |
73 | /sbin/chkconfig --del %{name}-boot | |
74 | fi | |
75 | ||
76 | %files | |
77 | %defattr(644,root,root,755) | |
78 | %doc CHANGES NOTICE README fetch-crl.cnf.example | |
79 | %dir %{_sysconfdir}/%{name}.d | |
80 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf | |
81 | %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name} | |
82 | %attr(755,root,root) %{_sbindir}/%{name} | |
83 | %attr(754,root,root) /etc/rc.d/init.d/fetch-crl-boot | |
84 | %attr(754,root,root) /etc/rc.d/init.d/fetch-crl-cron | |
85 | %{_mandir}/man8/%{name}.8* | |
86 | %dir %{_var}/cache/%{name} |