summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-21 15:37:03 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-02 16:44:44 -0800
commit510367c3a496b4c48eaffd565576c0d36e386699 (patch)
treea3f00ff87637f2d5cf4b993ddd02bf18bb00953c
parent3beee230178cbefb2b83303e3f7ba20884ecc581 (diff)
downloadrpm-510367c3a496b4c48eaffd565576c0d36e386699.tar.gz
rpm-510367c3a496b4c48eaffd565576c0d36e386699.tar.bz2
rpm-510367c3a496b4c48eaffd565576c0d36e386699.zip
add python-rpm spec
-rw-r--r--packaging/python-rpm.spec53
-rw-r--r--packaging/rpm.spec2
2 files changed, 54 insertions, 1 deletions
diff --git a/packaging/python-rpm.spec b/packaging/python-rpm.spec
new file mode 100644
index 000000000..fa82a0e98
--- /dev/null
+++ b/packaging/python-rpm.spec
@@ -0,0 +1,53 @@
+Name: python-rpm
+Version: 4.10.90
+Release: 0
+Summary: Python Bindings for Manipulating RPM Packages
+License: GPL-2.0+
+Group: System/Packages
+Source99: rpm.spec
+BuildRequires: gettext-tools
+BuildRequires: file-devel
+BuildRequires: libacl-devel
+BuildRequires: bzip2-devel
+BuildRequires: libcap-devel
+BuildRequires: libelf-devel
+BuildRequires: libtool
+BuildRequires: lua-devel
+BuildRequires: ncurses-devel
+BuildRequires: popt-devel
+BuildRequires: python-devel
+BuildRequires: xz-devel
+BuildRequires: zlib-devel
+BuildRequires: nss-devel
+Requires: rpm = %{version}
+%{expand:%(sed -n -e '/^Source0:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)}
+%global with_python 2
+
+%description
+The python-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.
+
+%prep
+%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')}
+
+%install
+mkdir -p %{buildroot}%{_prefix}/lib
+# only installing in python/ does not work because rpm links against
+# installed libs at install time
+%make_install
+find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python*/site-packages/rpm/\* -print0 | xargs -0 rm
+pushd %{buildroot}/%{_libdir}/python*/site-packages/rpm
+rm -f _rpmmodule.a _rpmmodule.la
+#python %{_libdir}/python*/py_compile.py *.py
+#python -O %{_libdir}/python*/py_compile.py *.py
+popd
+
+%files
+%defattr(-,root,root)
+%{_libdir}/python*/*/*
+
+%changelog
diff --git a/packaging/rpm.spec b/packaging/rpm.spec
index 97e8f6fa2..3e3ec5e0f 100644
--- a/packaging/rpm.spec
+++ b/packaging/rpm.spec
@@ -36,7 +36,7 @@ Version: 4.10.90
Release: 0
Source0: rpm-%{version}.tar.bz2
Source1: db-4.8.30.tar.bz2
-Source2: db-4.8.30-integration.dif
+Source2: db-4.8.30-integration.dif
Source4: rpm-tizen_macros
Source5: rpmsort
Source6: symset-table