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