Blob Blame Raw
Name:		openxcap
Version:	2.2.0
Release:	2%{?dist}
Summary:	Fully featured XCAP server
License:	GPLv2
URL:		http://openxcap.org/
VCS:		scm:git:https://github.com/AGProjects/openxcap.git
Source0:	https://github.com/AGProjects/%{name}/archive/release-%{version}/%{name}-%{version}.tar.gz
Source2:	%{name}.service
Source3:	%{name}.tmpfiles.conf

BuildArch:      noarch
BuildRequires:	python2-devel
BuildRequires:	python2-setuptools
BuildRequires:	systemd
Requires:	python2 >= 2.5
Requires:	python2-application >= 1.2.8
Requires:	python2-gnutls >= 1.1.9
Requires:	python2-lxml >= 2.0.7
Requires:	python2-mysql >= 1.2.2
Requires:	python2-sqlobject
Requires:	python2-twisted >= 8.1.0
Requires:	python2-zope-interface

# Users and groups
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd


%description
Fully featured XCAP server. An XCAP server is used by SIP SIMPLE clients and
servers to manage buddy lists and policy for subscriptions to presence or
other type of events published using SIP protocol.

XCAP protocol allows a client to read, write and modify application
configuration data stored in XML format on a server. XCAP maps XML document
sub-trees and element attributes to HTTP URIs, so that these components can
be directly accessed by HTTP. An XCAP server is used by the XCAP clients to
store data like Presence policy in combination with a SIP Presence server
that supports PUBLISH/SUBSCRIBE/NOTIFY methods to provide a complete SIP
SIMPLE server solution.


%prep
%autosetup -p1 -n %{name}-release-%{version}


%build
%py2_build


%install
%py2_install

install -D -p -m 0644 config.ini.sample %{buildroot}%{_sysconfdir}/%{name}/config.ini
install -d %{buildroot}%{_sysconfdir}/%{name}/tls
install -D -p -m 0644 scripts/mysql-create-tables.sql %{buildroot}%{_datadir}/%{name}/mysql-create-tables.sql
install -D -p -m 0644 scripts/mysql-create-user.sql %{buildroot}%{_datadir}/%{name}/mysql-create-user.sql
install -d %{buildroot}%{_localstatedir}/run/%{name}
install -d %{buildroot}%{_localstatedir}/log/%{name}
# install systemd files
install -D -m 0644 -p %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
install -D -m 0644 -p %{SOURCE3} %{buildroot}%{_tmpfilesdir}/%{name}.conf



%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
useradd -r -g %{name} -d %{_localstatedir}/run/%{name} -s /sbin/nologin \
-c "OpenXCAP Server" %{name} 2>/dev/null || :


%post
%systemd_post %{name}.service


%preun
%systemd_preun %{name}.service


%files
%license LICENSE
%doc ChangeLog README TODO opensips/opensips.cfg
%dir %{_datadir}/%{name}
%{_bindir}/%{name}
%{_datadir}/%{name}/mysql-create-tables.sql
%{_datadir}/%{name}/mysql-create-user.sql
%{python2_sitelib}/xcap
%{python2_sitelib}/%{name}-%{version}-*.egg-info

%dir %attr(0755, %{name}, %{name}) %{_localstatedir}/log/%{name}
%ghost %dir %attr(0755, %{name}, %{name}) %{_localstatedir}/run/%{name}
%dir %attr(0755, %{name}, %{name}) %{_sysconfdir}/%{name}
%dir %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/tls
%config(noreplace) %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/config.ini
%{_unitdir}/%{name}.service
%{_tmpfilesdir}/%{name}.conf


%changelog
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Tue Sep 04 2018 Peter Lemenkov <lemenkov@gmail.com> - 2.2.0-1
- Ver. 2.2.0
- Drop pre-EL6/F-17 support

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Feb 20 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.1-12
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 31 2013 Peter Lemenkov <lemenkov@gmail.com> - 2.0.1-4
- Fixed FTBFS (rhbz #992412)
- Marked directory /var/run/openxcap as ghost (rhbz #656651)
- Switched to systemd-macros (rhbz #850259)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Feb  4 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 2.0.1-2
- Patch to add compatibility with python-pillow (see rhbz #895773)

* Sat Aug 18 2012 Peter Lemenkov <lemenkov@gmail.com> - 2.0.1-1
- Ver. 2.0.1
- Switch to systemd
- Drop dependency on PyXML (see rhbz #844538)

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Thu Sep 24 2009 Peter Lemenkov <lemenkov@gmail.com> - 1.1.2-1
- Initial package