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
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
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
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
%prep
%setup -q -n rpm-%{version}
+### PREP BEGIN ###
cp %{SOURCE1001} .
rm -rf sqlite
tar xjf %{S:1}
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"
--with-acl --with-cap --enable-shared %{?with_python: --enable-python} --with-msm $BUILDTARGET
make %{?_smp_mflags}
+### BUILD END ###
%install
mkdir -p %{buildroot}/usr/lib