summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorLucas Bickel <hairmare@purplehaze.ch>2012-11-15 22:50:52 +0100
committerZac Medico <zmedico@gentoo.org>2012-11-28 21:58:25 -0800
commitd3540b8aa468e872c6a6b41074c8567f489e9768 (patch)
tree6cda5b600ea19019f17171839117e711c83a11c8 /bin
parenta73d9ae594b24efe35fa8c0c1c00ea06dc80886a (diff)
downloadportage-d3540b8aa468e872c6a6b41074c8567f489e9768.tar.gz
portage-d3540b8aa468e872c6a6b41074c8567f489e9768.tar.bz2
portage-d3540b8aa468e872c6a6b41074c8567f489e9768.zip
fix ebuild rpm command for rpm 4.10.0
* changes dyn_spec to use a sources_dir in the sandbox * remove deprecated Buildroot from specfile * call rpmbuild with --target instead of Buildroot * grab machine_name from $CHOST and use as --target in rpmbuild * use dir in sandbox instead of /usr/src/rpm/RPMS
Diffstat (limited to 'bin')
-rwxr-xr-xbin/misc-functions.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 853489a04..6f8452601 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -1199,7 +1199,7 @@ __dyn_package() {
}
__dyn_spec() {
- local sources_dir=/usr/src/rpm/SOURCES
+ local sources_dir=${T}/rpmbuild/SOURCES
mkdir -p "${sources_dir}"
declare -a tar_args=("${EBUILD}")
[[ -d ${FILESDIR} ]] && tar_args=("${EBUILD}" "${FILESDIR}")
@@ -1215,7 +1215,6 @@ Release: ${PR}
License: GPL
Group: portage/${CATEGORY}
Source: ${PF}.tar.gz
-Buildroot: ${D}
%description
${DESCRIPTION}
@@ -1242,12 +1241,12 @@ __dyn_rpm() {
fi
cd "${T}" || die "cd failed"
- local machine_name=$(uname -m)
- local dest_dir=${EPREFIX}/usr/src/rpm/RPMS/${machine_name}
- addwrite ${EPREFIX}/usr/src/rpm
+ local machine_name=${CHOST%%-*}
+ local dest_dir=${T}/rpmbuild/RPMS/${machine_name}
addwrite "${RPMDIR}"
__dyn_spec
- rpmbuild -bb --clean --rmsource "${PF}.spec" || die "Failed to integrate rpm spec file"
+ HOME=${T} \
+ rpmbuild -bb --clean --rmsource "${PF}.spec" --buildroot "${D}" --target "${CHOST}" || die "Failed to integrate rpm spec file"
install -D "${dest_dir}/${PN}-${PV}-${PR}.${machine_name}.rpm" \
"${RPMDIR}/${CATEGORY}/${PN}-${PV}-${PR}.rpm" || \
die "Failed to move rpm"