[packages/libopensync] - added glib patch (fix for build with recent glib) - added python patch (workaround for set being b
qboosh
qboosh at pld-linux.org
Sat Jan 31 15:50:38 CET 2015
commit 70b218e27d975996bd6d0ac5df97bf97f1688331
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jan 31 15:52:50 2015 +0100
- added glib patch (fix for build with recent glib)
- added python patch (workaround for set being builtin in python 2.4+)
- cleanups, updated BRs
- python-plugins dir belongs to libopensync-plugin-python
- release 8
libopensync-glib.patch | 11 +++++++++++
libopensync-python.patch | 20 ++++++++++++++++++++
libopensync.spec | 30 ++++++++++++++----------------
3 files changed, 45 insertions(+), 16 deletions(-)
---
diff --git a/libopensync.spec b/libopensync.spec
index 042c002..c231a9f 100644
--- a/libopensync.spec
+++ b/libopensync.spec
@@ -1,12 +1,12 @@
#
# Conditional build:
-%bcond_without python # don't build python binding
+%bcond_without python # don't build python binding
Summary: Data synchronization framework
Summary(pl.UTF-8): Szkielet do synchronizacji danych
Name: libopensync
Version: 0.39
-Release: 7
+Release: 8
Epoch: 1
License: LGPL v2.1+
Group: Libraries
@@ -14,25 +14,24 @@ Source0: http://www.opensync.org/download/releases/0.39/%{name}-%{version}.tar.b
# Source0-md5: 733211e82b61e2aa575d149dda17d475
Patch0: python-syntax.patch
Patch1: python-noarch-plugins.patch
+Patch2: %{name}-glib.patch
+Patch3: %{name}-python.patch
URL: http://www.opensync.org/
-BuildRequires: autoconf
-BuildRequires: automake
BuildRequires: check
BuildRequires: cmake >= 2.8.2-2
-BuildRequires: glib2-devel >= 1:2.10
-BuildRequires: libint-devel
-BuildRequires: libtool
+BuildRequires: glib2-devel >= 1:2.12
BuildRequires: libxml2-devel >= 1:2.6
BuildRequires: libxslt-devel
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.600
BuildRequires: sqlite3-devel >= 3.3
%if %{with python}
-BuildRequires: python-devel
-BuildRequires: python-modules
+BuildRequires: python-devel >= 2
+BuildRequires: python-modules >= 2
BuildRequires: rpm-pythonprov
BuildRequires: swig-python
%endif
+Requires: glib2 >= 1:2.12
# no such opensync plugins (yet?)
Obsoletes: multisync-ldap
Obsoletes: multisync-opie
@@ -65,7 +64,7 @@ Summary: Header files for opensync library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki opensync
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: glib2-devel >= 1:2.10
+Requires: glib2-devel >= 1:2.12
Obsoletes: libopensync-static
Obsoletes: multisync-devel
Conflicts: libopensync02-devel
@@ -93,16 +92,17 @@ Wiązania Pythona do biblioteki opensync.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
# broken, use fixed from cmake itself
-rm cmake/modules/*Python*.cmake
+%{__rm} cmake/modules/*Python*.cmake
%build
mkdir build
cd build
-%cmake \
- -DPYTHON_VERSION=%{py_ver} \
- ..
+%cmake .. \
+ -DPYTHON_VERSION=%{py_ver}
%{__make}
@@ -118,7 +118,6 @@ rm -rf $RPM_BUILD_ROOT
%py_postclean
install -d $RPM_BUILD_ROOT%{_datadir}/libopensync1/defaults
-install -d $RPM_BUILD_ROOT%{_datadir}/libopensync1/python-plugins
install -d $RPM_BUILD_ROOT%{_libdir}/libopensync1/plugins
install -d $RPM_BUILD_ROOT%{_libdir}/libopensync1/formats
@@ -160,5 +159,4 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{py_sitedir}/_opensync.so
%{py_sitedir}/opensync.py[co]
-%{_datadir}/libopensync1/python-plugins
%endif
diff --git a/libopensync-glib.patch b/libopensync-glib.patch
new file mode 100644
index 0000000..d768f24
--- /dev/null
+++ b/libopensync-glib.patch
@@ -0,0 +1,11 @@
+--- libopensync-0.39/opensync/common/opensync_list.c.orig 2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/opensync/common/opensync_list.c 2015-01-31 13:48:17.947222136 +0100
+@@ -30,7 +30,7 @@
+ * MT safe
+ */
+
+-#include <glib/gmem.h>
++#include <glib.h>
+ #include "opensync_list.h"
+ #include "opensync_internals.h"
+
diff --git a/libopensync-python.patch b/libopensync-python.patch
new file mode 100644
index 0000000..56d9546
--- /dev/null
+++ b/libopensync-python.patch
@@ -0,0 +1,20 @@
+--- libopensync-0.39/wrapper/opensync-error.i.orig 2009-09-20 22:14:18.000000000 +0200
++++ libopensync-0.39/wrapper/opensync-error.i 2015-01-31 14:37:50.320430729 +0100
+@@ -46,7 +46,7 @@
+ osync_error_set_from_error(&self, &source);
+ }
+
+- void set(ErrorType type, const char *msg) {
++ void set_(ErrorType type, const char *msg) {
+ osync_error_set(&self, type, "%s", msg);
+ }
+
+@@ -64,7 +64,7 @@
+ %pythoncode %{
+ # for some reason the OpenSync API only allows setting the msg with a type
+ def __set_msg(self, msg):
+- self.set(self.num, msg)
++ self.set_(self.num, msg)
+
+ def __str__(self):
+ return self.get_name() + ": " + self.get_msg()
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libopensync.git/commitdiff/70b218e27d975996bd6d0ac5df97bf97f1688331
More information about the pld-cvs-commit
mailing list