/[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.9 Revision 1.11
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# * for x86 : CFLAGS="-march=i586 -mtune=generic -O2 -pipe -g" 4# * for x86 : CFLAGS="-march=i586 -mtune=generic -O2 -pipe -g"
5# * for amd64: CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -g" 5# * for amd64: CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -g"
6 6
7# What you can set: 7# What you can set:
8VERSION="3.6.3.2" 8VERSION="3.6.4.3"
9BINVERSION="3.6.3.2" 9BINVERSION="3.6.4.3"
10OPTS="-v" 10OPTS="-v"
11USEFILE="/etc/portage/package.use/libreo" 11USEFILE="/etc/portage/package.use/libreo"
12MYPKGDIR="$( portageq pkgdir )" 12MYPKGDIR="$( portageq pkgdir )"
13################################################ 13################################################
14 14
22 ARCH="amd64" 22 ARCH="amd64"
23elif [ "$( uname -m )" = "i686" ] ; then 23elif [ "$( uname -m )" = "i686" ] ; then
24 MYFLAGS="-march=i586 -mtune=generic -O2 -pipe -g" 24 MYFLAGS="-march=i586 -mtune=generic -O2 -pipe -g"
25 ARCH="x86" 25 ARCH="x86"
26else 26else
27 die "Arch not supported" 27 die "Arch $( uname -m ) not supported"
28fi 28fi
29 29
30for i in \ 30for i in \
31 "/bin/echo" \ 31 "/bin/echo" \
32 "/bin/mkdir" \ 32 "/bin/mkdir" \
37 "/usr/bin/emerge" \ 37 "/usr/bin/emerge" \
38 "/usr/bin/portageq" \ 38 "/usr/bin/portageq" \
39 "/usr/bin/quickpkg" 39 "/usr/bin/quickpkg"
40do 40do
41 if [ ! -e "${i}" ] ; then 41 if [ ! -e "${i}" ] ; then
42 die "Missing something in your system" 42 die "Missing some basic utility in your system"
43 fi 43 fi
44done 44done
45 45
46# first the default subset of useflags 46# first the default subset of useflags
47IUSES_BASE="bash-completion branding cups dbus gstreamer gtk opengl svg vba webdav -aqua -binfilter -jemalloc -mysql -odk -postgres" 47IUSES_BASE="bash-completion branding cups dbus gstreamer gtk opengl vba webdav -aqua -binfilter -jemalloc -mysql -odk -postgres"
48 48
49ENABLE_EXTENSIONS="presenter-console presenter-minimizer" 49ENABLE_EXTENSIONS="presenter-console presenter-minimizer"
50DISABLE_EXTENSIONS="nlpsolver pdfimport scripting-beanshell scripting-javascript wiki-publisher" 50DISABLE_EXTENSIONS="nlpsolver pdfimport scripting-beanshell scripting-javascript wiki-publisher"
51 51
52for lo_xt in ${ENABLE_EXTENSIONS}; do 52for lo_xt in ${ENABLE_EXTENSIONS}; do
64IUSES_NG="-gnome -eds" 64IUSES_NG="-gnome -eds"
65IUSES_K="kde" 65IUSES_K="kde"
66IUSES_NK="-kde" 66IUSES_NK="-kde"
67 67
68if [ -f /etc/portage/package.use ] ; then 68if [ -f /etc/portage/package.use ] ; then
69 die "Please save your package.use and make it as a directory" 69 die "Please save your package.use and re-create it as a directory"
70fi 70fi
71 71
72mkdir -p /etc/portage/package.use/ 72mkdir -p /etc/portage/package.use/ || die
73 73
74mkdir -p "${MYPKGDIR}"
74if [ -z "${MYPKGDIR}" -o ! -d "${MYPKGDIR}" ] ; then 75if [ -z "${MYPKGDIR}" -o ! -d "${MYPKGDIR}" ] ; then
75 die "Anything goes wrong" 76 die "Anything goes wrong"
76fi 77fi
77 78
78# compile the flavor 79# compile the flavor
79echo "Base" 80echo "Base"
80echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE} 81echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE}
81CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 82FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
82quickpkg libreoffice --include-config=y 83quickpkg libreoffice --include-config=y
83mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed" 84mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed"
84 85
85echo "Base - java" 86echo "Base - java"
86echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE} 87echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE}
87CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 88FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
88quickpkg libreoffice --include-config=y 89quickpkg libreoffice --include-config=y
89mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed" 90mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed"
90 91
91# kde flavor 92# kde flavor
92echo "KDE" 93echo "KDE"
93echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > ${USEFILE} 94echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > ${USEFILE}
94CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 95FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
95quickpkg libreoffice --include-config=y 96quickpkg libreoffice --include-config=y
96mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed" 97mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed"
97 98
98echo "KDE - java" 99echo "KDE - java"
99echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > ${USEFILE} 100echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > ${USEFILE}
100CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 101FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
101quickpkg libreoffice --include-config=y 102quickpkg libreoffice --include-config=y
102mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed" 103mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed"
103 104
104# gnome flavor 105# gnome flavor
105echo "Gnome" 106echo "Gnome"
106echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > ${USEFILE} 107echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > ${USEFILE}
107CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 108FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
108quickpkg libreoffice --include-config=y 109quickpkg libreoffice --include-config=y
109mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed" 110mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed"
110 111
111echo "Gnome -java" 112echo "Gnome -java"
112echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > ${USEFILE} 113echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > ${USEFILE}
113CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 114FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
114quickpkg libreoffice --include-config=y 115quickpkg libreoffice --include-config=y
115mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed" 116mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed"
116 117
117 118
118for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do 119for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do
143 144
144 echo "Done with $BN.tbz2" 145 echo "Done with $BN.tbz2"
145 146
146done 147done
147 148
148rm -fr ${USEFILE} 149rm -f ${USEFILE} || die "Removing ${USEFILE} failed"
149 150
150rm -fr libreoffice*${VERSION}*.tbz2 151rm -f libreoffice*${VERSION}*.tbz2 || die "Removing un-split package files failed"

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20