File synce-sync-engine.spec of Package synce-sync-engine
#
# spec file for package synce-sync-engine
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if ! 0%{?python_sitelib:1}
%define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib();")
%endif
Name: synce-sync-engine
Version: 0.15.1
Release: 0
Summary: SynCE synchronization engine
License: GPL-2.0+
Group: Hardware/Mobile
Url: http://www.synce.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://downloads.sourceforge.net/project/synce/SynCE/synce-sync-engine/%{name}-%{version}.tar.gz
BuildRequires: dbus-1
BuildRequires: libopensync-devel
BuildRequires: libopensync-plugin-python-module
BuildRequires: python-devel >= 2.2
BuildRequires: python-setuptools
Requires: dbus-1-python
Requires: libxslt-python
Requires: python-rapi2
Requires: python-rra
Requires: python-rtfcomp
Recommends: libopensync-plugin-synce
%py_requires
%description
SynCE synchronization engine. Must be running in order to sync with a Windows Mobile
2005 or newer device.
%package -n libopensync-plugin-synce
Summary: Opensync plugin for SynCE
Group: Productivity/Other
Requires: %{name} = %{version}
Requires: libopensync-plugin-python-module
%description -n libopensync-plugin-synce
This plug-in allows applications using OpenSync to synchronize to and
from a Windows Mobile 2005 or newer device.
%prep
%setup -q
%build
export CFLAGS="%{optflags}"
python setup.py build
%install
python setup.py install --root=%{buildroot} \
--prefix=%{_prefix}
install -m644 -Dv config/org.synce.SyncEngine.service %{buildroot}%{_datadir}/dbus-1/services/org.synce.SyncEngine.service
install -m644 -Dv config/syncengine.conf.xml %{buildroot}%{_sysconfdir}/syncengine.conf.xml
rm -rf %{buildroot}%{_datadir}/doc/sync-engine
OPENSYNC_VERSION=$(pkg-config --modversion opensync-1.0 | sed 's/\.//g')
if [ $OPENSYNC_VERSION -ge 030 ]; then
install -m644 -Dv plugins/synce-opensync-plugin-3x.py %{buildroot}%{_libdir}/opensync/python-plugins/synce-opensync-plugin-3x.py
else
install -m644 -Dv plugins/synce-opensync-plugin-2x.py %{buildroot}%{_libdir}/opensync/python-plugins/synce-opensync-plugin-2x.py
fi
rm -rf %{buildroot}%{python_sitelib}/plugins
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc CHANGELOG COPYING
%{_bindir}/*
%{python_sitelib}/SyncEngine
%{python_sitelib}/synce_sync_engine-%{version}-py%{py_ver}.egg-info
%{_datadir}/dbus-1/services/org.synce.SyncEngine.service
%config(noreplace) %{_sysconfdir}/syncengine.conf.xml
%files -n libopensync-plugin-synce
%defattr(-,root,root)
%{_libdir}/opensync/python-plugins/synce-*
%changelog