1 | %bcond_with systemd |
---|
2 | |
---|
3 | Summary: A simple CalDAV (calendar) and CardDAV (contact) server |
---|
4 | Name: radicale |
---|
5 | Version: 2.1.12 |
---|
6 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
7 | Group: servers |
---|
8 | Vendor: Project Vine |
---|
9 | Distribution: Vine Linux |
---|
10 | |
---|
11 | License: GPLv3+ |
---|
12 | URL: https://radicale.org |
---|
13 | Source0: https://github.com/Kozea/Radicale/archive/%{version}/%{name}-%{version}.tar.gz |
---|
14 | Source1: %{name}.service |
---|
15 | Source2: %{name}-logrotate |
---|
16 | Source7: %{name}-tmpfiles.conf |
---|
17 | Source1000: %{name}.init |
---|
18 | |
---|
19 | BuildArch: noarch |
---|
20 | BuildRequires: python3-rpm-macros |
---|
21 | BuildRequires: python3-devel |
---|
22 | BuildRequires: python3-setuptools |
---|
23 | |
---|
24 | Requires: python3-%{name} = %{version}-%{release} |
---|
25 | Requires(pre): shadow-utils |
---|
26 | %if %{with systemd} |
---|
27 | BuildRequires: systemd |
---|
28 | %{?systemd_requires} |
---|
29 | %else |
---|
30 | Requires(post): chkconfig |
---|
31 | Requires(preun): chkconfig |
---|
32 | Requires(preun): /sbin/service |
---|
33 | Requires(postun): /sbin/service |
---|
34 | %endif |
---|
35 | |
---|
36 | %description |
---|
37 | The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It |
---|
38 | aims to be a light solution, easy to use, easy to install, easy to configure. |
---|
39 | As a consequence, it requires few software dependencies and is pre-configured |
---|
40 | to work out-of-the-box. |
---|
41 | |
---|
42 | The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD, |
---|
43 | MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone |
---|
44 | and Android clients. It is free and open-source software, released under GPL |
---|
45 | version 3. |
---|
46 | |
---|
47 | |
---|
48 | %package -n python3-%{name} |
---|
49 | Summary: A simple CalDAV (calendar) and CardDAV (contact) server |
---|
50 | Group: programming |
---|
51 | Requires: python3-vobject |
---|
52 | Recommends: python3-bcrypt |
---|
53 | Recommends: python3-passlib |
---|
54 | %{?python_provide:%python_provide python3-%{name}} |
---|
55 | |
---|
56 | %description -n python3-%{name} |
---|
57 | The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It |
---|
58 | aims to be a light solution, easy to use, easy to install, easy to configure. |
---|
59 | As a consequence, it requires few software dependencies and is pre-configured |
---|
60 | to work out-of-the-box. |
---|
61 | |
---|
62 | The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD, |
---|
63 | MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone |
---|
64 | and Android clients. It is free and open-source software, released under GPL |
---|
65 | version 3. |
---|
66 | |
---|
67 | |
---|
68 | %prep |
---|
69 | %autosetup -n Radicale-%{version} |
---|
70 | |
---|
71 | |
---|
72 | %build |
---|
73 | %py3_build |
---|
74 | |
---|
75 | |
---|
76 | %install |
---|
77 | %py3_install |
---|
78 | |
---|
79 | # Install configuration files |
---|
80 | mkdir -p %{buildroot}%{_sysconfdir}/%{name}/ |
---|
81 | install -p -m 640 config %{buildroot}%{_sysconfdir}/%{name}/ |
---|
82 | install -p -m 644 logging %{buildroot}%{_sysconfdir}/%{name}/ |
---|
83 | install -p -m 644 rights %{buildroot}%{_sysconfdir}/%{name}/ |
---|
84 | |
---|
85 | # Install wsgi file |
---|
86 | mkdir -p %{buildroot}%{_datadir}/%{name} |
---|
87 | sed -i 's|^#!/usr/bin/env python3$|#!/usr/bin/python3|' radicale.wsgi |
---|
88 | sed -i 's|^#!/usr/bin/env python3$|#!/usr/bin/python3|' radicale.fcgi |
---|
89 | install -p -m 755 radicale.wsgi %{buildroot}%{_datadir}/%{name}/ |
---|
90 | install -p -m 755 radicale.fcgi %{buildroot}%{_datadir}/%{name}/ |
---|
91 | |
---|
92 | # Create folder where the calendar will be stored |
---|
93 | mkdir -p %{buildroot}%{_sharedstatedir}/%{name}/ |
---|
94 | |
---|
95 | %if %{with systemd} |
---|
96 | install -D -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service |
---|
97 | install -D -p -m 644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf |
---|
98 | %else |
---|
99 | install -D -p -m 755 %{SOURCE1000} %{buildroot}%{_initdir}/%{name} |
---|
100 | %endif |
---|
101 | install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} |
---|
102 | mkdir -p %{buildroot}/run/%{name} |
---|
103 | |
---|
104 | mkdir -p %{buildroot}%{_localstatedir}/log/%{name} |
---|
105 | |
---|
106 | |
---|
107 | %pre |
---|
108 | getent group %{name} >/dev/null || groupadd -r %{name} |
---|
109 | getent passwd %{name} >/dev/null || \ |
---|
110 | useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \ |
---|
111 | -c "Radicale service account" %{name} |
---|
112 | exit 0 |
---|
113 | |
---|
114 | |
---|
115 | %post |
---|
116 | %if %{with systemd} |
---|
117 | %systemd_post %{name}.service |
---|
118 | %else |
---|
119 | if [ $1 -eq 1 ]; then |
---|
120 | /sbin/chkconfig --add radicale |
---|
121 | fi |
---|
122 | %endif |
---|
123 | |
---|
124 | %preun |
---|
125 | %if %{with systemd} |
---|
126 | %systemd_preun %{name}.service |
---|
127 | %else |
---|
128 | if [ $1 -eq 0 -o /bin/systemctl ]; then |
---|
129 | /sbin/service radicale status >/dev/null 2>&1 && \ |
---|
130 | /sbin/service radicale stop ||: |
---|
131 | /sbin/chkconfig --del radicale |
---|
132 | fi |
---|
133 | %endif |
---|
134 | |
---|
135 | %postun |
---|
136 | %if %{with systemd} |
---|
137 | %systemd_postun_with_restart %{name}.service |
---|
138 | %else |
---|
139 | if [ $1 -gt 0 ]; then |
---|
140 | /sbin/service radicale condrestart ||: |
---|
141 | fi |
---|
142 | %endif |
---|
143 | |
---|
144 | |
---|
145 | %files |
---|
146 | %license COPYING |
---|
147 | %doc README.md NEWS.md |
---|
148 | %{_bindir}/%{name} |
---|
149 | %dir %{_sysconfdir}/%{name}/ |
---|
150 | %config(noreplace) %attr(0640, root, %{name}) %{_sysconfdir}/%{name}/config |
---|
151 | %config(noreplace) %{_sysconfdir}/%{name}/logging |
---|
152 | %config(noreplace) %{_sysconfdir}/%{name}/rights |
---|
153 | %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} |
---|
154 | %if %{with systemd} |
---|
155 | %{_unitdir}/%{name}.service |
---|
156 | %{_tmpfilesdir}/%{name}.conf |
---|
157 | %else |
---|
158 | %{_initdir}/%{name} |
---|
159 | %endif |
---|
160 | %dir %attr(750, %{name}, %{name}) %{_localstatedir}/log/%{name} |
---|
161 | %dir %attr(750, %{name}, %{name}) %{_sharedstatedir}/%{name}/ |
---|
162 | %{_datadir}/%{name}/* |
---|
163 | %ghost %dir %attr(755, %{name}, %{name}) /run/%{name} |
---|
164 | |
---|
165 | %files -n python3-%{name} |
---|
166 | %license COPYING |
---|
167 | %{python3_sitelib}/%{name} |
---|
168 | %{python3_sitelib}/Radicale-*.egg-info |
---|
169 | |
---|
170 | |
---|
171 | %changelog |
---|
172 | * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.12-1 |
---|
173 | - new upstream release. |
---|
174 | |
---|
175 | * Tue May 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.11-2 |
---|
176 | - added systemd support (disabled as default). |
---|
177 | |
---|
178 | * Thu Feb 14 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.11-1 |
---|
179 | - new upstream release. |
---|
180 | |
---|
181 | * Wed Jan 31 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.8-1 |
---|
182 | - new upstream release. |
---|
183 | |
---|
184 | * Thu Oct 22 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.1-1 |
---|
185 | - new upstream release. |
---|
186 | |
---|
187 | * Thu Apr 03 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.9-1.beta1 |
---|
188 | - new upstream release. |
---|
189 | |
---|
190 | * Sun Aug 11 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.8-1 |
---|
191 | - new upstream release. |
---|
192 | |
---|
193 | * Thu Oct 13 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.2-1 |
---|
194 | - new upstream release. |
---|
195 | |
---|
196 | * Tue Aug 23 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6-1 |
---|
197 | - new upstream release. |
---|
198 | |
---|
199 | * Sun May 22 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.5-1 |
---|
200 | - initial build. |
---|
201 | |
---|