]>
Commit | Line | Data |
---|---|---|
1780cc1f | 1 | Summary: letsencrypt/acme client implemented as a shell-script |
0b9f695c ER |
2 | Name: dehydrated |
3 | Version: 0.3.1 | |
de4255b2 | 4 | Release: 1 |
1780cc1f ER |
5 | License: MIT |
6 | Group: Applications/Networking | |
0b9f695c ER |
7 | Source0: https://github.com/lukas2511/dehydrated/archive/v%{version}/%{name}-%{version}.tar.gz |
8 | # Source0-md5: 7a3b92b963da6469c4a53f051d6efa24 | |
eb6aa75d ER |
9 | Source1: apache.conf |
10 | Source2: lighttpd.conf | |
aebe760f | 11 | Source3: nginx.conf |
8f670f9f | 12 | Source4: domains.txt |
5765eca7 | 13 | Source5: hook.sh |
a0535a11 | 14 | Source6: crontab |
f5fc6721 | 15 | Patch0: pld.patch |
0b9f695c | 16 | URL: https://github.com/lukas2511/dehydrated |
1780cc1f | 17 | BuildRequires: rpmbuild(macros) >= 1.713 |
a0535a11 | 18 | Requires: crondaemon |
1780cc1f | 19 | Requires: curl |
b9ec4220 | 20 | Requires: diffutils |
1780cc1f ER |
21 | Requires: grep |
22 | Requires: mktemp | |
60120665 | 23 | Requires: openssl-tools |
1780cc1f | 24 | Requires: sed |
eb6aa75d | 25 | Requires: webapps |
9f9f4d8c ER |
26 | Suggests: webserver(access) |
27 | Suggests: webserver(alias) | |
1780cc1f ER |
28 | BuildArch: noarch |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
eb6aa75d ER |
31 | %define _webapps /etc/webapps |
32 | %define _webapp %{name} | |
33 | %define _sysconfdir %{_webapps}/%{_webapp} | |
34 | %define _appdir %{_datadir}/%{_webapp} | |
35 | ||
1780cc1f ER |
36 | %description |
37 | This is a client for signing certificates with an ACME-server | |
38 | (currently only provided by letsencrypt) implemented as a relatively | |
39 | simple bash-script. | |
40 | ||
41 | Current features: | |
42 | - Signing of a list of domains | |
43 | - Signing of a CSR | |
44 | - Renewal if a certificate is about to expire or SAN (subdomains) | |
45 | changed | |
46 | - Certificate revocation | |
47 | ||
48 | %prep | |
49 | %setup -q | |
f5fc6721 | 50 | %patch0 -p1 |
1780cc1f ER |
51 | |
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
f19ccd97 | 54 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/certs,/etc/cron.d} \ |
e354c9b6 | 55 | $RPM_BUILD_ROOT/var/lib/%{name}/{accounts,acme-challenge,certs} |
eb6aa75d | 56 | |
0b9f695c | 57 | install -p %{name} $RPM_BUILD_ROOT%{_sbindir} |
eb6aa75d ER |
58 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
59 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
aebe760f | 60 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/nginx.conf |
3ec257e0 | 61 | cp -p docs/examples/config $RPM_BUILD_ROOT%{_sysconfdir} |
8f670f9f | 62 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir} |
0b9f695c | 63 | cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/cron.d/%{name} |
5765eca7 | 64 | install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir} |
eb6aa75d | 65 | cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf |
1780cc1f ER |
66 | |
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
eb6aa75d ER |
70 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
71 | %webapp_register apache %{_webapp} | |
72 | ||
73 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
74 | %webapp_unregister apache %{_webapp} | |
75 | ||
76 | %triggerin -- apache < 2.2.0, apache-base | |
77 | %webapp_register httpd %{_webapp} | |
78 | ||
79 | %triggerun -- apache < 2.2.0, apache-base | |
80 | %webapp_unregister httpd %{_webapp} | |
81 | ||
82 | %triggerin -- lighttpd | |
83 | %webapp_register lighttpd %{_webapp} | |
84 | ||
85 | %triggerun -- lighttpd | |
86 | %webapp_unregister lighttpd %{_webapp} | |
87 | ||
aebe760f ER |
88 | %triggerin -- nginx |
89 | %webapp_register nginx %{_webapp} | |
90 | ||
91 | %triggerun -- nginx | |
92 | %webapp_unregister nginx %{_webapp} | |
93 | ||
1780cc1f ER |
94 | %files |
95 | %defattr(644,root,root,755) | |
96 | %doc README.md CHANGELOG LICENSE | |
0b9f695c | 97 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name} |
7410a329 | 98 | %dir %attr(750,root,http) %{_sysconfdir} |
eb6aa75d ER |
99 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf |
100 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
101 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
aebe760f | 102 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nginx.conf |
7693646e | 103 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config |
8f670f9f | 104 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/domains.txt |
5765eca7 | 105 | %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook.sh |
0b9f695c | 106 | %attr(755,root,root) %{_sbindir}/%{name} |
f19ccd97 ER |
107 | %dir %attr(751,root,root) /var/lib/%{name} |
108 | %dir %attr(700,root,root) /var/lib/%{name}/accounts | |
e354c9b6 | 109 | %dir %attr(700,root,root) /var/lib/%{name}/certs |
2e509387 | 110 | # challenges written here, need to be readable by webserver |
f19ccd97 | 111 | %dir %attr(751,root,root) /var/lib/%{name}/acme-challenge |