summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Le Martret <ronan@fridu.net>2013-11-07 09:25:19 +0100
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2013-11-15 12:25:25 -0800
commit12a4a4ffa22eeda92bd30f954c8d59bd99e8d599 (patch)
tree333b45dd0e7fe4d70b0505cea66c9a559cb46b7d
parenta95d28bbba86712bf7332bd764e24be72cedd0f9 (diff)
downloadrpm-12a4a4ffa22eeda92bd30f954c8d59bd99e8d599.tar.gz
rpm-12a4a4ffa22eeda92bd30f954c8d59bd99e8d599.tar.bz2
rpm-12a4a4ffa22eeda92bd30f954c8d59bd99e8d599.zip
- solve bug PTREL-155, build python-rpm.
Change-Id: Idffe011bde3623d20c647aad8c6bac70b07f83f5 Signed-off-by: Ronan Le Martret <ronan@fridu.net>
-rw-r--r--packaging/python-rpm.spec9
-rw-r--r--packaging/rpm.spec10
2 files changed, 16 insertions, 3 deletions
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
diff --git a/packaging/rpm.spec b/packaging/rpm.spec
index b214488cf..56f51b768 100644
--- a/packaging/rpm.spec
+++ b/packaging/rpm.spec
@@ -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