Diff of /app-office/libreoffice/files/generate_libreoffice_package.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.5
1#!/bin/bash 1#!/bin/bash
2 2
3# important: you need to use the most general CFLAGS to build the packages 3# important: you need to use the most general CFLAGS to build the packages
4# recommendation: 4# recommendation:
5# * for x86 : CFLAGS="-march=i586 -mtune=generic -O2 -pipe -g" 5# * for x86 : CFLAGS="-march=i586 -mtune=generic -O2 -pipe -g"
6# * for amd64: CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -g" 6# * for amd64: CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -g"
7 7
8die() { 8die() {
9 echo "${1}" 9 echo "${1}"
22IUSES_G="gnome eds" 22IUSES_G="gnome eds"
23IUSES_NG="-gnome -eds" 23IUSES_NG="-gnome -eds"
24IUSES_K="kde" 24IUSES_K="kde"
25IUSES_NK="-kde" 25IUSES_NK="-kde"
26 26
27if [ -f /etc/portage/package.use ] ; then
28 echo "Please save your package.use and make it as a directory"
29 exit 1
27mkdir -p /etc/portage/package.use/ 32mkdir -p /etc/portage/package.use/
36MYPKGDIR="$( emerge --info | grep PKGDIR | sed "s:PKGDIR=::;s:\"::g" )"
28 37
29# compile the flavor 38# compile the flavor
30echo "Base" 39echo "Base"
31echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > /etc/portage/package.use/libreo 40echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > /etc/portage/package.use/libreo
32emerge -v =libreoffice-${VERSION} || die "emerge failed" 41emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
33quickpkg libreoffice --include-config=y 42quickpkg libreoffice --include-config=y
34mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed" 43mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed"
35 44
36echo "Base - java" 45echo "Base - java"
37echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > /etc/portage/package.use/libreo 46echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > /etc/portage/package.use/libreo
38emerge -v =libreoffice-${VERSION} || die "emerge failed" 47emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
39quickpkg libreoffice --include-config=y 48quickpkg libreoffice --include-config=y
40mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed" 49mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed"
41 50
42# kde flavor 51# kde flavor
43echo "KDE" 52echo "KDE"
44echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > /etc/portage/package.use/libreo 53echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > /etc/portage/package.use/libreo
45emerge -v =libreoffice-${VERSION} || die "emerge failed" 54emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
46quickpkg libreoffice --include-config=y 55quickpkg libreoffice --include-config=y
47mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed" 56mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed"
48 57
49echo "KDE - java" 58echo "KDE - java"
50echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > /etc/portage/package.use/libreo 59echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > /etc/portage/package.use/libreo
51emerge -v =libreoffice-${VERSION} || die "emerge failed" 60emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
52quickpkg libreoffice --include-config=y 61quickpkg libreoffice --include-config=y
53mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed" 62mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed"
54 63
55# gnome flavor 64# gnome flavor
56echo "Gnome" 65echo "Gnome"
57echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > /etc/portage/package.use/libreo 66echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > /etc/portage/package.use/libreo
58emerge -v =libreoffice-${VERSION} || die "emerge failed" 67emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
59quickpkg libreoffice --include-config=y 68quickpkg libreoffice --include-config=y
60mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed" 69mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed"
61 70
62echo "Gnome -java" 71echo "Gnome -java"
63echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > /etc/portage/package.use/libreo 72echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > /etc/portage/package.use/libreo
64emerge -v =libreoffice-${VERSION} || die "emerge failed" 73emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
65quickpkg libreoffice --include-config=y 74quickpkg libreoffice --include-config=y
66mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed" 75mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed"
67 76
68 77
69for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do 78for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do
70 79
71 BN=`basename $name .tbz2` 80 BN=`basename $name .tbz2`
72 81
73 rm -rf tmp.lo 82 rm -rf tmp.lo
74 mkdir -vp tmp.lo/p1 tmp.lo/p2 83 mkdir -vp tmp.lo/p1 tmp.lo/p2

Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20