]> git.pld-linux.org Git - packages/dehydrated.git/blob - dehydrated.spec
move acme-challenge and accounts to /var/lib
[packages/dehydrated.git] / dehydrated.spec
1 Summary:        letsencrypt/acme client implemented as a shell-script
2 Name:           dehydrated
3 Version:        0.3.1
4 Release:        0.4
5 License:        MIT
6 Group:          Applications/Networking
7 Source0:        https://github.com/lukas2511/dehydrated/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  7a3b92b963da6469c4a53f051d6efa24
9 Source1:        apache.conf
10 Source2:        lighttpd.conf
11 Source4:        domains.txt
12 Source5:        hook.sh
13 Source6:        crontab
14 Patch0:         pld.patch
15 URL:            https://github.com/lukas2511/dehydrated
16 BuildRequires:  rpmbuild(macros) >= 1.713
17 Requires:       crondaemon
18 Requires:       curl
19 Requires:       grep
20 Requires:       mktemp
21 Requires:       openssl-tools
22 Requires:       sed
23 Requires:       webapps
24 Suggests:       webserver(access)
25 Suggests:       webserver(alias)
26 Provides:       letsencrypt.sh = %{version}
27 Obsoletes:      letsencrypt.sh < 0.3
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _webapps        /etc/webapps
32 %define         _webapp         %{name}
33 %define         _sysconfdir     %{_webapps}/%{_webapp}
34 %define         _appdir         %{_datadir}/%{_webapp}
35
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
50 %patch0 -p1
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/certs,/etc/cron.d} \
55         $RPM_BUILD_ROOT/var/lib/%{name}/{accounts,acme-challenge}
56
57 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
58 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
59 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
60 cp -p docs/examples/config $RPM_BUILD_ROOT%{_sysconfdir}
61 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
62 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/cron.d/%{name}
63 install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
64 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %triggerin -- apache1 < 1.3.37-3, apache1-base
70 %webapp_register apache %{_webapp}
71
72 %triggerun -- apache1 < 1.3.37-3, apache1-base
73 %webapp_unregister apache %{_webapp}
74
75 %triggerin -- apache < 2.2.0, apache-base
76 %webapp_register httpd %{_webapp}
77
78 %triggerun -- apache < 2.2.0, apache-base
79 %webapp_unregister httpd %{_webapp}
80
81 %triggerin -- lighttpd
82 %webapp_register lighttpd %{_webapp}
83
84 %triggerun -- lighttpd
85 %webapp_unregister lighttpd %{_webapp}
86
87 %files
88 %defattr(644,root,root,755)
89 %doc README.md CHANGELOG LICENSE
90 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
91 %dir %attr(750,root,http) %{_sysconfdir}
92 %dir %attr(700,root,root) %{_sysconfdir}/certs
93 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
95 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
96 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config
97 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/domains.txt
98 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook.sh
99 %attr(755,root,root) %{_sbindir}/%{name}
100 %dir %attr(751,root,root) /var/lib/%{name}
101 %dir %attr(700,root,root) /var/lib/%{name}/accounts
102 # challenges written here, need to be readable by webserver
103 %dir %attr(751,root,root) /var/lib/%{name}/acme-challenge
This page took 0.076072 seconds and 4 git commands to generate.