source: projects/specs/trunk/r/radicale/radicale-vl.spec @ 12471

Revision 12471, 5.9 KB checked in by tomop, 4 years ago (diff)

updated 2 packages

python-vobject-0.9.6.1-2

radicale-2.1.12-1

Line 
1%bcond_with systemd
2
3Summary:          A simple CalDAV (calendar) and CardDAV (contact) server
4Name:             radicale
5Version:          2.1.12
6Release:          1%{?_dist_release}%{?with_systemd:.systemd}
7Group:            servers
8Vendor:           Project Vine
9Distribution:     Vine Linux
10
11License:          GPLv3+
12URL:              https://radicale.org
13Source0:          https://github.com/Kozea/Radicale/archive/%{version}/%{name}-%{version}.tar.gz
14Source1:          %{name}.service
15Source2:          %{name}-logrotate
16Source7:          %{name}-tmpfiles.conf
17Source1000:       %{name}.init
18
19BuildArch:        noarch
20BuildRequires:    python3-rpm-macros
21BuildRequires:    python3-devel
22BuildRequires:    python3-setuptools
23
24Requires:         python3-%{name} = %{version}-%{release}
25Requires(pre):    shadow-utils
26%if %{with systemd}
27BuildRequires:    systemd
28%{?systemd_requires}
29%else
30Requires(post):   chkconfig
31Requires(preun):  chkconfig
32Requires(preun):  /sbin/service
33Requires(postun): /sbin/service
34%endif
35
36%description
37The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It
38aims to be a light solution, easy to use, easy to install, easy to configure.
39As a consequence, it requires few software dependencies and is pre-configured
40to work out-of-the-box.
41
42The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD,
43MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone
44and Android clients. It is free and open-source software, released under GPL
45version 3.
46
47
48%package -n python3-%{name}
49Summary:          A simple CalDAV (calendar) and CardDAV (contact) server
50Group:            programming
51Requires:         python3-vobject
52Recommends:       python3-bcrypt
53Recommends:       python3-passlib
54%{?python_provide:%python_provide python3-%{name}}
55
56%description -n python3-%{name}
57The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. It
58aims to be a light solution, easy to use, easy to install, easy to configure.
59As a consequence, it requires few software dependencies and is pre-configured
60to work out-of-the-box.
61
62The Radicale Project runs on most of the UNIX-like platforms (Linux, BSD,
63MacOS X) and Windows. It is known to work with Evolution, Lightning, iPhone
64and Android clients. It is free and open-source software, released under GPL
65version 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
80mkdir -p %{buildroot}%{_sysconfdir}/%{name}/
81install -p -m 640 config %{buildroot}%{_sysconfdir}/%{name}/
82install -p -m 644 logging %{buildroot}%{_sysconfdir}/%{name}/
83install -p -m 644 rights %{buildroot}%{_sysconfdir}/%{name}/
84
85# Install wsgi file
86mkdir -p %{buildroot}%{_datadir}/%{name}
87sed -i 's|^#!/usr/bin/env python3$|#!/usr/bin/python3|' radicale.wsgi
88sed -i 's|^#!/usr/bin/env python3$|#!/usr/bin/python3|' radicale.fcgi
89install -p -m 755 radicale.wsgi %{buildroot}%{_datadir}/%{name}/
90install -p -m 755 radicale.fcgi %{buildroot}%{_datadir}/%{name}/
91
92# Create folder where the calendar will be stored
93mkdir -p  %{buildroot}%{_sharedstatedir}/%{name}/
94
95%if %{with systemd}
96install -D -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
97install -D -p -m 644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf
98%else
99install -D -p -m 755 %{SOURCE1000} %{buildroot}%{_initdir}/%{name}
100%endif
101install -D -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
102mkdir -p %{buildroot}/run/%{name}
103
104mkdir -p %{buildroot}%{_localstatedir}/log/%{name}
105
106
107%pre
108getent group %{name} >/dev/null || groupadd -r %{name}
109getent passwd %{name} >/dev/null || \
110    useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
111    -c "Radicale service account" %{name}
112exit 0
113
114
115%post
116%if %{with systemd}
117%systemd_post %{name}.service
118%else
119if [ $1 -eq 1 ]; then
120  /sbin/chkconfig --add radicale
121fi
122%endif
123
124%preun
125%if %{with systemd}
126%systemd_preun %{name}.service
127%else
128if [ $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
132fi
133%endif
134
135%postun
136%if %{with systemd}
137%systemd_postun_with_restart %{name}.service
138%else
139if [ $1 -gt 0 ]; then
140  /sbin/service radicale condrestart ||:
141fi
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
Note: See TracBrowser for help on using the repository browser.