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