diff options
author | 2012-11-18 12:02:01 +0000 | |
---|---|---|
committer | 2012-11-18 12:02:01 +0000 | |
commit | dd195fa9d098fe448f0c27e9eaa8c87be8b54202 (patch) | |
tree | a4b53c7ac7955a1bacb53bfaab1c927edd5ed115 /app-office | |
parent | Bump digest to 0.0.1.2 (diff) | |
download | gentoo-2-dd195fa9d098fe448f0c27e9eaa8c87be8b54202.tar.gz gentoo-2-dd195fa9d098fe448f0c27e9eaa8c87be8b54202.tar.bz2 gentoo-2-dd195fa9d098fe448f0c27e9eaa8c87be8b54202.zip |
new version of the script
(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'app-office')
-rw-r--r-- | app-office/libreoffice/ChangeLog | 6 | ||||
-rw-r--r-- | app-office/libreoffice/files/generate_libreoffice_package.sh | 85 |
2 files changed, 64 insertions, 27 deletions
diff --git a/app-office/libreoffice/ChangeLog b/app-office/libreoffice/ChangeLog index 3628f5f022d9..8103c4c982f9 100644 --- a/app-office/libreoffice/ChangeLog +++ b/app-office/libreoffice/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-office/libreoffice # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.398 2012/11/18 11:39:51 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.399 2012/11/18 12:02:01 ago Exp $ + + 18 Nov 2012; Agostino Sarubbo <ago@gentoo.org> + files/generate_libreoffice_package.sh: + new version of the script 18 Nov 2012; Andreas K. Huettel <dilfridge@gentoo.org> libreoffice-9999-r2.ebuild: diff --git a/app-office/libreoffice/files/generate_libreoffice_package.sh b/app-office/libreoffice/files/generate_libreoffice_package.sh index 82d8175f65c3..3d6b5c135a16 100644 --- a/app-office/libreoffice/files/generate_libreoffice_package.sh +++ b/app-office/libreoffice/files/generate_libreoffice_package.sh @@ -1,20 +1,50 @@ #!/bin/bash -# important: you need to use the most general CFLAGS to build the packages -# recommendation: +# important: you need to use the most general CFLAGS to build the packages: # * for x86 : CFLAGS="-march=i586 -mtune=generic -O2 -pipe -g" # * for amd64: CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -g" +# What you can set: +VERSION="3.6.3.2" +BINVERSION="3.6.3.2" +OPTS="-q" +USEFILE="/etc/portage/package.use/libreo" +MYPKGDIR="$( portageq pkgdir )" +################################################ + die() { - echo "${1}" - exit 1 + echo "${1}" + exit 1 } -VERSION="3.5.5.3" -BINVERSION="3.5.5.3" +if [ "$( uname -m )" = "x86_64" ] ; then + MYFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -g" + ARCH="amd64" +elif [ "$( uname -m )" = "i686" ] ; then + MYFLAGS="-march=i586 -mtune=generic -O2 -pipe -g" + ARCH="x86" +else + die "Arch not supported" +fi + +for i in \ + "/bin/echo" \ + "/bin/mkdir" \ + "/bin/mv" \ + "/bin/rm" \ + "/bin/sed" \ + "/bin/tar" \ + "/usr/bin/emerge" \ + "/usr/bin/portageq" \ + "/usr/bin/quickpkg" +do + if [ ! -e "${i}" ] ; then + die "Missing something in your system" + fi +done # first the default subset of useflags -IUSES_BASE="bash-completion binfilter branding cups dbus graphite gstreamer gtk nsplugin python vba webdav xmlsec -aqua -jemalloc -mysql -nlpsolver -odk -opengl -pdfimport -postgres -svg" +IUSES_BASE="bash-completion -binfilter branding cups dbus graphite gstreamer gtk nsplugin python vba webdav xmlsec -aqua -jemalloc -mysql -nlpsolver -odk -opengl -pdfimport -postgres -svg" # now for the options IUSES_J="java" @@ -25,52 +55,51 @@ 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 + die "Please save your package.use and make it as a directory" fi mkdir -p /etc/portage/package.use/ -OPTS="-v" - -MYPKGDIR="$( emerge --info | grep PKGDIR | sed "s:PKGDIR=::;s:\"::g" )" +if [ -z "${MYPKGDIR}" -o ! -d "${MYPKGDIR}" ] ; then + die "Anything goes wrong" +fi # compile the flavor echo "Base" -echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > /etc/portage/package.use/libreo -emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" +echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE} +CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y 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 ${OPTS} =libreoffice-${VERSION} || die "emerge failed" +echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE} +CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y 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 ${OPTS} =libreoffice-${VERSION} || die "emerge failed" +echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > ${USEFILE} +CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y 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 ${OPTS} =libreoffice-${VERSION} || die "emerge failed" +echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > ${USEFILE} +CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y 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 ${OPTS} =libreoffice-${VERSION} || die "emerge failed" +echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > ${USEFILE} +CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y 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 ${OPTS} =libreoffice-${VERSION} || die "emerge failed" +echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > ${USEFILE} +CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" quickpkg libreoffice --include-config=y mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed" @@ -91,11 +120,11 @@ for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do mv -v usr/lib/debug ../p2/usr/lib/ echo "Re-packing program" - tar cfvJ ../../bin-$BN.tar.xz --owner root --group root ./* + tar cfvJ ../../$ARCH-bin-$BN.tar.xz --owner root --group root ./* echo "Re-packing debug info" cd ../p2 - tar cfvJ ../../debug-$BN.tar.xz --owner root --group root ./* + tar cfvJ ../../$ARCH-debug-$BN.tar.xz --owner root --group root ./* echo "Removing unpacked files" cd ../.. @@ -104,3 +133,7 @@ for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do echo "Done with $BN.tbz2" done + +rm -fr ${USEFILE} + +rm -fr libreoffice*${VERSION}*.tbz2 |