/[gentoo-x86]/app-office/libreoffice/files/generate_libreoffice_package.sh
Gentoo

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

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

Revision 1.2 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}"
10 exit 1 10 exit 1
11} 11}
12 12
13VERSION="3.5.2.2" 13VERSION="3.5.5.3"
14 14BINVERSION="3.5.5.3"
15BINRELEASE="-r1"
16 15
17# first the default subset of useflags 16# first the default subset of useflags
18IUSES_BASE="bash-completion binfilter branding cups dbus graphite gstreamer gtk nsplugin python vba webdav xmlsec -aqua -jemalloc -mysql -nlpsolver -odk -opengl -pdfimport -postgres -svg" 17IUSES_BASE="bash-completion binfilter branding cups dbus graphite gstreamer gtk nsplugin python vba webdav xmlsec -aqua -jemalloc -mysql -nlpsolver -odk -opengl -pdfimport -postgres -svg"
19 18
20# now for the options 19# now for the options
23IUSES_G="gnome eds" 22IUSES_G="gnome eds"
24IUSES_NG="-gnome -eds" 23IUSES_NG="-gnome -eds"
25IUSES_K="kde" 24IUSES_K="kde"
26IUSES_NK="-kde" 25IUSES_NK="-kde"
27 26
27if [ -f /etc/portage/package.use ] ; then
28 echo "Please save your package.use and make it as a directory"
29 exit 1
30fi
31
28mkdir -p /etc/portage/package.use/ 32mkdir -p /etc/portage/package.use/
33
34OPTS="-v"
35
36MYPKGDIR="$( emerge --info | grep PKGDIR | sed "s:PKGDIR=::;s:\"::g" )"
29 37
30# compile the flavor 38# compile the flavor
31echo "Base" 39echo "Base"
32echo "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
33emerge -v =libreoffice-${VERSION} || die "emerge failed" 41emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
34quickpkg libreoffice --include-config=y 42quickpkg libreoffice --include-config=y
35mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${VERSION}${BINRELEASE}.tbz2 || die "Moving package failed" 43mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed"
36 44
37echo "Base - java" 45echo "Base - java"
38echo "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
39emerge -v =libreoffice-${VERSION} || die "emerge failed" 47emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
40quickpkg libreoffice --include-config=y 48quickpkg libreoffice --include-config=y
41mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${VERSION}${BINRELEASE}.tbz2 || die "Moving package failed" 49mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed"
42 50
43# kde flavor 51# kde flavor
44echo "KDE" 52echo "KDE"
45echo "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
46emerge -v =libreoffice-${VERSION} || die "emerge failed" 54emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
47quickpkg libreoffice --include-config=y 55quickpkg libreoffice --include-config=y
48mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${VERSION}${BINRELEASE}.tbz2 || die "Moving package failed" 56mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed"
49 57
50echo "KDE - java" 58echo "KDE - java"
51echo "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
52emerge -v =libreoffice-${VERSION} || die "emerge failed" 60emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
53quickpkg libreoffice --include-config=y 61quickpkg libreoffice --include-config=y
54mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${VERSION}${BINRELEASE}.tbz2 || die "Moving package failed" 62mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed"
55 63
56# gnome flavor 64# gnome flavor
57echo "Gnome" 65echo "Gnome"
58echo "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
59emerge -v =libreoffice-${VERSION} || die "emerge failed" 67emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
60quickpkg libreoffice --include-config=y 68quickpkg libreoffice --include-config=y
61mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${VERSION}${BINRELEASE}.tbz2 || die "Moving package failed" 69mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed"
62 70
63echo "Gnome -java" 71echo "Gnome -java"
64echo "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
65emerge -v =libreoffice-${VERSION} || die "emerge failed" 73emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
66quickpkg libreoffice --include-config=y 74quickpkg libreoffice --include-config=y
67mv /tmp/portage/packages/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${VERSION}${BINRELEASE}.tbz2 || die "Moving package failed" 75mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed"
68 76
69 77
70for name in ./libreoffice-*-${VERSION}${BINRELEASE}.tbz2 ; do 78for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do
71 79
72 BN=`basename $name .tbz2` 80 BN=`basename $name .tbz2`
73 81
74 rm -rf tmp.lo 82 rm -rf tmp.lo
75 mkdir -vp tmp.lo/p1 tmp.lo/p2 83 mkdir -vp tmp.lo/p1 tmp.lo/p2

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20