Fix the python-rpm spec to fix package build of python-rpm for 82/16882/1
authorGraydon, Tracy <tracy.graydon@intel.com>
Mon, 24 Feb 2014 23:06:44 +0000 (18:06 -0500)
committerGraydon, Tracy <tracy.graydon@intel.com>
Wed, 26 Feb 2014 02:14:57 +0000 (21:14 -0500)
Tizen:IVI:Genivi

Change-Id: I910b661c2aa8044e5e3284effc4f2ac5e31078c3

packaging/python-rpm.spec
packaging/rpm.spec

index f27dd1d..b2ff0dd 100644 (file)
@@ -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
index 72010bd..f94b3ea 100644 (file)
@@ -36,7 +36,8 @@ BuildRequires:  pkgconfig(libsmack)
 
 Provides:       rpminst
 Provides:          rpm-libs
-Source0:        rpm-%{version}.tar.bz2
+
+### SOURCES BEGIN ###
 Source1:               db-4.8.30.tar.bz2
 Source2:           db-4.8.30-integration.dif
 Source4:        rpm-tizen_macros
@@ -45,6 +46,8 @@ Source13:         find-docs.sh
 Source22:          device-sec-policy
 Source23:       find-provides.ksyms
 Source1001:    rpm.manifest
+### SOURCES END ###
+Source0:        rpm-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #
 # avoid bootstrapping problem
@@ -106,6 +109,7 @@ security-related functionality.
 
 %prep
 %setup -q -n rpm-%{version}
+### PREP BEGIN ###
 cp %{SOURCE1001} .
 rm -rf sqlite
 tar xjf %{S:1}
@@ -121,8 +125,10 @@ fi
 cp -a %{SOURCE4} tizen_macros
 rm -f m4/libtool.m4
 rm -f m4/lt*.m4
+### PREP END ###
 
 %build
+### BUILD BEGIN ###
 CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
 export CPPFLAGS 
 export CFLAGS="%{optflags} -ffunction-sections"
@@ -145,6 +151,7 @@ autoreconf -i -f
 --with-acl --with-cap  --enable-shared %{?with_python: --enable-python} --with-msm $BUILDTARGET
 
 make %{?_smp_mflags}
+### BUILD END ###
 
 %install
 mkdir -p %{buildroot}/usr/lib