# # spec file for package rpm-python (Version 4.4.2.3) # # Copyright (c) 2008 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/ # # norootforbuild Name: rpm-python BuildRequires: libbz2-devel libelf-devel libselinux-devel lzma-alpha-devel ncurses-devel python-devel zlib-devel License: GPL v2 or later Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2.3 Release: 8 Requires: rpm = %{version} %py_requires Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} %description The rpm-python 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}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm pushd $RPM_BUILD_ROOT/%py_sitedir/rpm rm -f _rpmmodule.a _rpmmodule.la python %py_libdir/py_compile.py *.py python -O %py_libdir/py_compile.py *.py popd %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_libdir}/python* %changelog * Wed Oct 08 2008 cthiel@suse.de - added libelf-devel to BuildRequires to fix build * Thu Sep 11 2008 mls@suse.de - update to 4.4.2.3 to get rid of >50 patches * Sat Aug 30 2008 cthiel@suse.de - add libselinux-devel to BuildRequires * Thu Aug 07 2008 dmueller@suse.de - fix build against python 2.6 * Thu Mar 27 2008 coolo@suse.de - fix buildrequires * Fri May 25 2007 mls@suse.de - fix unicode queries * Fri Mar 30 2007 rguenther@suse.de - add ncurses-devel and zlib-devel BuildRequires. * Thu Oct 19 2006 mls@suse.de - use rpm.spec for building instead of duplication everything - delete superfluous .a and .la files [#202604] - create .pyc and .pyo files [#205711] * Mon Oct 16 2006 schwab@suse.de - Make sure config.rpath is present. * Fri Sep 22 2006 aj@suse.de - Fix for python2.5. * Thu Sep 21 2006 lnussel@suse.de - do not package beecrypt python bindings as libbeecrypt is not packaged either - fix literal %%{version} in Requires tag * Thu Sep 21 2006 lnussel@suse.de - fix build with python 2.5 by overriding autodetection * Tue Sep 19 2006 rguenther@suse.de - split from rpm package