]> TLD Linux GIT Repositories - packages/dehydrated.git/blob - dehydrated.spec
- s/httpd/apache
[packages/dehydrated.git] / dehydrated.spec
1 Summary:        letsencrypt/acme client implemented as a shell-script
2 Name:           dehydrated
3 Version:        0.4.0
4 Release:        0.2
5 License:        MIT
6 Group:          Applications/Networking
7 Source0:        https://github.com/lukas2511/dehydrated/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  8114ba0144a158d5ad1bdf02e6f43195
9 Source1:        apache.conf
10 Source2:        lighttpd.conf
11 Source3:        nginx.conf
12 Source4:        domains.txt
13 Source5:        crontab
14 Source6:        config.sh
15 Source7:        01-ca-path.sh
16 Source8:        02-challenge-type.sh
17 Source9:        03-keys.sh
18 Source10:       04-renew.sh
19 Source11:       05-ocsp.sh
20 Source12:       06-hook.sh
21 Source13:       07-contact.sh
22 Source14:       hook.sh
23 Source15:       hook.functions
24 Source16:       hook.global
25 Patch0:         tld.patch
26 URL:            https://github.com/lukas2511/dehydrated
27 BuildRequires:  rpmbuild(macros) >= 1.713
28 Requires:       ca-certificates
29 Requires:       crondaemon
30 Requires:       curl
31 Requires:       diffutils
32 Requires:       grep
33 Requires:       mktemp
34 Requires:       openssl-tools
35 Requires:       sed
36 Requires:       webapps
37 Suggests:       webserver(access)
38 Suggests:       webserver(alias)
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _webapps        /etc/webapps
43
44 %description
45 This is a client for signing certificates with an ACME-server
46 (currently only provided by letsencrypt) implemented as a relatively
47 simple bash-script.
48
49 Current features:
50 - Signing of a list of domains
51 - Signing of a CSR
52 - Renewal if a certificate is about to expire or SAN (subdomains)
53   changed
54 - Certificate revocation
55
56 %prep
57 %setup -q
58 %patch0 -p1
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_sbindir},{/etc/%{name},%{_webapps}/%{name}}/{conf.d,hooks,hooks.d},/etc/cron.d} \
63         $RPM_BUILD_ROOT/var/lib/%{name}/{accounts,acme-challenges,certs}
64
65 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
66 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{name}/apache.conf
67 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{name}/lighttpd.conf
68 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_webapps}/%{name}/nginx.conf
69 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/%{name}/domains.txt
70 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/cron.d/%{name}
71 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/%{name}/config
72 cp -p %{SOURCE7} %{SOURCE8} %{SOURCE9} %{SOURCE10} \
73         %{SOURCE11} %{SOURCE12} %{SOURCE13} \
74         $RPM_BUILD_ROOT/etc/%{name}/conf.d/
75 install -p %{SOURCE14} $RPM_BUILD_ROOT/etc/%{name}/hooks/hook.sh
76 cp -p %{SOURCE15} $RPM_BUILD_ROOT/etc/%{name}/hooks/functions
77 cp -p %{SOURCE16} $RPM_BUILD_ROOT/etc/%{name}/hooks.d/global
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %triggerin -- apache < 2.2.0, apache-base
83 %webapp_register apache %{name}
84
85 %triggerun -- apache < 2.2.0, apache-base
86 %webapp_unregister apache %{name}
87
88 %triggerin -- lighttpd
89 %webapp_register lighttpd %{name}
90
91 %triggerun -- lighttpd
92 %webapp_unregister lighttpd %{name}
93
94 %triggerin -- nginx
95 %webapp_register nginx %{name}
96
97 %triggerun -- nginx
98 %webapp_unregister nginx %{name}
99
100 %files
101 %defattr(644,root,root,755)
102 %doc README.md CHANGELOG LICENSE
103 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
104 %dir %attr(750,root,http) %{_webapps}/%{name}
105 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/apache.conf
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/lighttpd.conf
107 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{name}/nginx.conf
108 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/config
109 %attr(755,root,root) /etc/%{name}/conf.d
110 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/conf.d/*.sh
111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/domains.txt
112 %attr(755,root,root) /etc/%{name}/hooks
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks/functions
114 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks/hook.sh
115 %attr(755,root,root) /etc/%{name}/hooks.d
116 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks.d/global
117 %attr(755,root,root) %{_sbindir}/%{name}
118 %dir %attr(751,root,root) /var/lib/%{name}
119 %dir %attr(700,root,root) /var/lib/%{name}/accounts
120 %dir %attr(700,root,root) /var/lib/%{name}/certs
121 # challenges written here, need to be readable by webserver
122 %dir %attr(751,root,root) /var/lib/%{name}/acme-challenges