public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] proj/portage:master commit in: bin/
@ 2012-11-29  5:37 99% Zac Medico
  0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2012-11-29  5:37 UTC (permalink / raw
  To: gentoo-commits

commit:     0d850ef6ac4e98089e9ff938ebe3573953cabee2
Author:     Lucas Bickel <hairmare <AT> purplehaze <DOT> ch>
AuthorDate: Thu Nov 15 21:50:52 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 05:37:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0d850ef6

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

---
 bin/misc-functions.sh |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 853489a..e0e0c87 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,11 @@ __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"
+	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"


^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-11-29  5:37 99% [gentoo-commits] proj/portage:master commit in: bin/ Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox