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