- solve bug PTREL-155, build python-rpm.
authorRonan Le Martret <ronan@fridu.net>
Thu, 7 Nov 2013 08:25:19 +0000 (09:25 +0100)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 15 Nov 2013 20:25:25 +0000 (12:25 -0800)
Change-Id: Idffe011bde3623d20c647aad8c6bac70b07f83f5
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
packaging/python-rpm.spec
packaging/rpm.spec

index f27dd1d37f25a2b9b772c10326784e112da6b7ed..b2ff0dd0b0d7f8ecdc5d20e848f4817b0b1c9dd4 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 b214488cf3343a0faf9ae8b56a2a60cf34a1d395..56f51b76895c88077a49517f87cdb8003b01309d 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,9 @@ 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
@@ -103,6 +107,7 @@ security-related functionality.
 
 %prep
 %setup -q -n rpm-%{version}
+### PREP BEGIN ###
 cp %{SOURCE1001} .
 rm -rf sqlite
 tar xjf %{S:1}
@@ -118,8 +123,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"
@@ -142,6 +149,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