From 36ad514ebcc11f3344157bee97e48258d76d1fcd Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mar 09 2016 15:10:14 +0000 Subject: package python3 bindings --- diff --git a/liborcus.spec b/liborcus.spec index 893fbeb..5be60f4 100644 --- a/liborcus.spec +++ b/liborcus.spec @@ -2,6 +2,8 @@ # build conversion tools %bcond_without convtools +# build python3 bindings +%bcond_without python Name: liborcus Version: 0.11.0 @@ -19,6 +21,9 @@ BuildRequires: help2man BuildRequires: pkgconfig(libixion-0.11) %endif BuildRequires: pkgconfig(mdds-1.0) +%if %{with python} +BuildRequires: pkgconfig(python3) +%endif BuildRequires: pkgconfig(zlib) Patch0: 0001-Fix-for-OSX-build-inside-LibreOffice.patch @@ -54,17 +59,29 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Helper tools for %{name} and converters of various file formats to HTML and text. +%if %{with python} +%package python3 +Summary: Python 3 bindings for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description python3 +Python 3 bindings for %{name}. +%endif + %prep %autosetup -p1 cp %{SOURCE1} . %if %{without convtools} -%global condopts --disable-spreadsheet-model +%global condopts %{?condopts} --disable-spreadsheet-model +%endif +%if %{without python} +%global condopts %{?condopts} --disable-python %endif %build %configure --disable-debug --disable-silent-rules --disable-static \ - --disable-werror --with-pic --disable-python %{?condopts} + --disable-werror --with-pic %{?condopts} sed -i \ -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ @@ -83,7 +100,7 @@ help2man -N -n 'convert an XML file' -o orcus-xml.1 ./src/.libs/orcus-xml %install make install DESTDIR=%{buildroot} -rm -f %{buildroot}/%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/*.la %{buildroot}%{python3_sitearch}/*.la %if %{with convtools} install -m 0755 -d %{buildroot}/%{_mandir}/man1 @@ -148,6 +165,14 @@ make check %{?_smp_mflags} %{_mandir}/man1/orcus-xml.1* %endif +%if %{with python} +%files python3 +%{python3_sitearch}/_orcus.so +%{python3_sitearch}/_orcus_json.so +%{python3_sitelib}/orcus/__init__.py +%{python3_sitelib}/orcus/json.py +%endif + %changelog * Tue Mar 08 2016 David Tardon - 0.11.0-1 - new upstream release