radicale-vl.spec 5.8 KB

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