From a8b744d4aeea0db612df50cfae1c992cec27f06db5c2d32ca8732417a54757f4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 9 Jan 2012 16:12:23 +0000 Subject: [PATCH] - add a python3-rpm subspecfile OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=171 --- python3-abi-kind.diff | 11 ++++++ python3-rpm.spec | 83 +++++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 1 + rpm.changes | 5 +++ rpm.spec | 5 ++- 5 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 python3-abi-kind.diff create mode 100644 python3-rpm.spec diff --git a/python3-abi-kind.diff b/python3-abi-kind.diff new file mode 100644 index 0000000..5ed4310 --- /dev/null +++ b/python3-abi-kind.diff @@ -0,0 +1,11 @@ +--- configure.ac ++++ configure.ac +@@ -537,7 +537,7 @@ + ]) + CPPFLAGS="$save_CPPFLAGS" + save_LIBS="$LIBS" +- AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[ ++ AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION}mu python${PYTHON_VERSION} python],[ + WITH_PYTHON_LIB="$ac_res" + ],[AC_MSG_ERROR([missing python library]) + ]) diff --git a/python3-rpm.spec b/python3-rpm.spec new file mode 100644 index 0000000..e0c01e5 --- /dev/null +++ b/python3-rpm.spec @@ -0,0 +1,83 @@ +# +# spec file for package python3-rpm +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: python3-rpm +BuildRequires: file-devel +BuildRequires: libacl-devel +BuildRequires: libbz2-devel +BuildRequires: libcap-devel +BuildRequires: libelf-devel +BuildRequires: libselinux-devel +BuildRequires: libsemanage-devel +BuildRequires: libtool +BuildRequires: lua51-devel +BuildRequires: ncurses-devel +BuildRequires: popt-devel +BuildRequires: python3-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel +#!BuildIgnore: rpmlint-Factory +Summary: Python Bindings for Manipulating RPM Packages +License: GPL-2.0+ +Group: System/Packages +Version: 4.9.1.2 +Release: 0 +Requires: rpm = %{version} +Source99: rpm.spec +%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} +%global with_python 1 + +%description +The python3-rpm package contains a module that permits applications +written in the Python programming language to use the interface +supplied by RPM Package Manager libraries. + +This package should be installed if you want to develop Python programs +that will manipulate RPM packages and databases. + + + +Authors: +-------- + Erik Troan + Marc Ewing + +%prep +%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/lib +# only installing in python/ does not work because rpm links against +# installed libs at install time +make DESTDIR="$RPM_BUILD_ROOT" install +find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm +pushd $RPM_BUILD_ROOT/%_libdir/python3*/site-packages/rpm +rm -f _rpmmodule.a _rpmmodule.la +python3 %_libdir/python3*/py_compile.py *.py +python3 -O %_libdir/python3*/py_compile.py *.py +popd + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_libdir}/python*/*/* + +%changelog diff --git a/rpm-python.spec b/rpm-python.spec index 4178715..a3dbe6f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm-python BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm.changes b/rpm.changes index 9929626..7bff3de 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 9 17:12:05 CET 2012 - dmueller@suse.de + +- add a python3-rpm subspecfile + ------------------------------------------------------------------- Sat Jan 7 10:50:31 CET 2012 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index cde3558..93ac95d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel @@ -122,6 +123,7 @@ Patch77: mono-find-requires.diff Patch78: debugedit-stabs-warning.diff Patch79: headerchk.diff Patch80: rpm-deptracking.patch +Patch81: python3-abi-kind.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -183,7 +185,8 @@ rm -f rpmdb/db.h %patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 -%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -P 80 +%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 +%patch -P 80 -P 81 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov