File synce-sync-engine.spec of Package synce-sync-engine

#
# spec file for package synce-sync-engine (Version 0.15.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#

Name:           synce-sync-engine
Version:        0.15.1
Release:        1
License:        GPLv2+
Summary:        SynCE synchronization engine
Url:            http://www.synce.org
Group:          Hardware/Mobile
Source0:        %{name}-%{version}.tar.bz2
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
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Vendor:         The SynCE Project

%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
openSUSE Build Service is sponsored by