%define major 0 %define libname %mklibname opensync %major %define with_python 1 %{?_without_python: %{expand: %%global _with_python 0}} Name: libopensync Version: 0.22 Epoch: 1 Release: %mkrel 3 Summary: Multi-platform PIM synchronization framework Source0: http://www.opensync.org/download/releases/%{version}/%{name}-%{version}.tar.bz2 Source1: opensync.py Patch0: libopensync-python-lib-check-lib64.patch Patch1: libopensync-linkage_fix.diff Patch2: libopensync-python-fix.patch Patch3: libopensync-swig-fix.patch Patch4: libopensync-0.22-unusedvar.patch Patch5: libopensync-swig-fix2.patch URL: http://www.opensync.org/ License: GPLv2+ Group: System/Libraries BuildRequires: bison BuildRequires: libxml2-devel BuildRequires: chrpath BuildRequires: glib2-devel BuildRequires: sqlite3-devel BuildRequires: pkgconfig BuildRequires: swig BuildRequires: autoconf Obsoletes: opensync0 < 0.22-7 Obsoletes: opensync-ipc < 0.22-8 Conflicts: opensync-ipc < 0.22-8 Conflicts: opensync0 < 0.22-7 Obsoletes: opensync1 <= 0.36-1 %description OpenSync is a synchronization framework that is platform and distribution independent. It consists of several plug-ins that can be used to connect to devices, a powerful sync-engine and the framework itself. The synchronization framework is kept very flexible and is capable of synchronizing any type of data, including contacts, calendar, tasks, notes and files. %files %defattr(-,root,root) %{_bindir}/* %{_libdir}/opensync %{_libdir}/osplugin #-------------------------------------------------------- %package -n %{libname} Summary: Dynamic libraries from %{name} Epoch: 0 Group: System/Libraries Conflicts: opensync0 < 0.22-7 %description -n %{libname} Dynamic libraries from %{name}. %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.%{major}* #------------------------------------------------------------- %package -n %{libname}-devel Summary: Header files and static libraries from %{name} Group: Development/C Requires: %{libname} = %{version} Provides: %{name}-devel = %{version} Provides: opensync0-devel = %{version}-%{release} Obsoletes: opensync0 < 0.22-7 %description -n %{libname}-devel Libraries and includes files for developing programs based on %{name}. %files -n %{libname}-devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc #------------------------------------------------------------- %if %{with_python} %package python Summary: Python bindings for %{name} Group: Development/Python Obsoletes: opensync0-python < 0.22-7 %py_requires -d %description python Python bindings for %{name}. %files python %defattr(-,root,root) %{py_platsitedir}/* %endif #------------------------------------------------------------- %prep %setup -q %patch0 -p1 %patch1 -p0 %patch2 -p0 %patch3 -p1 %patch4 -p1 %patch5 -p1 %build autoreconf -fis #libopensync doesn't compile with glib > 2.32 because of -Werror=deprecated-declarations #so we need to disable that error CFLAGS=' -Wno-error=deprecated-declarations' export CFLAGS %configure2_5x \ %if %{with_python} --enable-python \ %endif --disable-debug \ --enable-engine \ --enable-tools %make pythondir=%{py_platsitedir} %install %makeinstall_std pythondir=%{py_platsitedir} find %{buildroot} -name *.la -delete rm -f %{buildroot}%{py_platsitedir}/opensync.py install %{SOURCE1} %{buildroot}%{py_platsitedir}/opensync.py %changelog * Thu Feb 02 2012 juancho <juancho> 1:0.22-3.mga2 + Revision: 204005 - Fix build against glib > 2.32 (deprecated methods) + fwang <fwang> - drop .la files * Tue Oct 11 2011 juancho <juancho> 1:0.22-1.mga2 + Revision: 153983 - Added Requires: Provides:opensync0-devel to devel package - imported package libopensync