]> git.pld-linux.org Git - packages/dehydrated.git/blob - dehydrated.spec
Remove any output on unknown hook script
[packages/dehydrated.git] / dehydrated.spec
1 Summary:        letsencrypt/acme client implemented as a shell-script
2 Name:           dehydrated
3 Version:        0.7.1
4 Release:        1
5 License:        MIT
6 Group:          Applications/Networking
7 Source0:        https://github.com/dehydrated-io/dehydrated/archive/v%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5:  0ebe5185b2c9bd721e95f95962dc377d
9 Source1:        apache.conf
10 Source2:        lighttpd.conf
11 Source3:        nginx.conf
12 Source5:        hook.sh
13 Source6:        hook-dns-01.sh
14 Source7:        crontab
15 Source8:        sudoers
16 Patch0:         pld.patch
17 URL:            https://dehydrated.io/
18 BuildRequires:  rpmbuild(macros) >= 1.713
19 Requires:       ca-certificates
20 Requires:       crondaemon
21 Requires:       curl
22 Requires:       diffutils
23 Requires:       grep
24 Requires:       mktemp
25 Requires:       openssl-tools
26 Requires:       sed
27 Requires:       sudo
28 Requires:       webapps
29 Requires(postun):       /usr/sbin/groupdel
30 Requires(pre):  /usr/bin/getgid
31 Requires(pre):  /usr/sbin/groupadd
32 Suggests:       webserver(access)
33 Suggests:       webserver(alias)
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _webapps        /etc/webapps
38 %define         _webapp         %{name}
39 %define         _sysconfdir     %{_webapps}/%{_webapp}
40 %define         _appdir         %{_datadir}/%{_webapp}
41
42 %description
43 This is a client for signing certificates with an ACME-server
44 (currently only provided by letsencrypt) implemented as a relatively
45 simple bash-script.
46
47 Current features:
48 - Signing of a list of domains
49 - Signing of a CSR
50 - Renewal if a certificate is about to expire or SAN (subdomains)
51   changed
52 - Certificate revocation
53
54 %prep
55 %setup -q
56 %patch0 -p1
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/certs,/etc/{cron,sudoers}.d} \
61         $RPM_BUILD_ROOT/var/lib/%{name}/{accounts,acme-challenge,certs}
62
63 install -p %{name} $RPM_BUILD_ROOT%{_sbindir}
64 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
65 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
66 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/nginx.conf
67 cp -p docs/examples/config $RPM_BUILD_ROOT%{_sysconfdir}
68 cp -p docs/examples/domains.txt $RPM_BUILD_ROOT%{_sysconfdir}
69 cp -p %{SOURCE7} $RPM_BUILD_ROOT/etc/cron.d/%{name}
70 cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/sudoers.d/%{name}
71 install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
72 install -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}
73 cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
74
75 %pre
76 %groupadd -g 184 dehydrated
77
78 %postun
79 if [ "$1" = "0" ]; then
80         %groupremove dehydrated
81 fi
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %triggerin -- apache1 < 1.3.37-3, apache1-base
87 %webapp_register apache %{_webapp}
88
89 %triggerun -- apache1 < 1.3.37-3, apache1-base
90 %webapp_unregister apache %{_webapp}
91
92 %triggerin -- apache < 2.2.0, apache-base
93 %webapp_register httpd %{_webapp}
94
95 %triggerun -- apache < 2.2.0, apache-base
96 %webapp_unregister httpd %{_webapp}
97
98 %triggerin -- lighttpd
99 %webapp_register lighttpd %{_webapp}
100
101 %triggerun -- lighttpd
102 %webapp_unregister lighttpd %{_webapp}
103
104 %triggerin -- nginx
105 %webapp_register nginx %{_webapp}
106
107 %triggerun -- nginx
108 %webapp_unregister nginx %{_webapp}
109
110 %files
111 %defattr(644,root,root,755)
112 %doc README.md CHANGELOG LICENSE
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sudoers.d/%{name}
115 %dir %attr(750,root,http) %{_sysconfdir}
116 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
117 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
118 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
119 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nginx.conf
120 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config
121 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/domains.txt
122 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook.sh
123 %attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook-dns-01.sh
124 %attr(755,root,root) %{_sbindir}/%{name}
125 %dir %attr(751,root,root) /var/lib/%{name}
126 %dir %attr(700,root,root) /var/lib/%{name}/accounts
127 %dir %attr(750,root,dehydrated) /var/lib/%{name}/certs
128 # challenges written here, need to be readable by webserver
129 %dir %attr(751,root,dehydrated) /var/lib/%{name}/acme-challenge
This page took 0.094662 seconds and 4 git commands to generate.