Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > b39c671c74c2499519239742146f5f7d > files > 6

radicale-1.1.1-1.2.mga5.src.rpm

%define oname	Radicale

Summary:	Simple Calendar and Contact Server
Name:		radicale
Version:	1.1.1
%define subrel	2
Release:	%mkrel 1
License:	GPLv3+
Group:		System/Servers
URL:		http://radicale.org/
Source0:	http://pypi.python.org/packages/source/R/%{oname}/%{oname}-%{version}.tar.gz
Source1:	radicale.service
Source2:	radicale.logrotate
Source3:	radicale.tmpfiles
# Patch0: config adjustments for systemwide installation
Patch0:		radicale-0.10-systemwide.patch
Patch1:         radicale-1.1.1-CVE-2017-8342.patch
BuildArch:	noarch
BuildRequires:	python3-devel
Requires(pre):	rpm-helper >= %{rpmhelper_required_version}
Requires(preun):rpm-helper >= %{rpmhelper_required_version}
Requires(post):	rpm-helper >= %{rpmhelper_required_version}
Recommends:	python3-OpenSSL
Recommends:	python3-passlib
Recommends:	python3-requests

%description
The Radicale Project is a complete CalDAV (calendar) and CardDAV (contact)
server solution.

Calendars and address books are available for both local and remote access,
possibly limited through authentication policies. They can be viewed and
edited by calendar and contact clients on mobile phones or computers.

%prep
%setup -q -n %{oname}-%{version}
%apply_patches

%build
%{__python3} setup.py build

%install
%{__python3} setup.py install \
	--root=%{buildroot} \
	--prefix=%{_prefix} \
	--skip-build

#dir for collections
install -dm0755 %{buildroot}%{_localstatedir}/lib/%{name}/collections

#config
install -Dm0640 config %{buildroot}%{_sysconfdir}/%{name}/config

#logging
install -Dm0644 logging %{buildroot}%{_sysconfdir}/%{name}/logging

#logrotate
install -Dm0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}

#systemd service file
install -Dm0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service

#tmpfile
install -Dm0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/%{name}.conf

#for ghost file
mkdir -p %{buildroot}%{_logdir}/%{name}
touch %{buildroot}%{_logdir}/%{name}/%{name}.log

%pre
%_pre_useradd %{name} %{_localstatedir}/lib/%{name} %{_sbindir}/nologin
%_pre_groupadd %{name}

%post
%create_ghostfile %{_logdir}/%{name}/%{name}.log %{name} %{name} 0600
%_tmpfilescreate %{name}
%_post_service %{name}

%preun
%_preun_service %{name}

%files
%doc README
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%{_tmpfilesdir}/%{name}.conf
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %attr(640, radicale, radicale) %{_sysconfdir}/%{name}/config
%config(noreplace) %attr(640, radicale, radicale) %{_sysconfdir}/%{name}/logging
%dir %attr(700, radicale, radicale) %{_localstatedir}/lib/%{name}/
%dir %attr(700, radicale, radicale) %{_localstatedir}/lib/%{name}/collections/
%dir %attr(700, radicale, radicale) %{_logdir}/%{name}/
%ghost %attr(600, radicale, radicale) %{_logdir}/%{name}/%{name}.log
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{oname}-%{version}-py%{python3_version}.egg-info


%changelog
* Mon May 01 2017 neoclust <neoclust> 1.1.1-1.2.mga5
+ Revision: 1098174
- Add P1 - Fixes CVE-2017-8342 (mga#20759)

* Wed Feb 03 2016 wally <wally> 1.1.1-1.1.mga5
+ Revision: 934014
- update recommended pkgs
- fix conf file permissions

* Sat Jan 30 2016 wally <wally> 1.1.1-1.mga5
+ Revision: 929191
- new bug fix release 1.1.1 (fixes CVE-2015-874[78], mga#17452)
- switch to python3

* Wed Oct 15 2014 umeabot <umeabot> 0.7.1-8.mga5
+ Revision: 747548
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 0.7.1-7.mga5
+ Revision: 730084
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 0.7.1-6.mga5
+ Revision: 688602
- Mageia 5 Mass Rebuild

  + tv <tv>
    - s/uggests:/Recommends:/

  + pterjan <pterjan>
    - Rebuild for new Python

* Tue Oct 22 2013 umeabot <umeabot> 0.7.1-4.mga4
+ Revision: 544446
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 pterjan <pterjan> 0.7.1-3.mga4
+ Revision: 499811
- Rebuild to add different pythonegg provides for python 2 and 3

* Tue Jun 04 2013 wally <wally> 0.7.1-2.mga4
+ Revision: 437252
- fix typo in systemd unit file

* Sat Jun 01 2013 wally <wally> 0.7.1-1.mga4
+ Revision: 434133
- import radicale (based on .specs from Mandriva and Fedora)