Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Thu, 29 Nov 2012 05:38:04
Message-Id: 1354167425.0d850ef6ac4e98089e9ff938ebe3573953cabee2.zmedico@gentoo
1 commit: 0d850ef6ac4e98089e9ff938ebe3573953cabee2
2 Author: Lucas Bickel <hairmare <AT> purplehaze <DOT> ch>
3 AuthorDate: Thu Nov 15 21:50:52 2012 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 29 05:37:05 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0d850ef6
7
8 fix ebuild rpm command for rpm 4.10.0
9
10 * changes dyn_spec to use a sources_dir in the sandbox
11 * remove deprecated Buildroot from specfile
12 * call rpmbuild with --target instead of Buildroot
13 * grab machine_name from $CHOST and use as --target in rpmbuild
14 * use dir in sandbox instead of /usr/src/rpm/RPMS
15
16 ---
17 bin/misc-functions.sh | 10 ++++------
18 1 files changed, 4 insertions(+), 6 deletions(-)
19
20 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
21 index 853489a..e0e0c87 100755
22 --- a/bin/misc-functions.sh
23 +++ b/bin/misc-functions.sh
24 @@ -1199,7 +1199,7 @@ __dyn_package() {
25 }
26
27 __dyn_spec() {
28 - local sources_dir=/usr/src/rpm/SOURCES
29 + local sources_dir=${T}/rpmbuild/SOURCES
30 mkdir -p "${sources_dir}"
31 declare -a tar_args=("${EBUILD}")
32 [[ -d ${FILESDIR} ]] && tar_args=("${EBUILD}" "${FILESDIR}")
33 @@ -1215,7 +1215,6 @@ Release: ${PR}
34 License: GPL
35 Group: portage/${CATEGORY}
36 Source: ${PF}.tar.gz
37 -Buildroot: ${D}
38 %description
39 ${DESCRIPTION}
40
41 @@ -1242,12 +1241,11 @@ __dyn_rpm() {
42 fi
43
44 cd "${T}" || die "cd failed"
45 - local machine_name=$(uname -m)
46 - local dest_dir=${EPREFIX}/usr/src/rpm/RPMS/${machine_name}
47 - addwrite ${EPREFIX}/usr/src/rpm
48 + local machine_name=${CHOST%%-*}
49 + local dest_dir=${T}/rpmbuild/RPMS/${machine_name}
50 addwrite "${RPMDIR}"
51 __dyn_spec
52 - rpmbuild -bb --clean --rmsource "${PF}.spec" || die "Failed to integrate rpm spec file"
53 + rpmbuild -bb --clean --rmsource "${PF}.spec" --buildroot "${D}" --target "${CHOST}" || die "Failed to integrate rpm spec file"
54 install -D "${dest_dir}/${PN}-${PV}-${PR}.${machine_name}.rpm" \
55 "${RPMDIR}/${CATEGORY}/${PN}-${PV}-${PR}.rpm" || \
56 die "Failed to move rpm"