packages: libplist/libplist.spec - add cython bindings (should it be differ...

glen glen at pld-linux.org
Thu Mar 29 18:20:52 CEST 2012


Author: glen                         Date: Thu Mar 29 16:20:52 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add cython bindings (should it be differen pkg?)

---- Files affected:
packages/libplist:
   libplist.spec (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: packages/libplist/libplist.spec
diff -u packages/libplist/libplist.spec:1.7 packages/libplist/libplist.spec:1.8
--- packages/libplist/libplist.spec:1.7	Sat Mar 24 14:30:38 2012
+++ packages/libplist/libplist.spec	Thu Mar 29 18:20:47 2012
@@ -1,9 +1,14 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	swig	# build with Swig
+%bcond_without	cython	# build with Cython
+
 Summary:	Library for manipulating Apple Property Lists
 Summary(pl.UTF-8):	Biblioteka do manipulowania Apple Property Lists
 Name:		libplist
 Version:	1.8
-Release:	1
+Release:	2
 License:	LGPL v2+
 Group:		Libraries
 Source0:	http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
@@ -14,10 +19,12 @@
 BuildRequires:	libstdc++-devel
 BuildRequires:	libxml2-devel >= 1:2.6.30
 BuildRequires:	pkgconfig
+%{?with_cython:BuildRequires:	python-Cython}
 BuildRequires:	python-devel
 BuildRequires:	python-modules
 BuildRequires:	rpm-pythonprov
-BuildRequires:	swig-python
+BuildRequires:	rpmbuild(macros) >= 1.600
+%{?with_swig:BuildRequires:	swig-python}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -60,8 +67,8 @@
 install -d build
 cd build
 %cmake \
-	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-	-DCMAKE_INSTALL_LIBDIR=%{_lib} \
+	-DENABLE_SWIG=%{!?with_swig:NO}%{?with_swig:YES} \
+	-DENABLE_CYTHON=%{!?with_cython:NO}%{?with_cython:YES} \
 	../
 
 %{__make}
@@ -76,6 +83,14 @@
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_postclean
 
+# cmake sucks, fix perms
+%if %{with cython}
+chmod a+x $RPM_BUILD_ROOT%{py_sitedir}/plist.so
+%endif
+%if %{with swig}
+chmod a+x $RPM_BUILD_ROOT%{py_sitedir}/plist/_plist.so
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -99,11 +114,18 @@
 %{_pkgconfigdir}/libplist++.pc
 %{_pkgconfigdir}/libplist.pc
 
+%if %{with cython} || %{with swig}
 %files -n python-plist
 %defattr(644,root,root,755)
+%if %{with cython}
+%attr(755,root,root) %{py_sitedir}/plist.so
+%endif
+%if %{with swig}
 %dir %{py_sitedir}/plist
 %attr(755,root,root) %{py_sitedir}/plist/_plist.so
 %{py_sitedir}/plist/*.py[co]
+%endif
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -111,6 +133,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.8  2012/03/29 16:20:47  glen
+- add cython bindings (should it be differen pkg?)
+
 Revision 1.7  2012/03/24 13:30:38  glen
 - up to 1.8
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/libplist/libplist.spec?r1=1.7&r2=1.8



More information about the pld-cvs-commit mailing list