1 Summary: letsencrypt/acme client implemented as a shell-script
6 Group: Applications/Networking
7 Source0: https://github.com/lukas2511/dehydrated/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 8114ba0144a158d5ad1bdf02e6f43195
10 Source2: lighttpd.conf
16 URL: https://github.com/lukas2511/dehydrated
17 BuildRequires: rpmbuild(macros) >= 1.713
18 Requires: ca-certificates
24 Requires: openssl-tools
27 Suggests: webserver(access)
28 Suggests: webserver(alias)
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _webapps /etc/webapps
33 %define _webapp %{name}
34 %define _sysconfdir %{_webapps}/%{_webapp}
35 %define _appdir %{_datadir}/%{_webapp}
38 This is a client for signing certificates with an ACME-server
39 (currently only provided by letsencrypt) implemented as a relatively
43 - Signing of a list of domains
45 - Renewal if a certificate is about to expire or SAN (subdomains)
47 - Certificate revocation
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/certs,/etc/cron.d} \
56 $RPM_BUILD_ROOT/var/lib/%{name}/{accounts,acme-challenges,certs}
58 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
59 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
60 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
61 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/nginx.conf
62 cp -p docs/examples/config $RPM_BUILD_ROOT%{_sysconfdir}
63 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
64 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/cron.d/%{name}
65 install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
66 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
69 rm -rf $RPM_BUILD_ROOT
71 %triggerin -- apache1 < 1.3.37-3, apache1-base
72 %webapp_register apache %{_webapp}
74 %triggerun -- apache1 < 1.3.37-3, apache1-base
75 %webapp_unregister apache %{_webapp}
77 %triggerin -- apache < 2.2.0, apache-base
78 %webapp_register httpd %{_webapp}
80 %triggerun -- apache < 2.2.0, apache-base
81 %webapp_unregister httpd %{_webapp}
83 %triggerin -- lighttpd
84 %webapp_register lighttpd %{_webapp}
86 %triggerun -- lighttpd
87 %webapp_unregister lighttpd %{_webapp}
90 %webapp_register nginx %{_webapp}
93 %webapp_unregister nginx %{_webapp}
96 %defattr(644,root,root,755)
97 %doc README.md CHANGELOG LICENSE
98 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
99 %dir %attr(750,root,http) %{_sysconfdir}
100 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
101 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
102 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
103 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nginx.conf
104 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config
105 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/domains.txt
106 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook.sh
107 %attr(755,root,root) %{_sbindir}/%{name}
108 %dir %attr(751,root,root) /var/lib/%{name}
109 %dir %attr(700,root,root) /var/lib/%{name}/accounts
110 %dir %attr(700,root,root) /var/lib/%{name}/certs
111 # challenges written here, need to be readable by webserver
112 %dir %attr(751,root,root) /var/lib/%{name}/acme-challenges