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: 97425cf8aaa1a9a1a86036a1b7611a8c
10 Source2: lighttpd.conf
14 Source6: hook-dns-01.sh
17 URL: https://github.com/lukas2511/dehydrated
18 BuildRequires: rpmbuild(macros) >= 1.713
19 Requires: ca-certificates
25 Requires: openssl-tools
28 Suggests: webserver(access)
29 Suggests: webserver(alias)
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define _webapps /etc/webapps
34 %define _webapp %{name}
35 %define _sysconfdir %{_webapps}/%{_webapp}
36 %define _appdir %{_datadir}/%{_webapp}
39 This is a client for signing certificates with an ACME-server
40 (currently only provided by letsencrypt) implemented as a relatively
44 - Signing of a list of domains
46 - Renewal if a certificate is about to expire or SAN (subdomains)
48 - Certificate revocation
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/certs,/etc/cron.d} \
57 $RPM_BUILD_ROOT/var/lib/%{name}/{accounts,acme-challenge,certs}
59 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
60 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
61 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
62 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/nginx.conf
63 cp -p docs/examples/config $RPM_BUILD_ROOT%{_sysconfdir}
64 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
65 cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/cron.d/%{name}
66 install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
67 install -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}
68 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
71 rm -rf $RPM_BUILD_ROOT
73 %triggerin -- apache1 < 1.3.37-3, apache1-base
74 %webapp_register apache %{_webapp}
76 %triggerun -- apache1 < 1.3.37-3, apache1-base
77 %webapp_unregister apache %{_webapp}
79 %triggerin -- apache < 2.2.0, apache-base
80 %webapp_register httpd %{_webapp}
82 %triggerun -- apache < 2.2.0, apache-base
83 %webapp_unregister httpd %{_webapp}
85 %triggerin -- lighttpd
86 %webapp_register lighttpd %{_webapp}
88 %triggerun -- lighttpd
89 %webapp_unregister lighttpd %{_webapp}
92 %webapp_register nginx %{_webapp}
95 %webapp_unregister nginx %{_webapp}
98 %defattr(644,root,root,755)
99 %doc README.md CHANGELOG LICENSE
100 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
101 %dir %attr(750,root,http) %{_sysconfdir}
102 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
103 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
104 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
105 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nginx.conf
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config
107 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/domains.txt
108 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook.sh
109 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook-dns-01.sh
110 %attr(755,root,root) %{_sbindir}/%{name}
111 %dir %attr(751,root,root) /var/lib/%{name}
112 %dir %attr(700,root,root) /var/lib/%{name}/accounts
113 %dir %attr(700,root,root) /var/lib/%{name}/certs
114 # challenges written here, need to be readable by webserver
115 %dir %attr(751,root,root) /var/lib/%{name}/acme-challenge