diff options
author | Agostino Sarubbo <ago@gentoo.org> | 2012-11-14 22:32:55 +0000 |
---|---|---|
committer | Agostino Sarubbo <ago@gentoo.org> | 2012-11-14 22:32:55 +0000 |
commit | 288480754002fc94e3408b9fe7c1456ddc03d1e6 (patch) | |
tree | 1c4779c21f8b7dd9685eaf31f99cc1b1b0aa4f42 /app-office/libreoffice/files | |
parent | Stable for x86, wrt bug #441456 (diff) | |
download | gentoo-2-288480754002fc94e3408b9fe7c1456ddc03d1e6.tar.gz gentoo-2-288480754002fc94e3408b9fe7c1456ddc03d1e6.tar.bz2 gentoo-2-288480754002fc94e3408b9fe7c1456ddc03d1e6.zip |
Make the generator script more usable
(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-office/libreoffice/files')
-rw-r--r-- | app-office/libreoffice/files/generate_libreoffice_package.sh | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/app-office/libreoffice/files/generate_libreoffice_package.sh b/app-office/libreoffice/files/generate_libreoffice_package.sh index 21f64781e543..82d8175f65c3 100644 --- a/app-office/libreoffice/files/generate_libreoffice_package.sh +++ b/app-office/libreoffice/files/generate_libreoffice_package.sh @@ -1,7 +1,7 @@ #!/bin/bash # important: you need to use the most general CFLAGS to build the packages -# recommendation: +# recommendation: # * for x86 : CFLAGS="-march=i586 -mtune=generic -O2 -pipe -g" # * for amd64: CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -g" @@ -24,49 +24,58 @@ IUSES_NG="-gnome -eds" IUSES_K="kde" IUSES_NK="-kde" +if [ -f /etc/portage/package.use ] ; then + echo "Please save your package.use and make it as a directory" + exit 1 +fi + mkdir -p /etc/portage/package.use/ +OPTS="-v" + +MYPKGDIR="$( emerge --info | grep PKGDIR | sed "s:PKGDIR=::;s:\"::g" )" + # compile the flavor echo "Base" echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > /etc/portage/package.use/libreo -emerge -v =libreoffice-${VERSION} || die "emerge failed" +emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y -mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed" +mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed" echo "Base - java" echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > /etc/portage/package.use/libreo -emerge -v =libreoffice-${VERSION} || die "emerge failed" +emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y -mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed" +mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed" # kde flavor echo "KDE" echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > /etc/portage/package.use/libreo -emerge -v =libreoffice-${VERSION} || die "emerge failed" +emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y -mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed" +mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed" echo "KDE - java" echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > /etc/portage/package.use/libreo -emerge -v =libreoffice-${VERSION} || die "emerge failed" +emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y -mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed" +mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed" # gnome flavor echo "Gnome" echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > /etc/portage/package.use/libreo -emerge -v =libreoffice-${VERSION} || die "emerge failed" +emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y -mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed" +mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed" echo "Gnome -java" echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > /etc/portage/package.use/libreo -emerge -v =libreoffice-${VERSION} || die "emerge failed" +emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y -mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed" +mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed" -for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do +for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do BN=`basename $name .tbz2` |