From 12a4a4ffa22eeda92bd30f954c8d59bd99e8d599 Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Thu, 7 Nov 2013 09:25:19 +0100 Subject: - solve bug PTREL-155, build python-rpm. Change-Id: Idffe011bde3623d20c647aad8c6bac70b07f83f5 Signed-off-by: Ronan Le Martret --- packaging/python-rpm.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'packaging/python-rpm.spec') diff --git a/packaging/python-rpm.spec b/packaging/python-rpm.spec index f27dd1d37..b2ff0dd0b 100644 --- a/packaging/python-rpm.spec +++ b/packaging/python-rpm.spec @@ -24,7 +24,8 @@ BuildRequires: libxml2-devel BuildRequires: libattr-devel BuildRequires: pkgconfig(libsmack) Requires: rpm = %{version} -%{expand:%(sed -n -e '/^Source0:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} +%{expand:%(sed -n -e '/^### SOURCES BEGIN ###/,/^### SOURCES END ###/p' <%_sourcedir/rpm.spec)} +Source0: rpm-%{version}.tar.bz2 %global with_python 2 %description @@ -36,7 +37,11 @@ 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')} +%setup -q -n rpm-%{version} +%{expand:%(sed -n -e '/^### PREP BEGIN ###/,/^### PREP END ###/p' <%_sourcedir/rpm.spec)} + +%build +%{expand:%(sed -n -e '/^### BUILD BEGIN ###/,/^### BUILD END ###/p' <%_sourcedir/rpm.spec)} %install mkdir -p %{buildroot}%{_prefix}/lib -- cgit v1.2.3