/[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.15 Revision 1.16
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="4.1.2.3" 8VERSION="4.1.3.2"
9BINVERSION="4.1.2.3" 9BINVERSION="4.1.3.2"
10OPTS="-v" 10OPTS="-v"
11USEFILE="/etc/portage/package.use/libreo" 11USEFILE="/etc/portage/package.use/libreo"
12MYPKGDIR="$( portageq pkgdir )" 12MYPKGDIR="$( portageq pkgdir )"
13MYTMPDIR=/root/tmp
14MYDISTDIR=/root/distfiles
15
13################################################ 16################################################
14 17
15# bug 473974 18# bug 473974
16export LC_MESSAGES=C 19export LC_MESSAGES=C
17 20
82# compile the flavor 85# compile the flavor
83echo "Base" 86echo "Base"
84echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE} 87echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE}
85FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 88FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
86quickpkg libreoffice --include-config=y 89quickpkg libreoffice --include-config=y
87mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed" 90mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ${MYTMPDIR}/libreoffice-base-${BINVERSION}.tbz2 || die "Moving package failed"
88 91
89echo "Base - java" 92echo "Base - java"
90echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE} 93echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_NK}" > ${USEFILE}
91FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 94FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
92quickpkg libreoffice --include-config=y 95quickpkg libreoffice --include-config=y
93mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed" 96mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ${MYTMPDIR}/libreoffice-base-java-${BINVERSION}.tbz2 || die "Moving package failed"
94 97
95# kde flavor 98# kde flavor
96echo "KDE" 99echo "KDE"
97echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > ${USEFILE} 100echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_NG} ${IUSES_K}" > ${USEFILE}
98FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 101FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
99quickpkg libreoffice --include-config=y 102quickpkg libreoffice --include-config=y
100mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed" 103mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ${MYTMPDIR}/libreoffice-kde-${BINVERSION}.tbz2 || die "Moving package failed"
101 104
102echo "KDE - java" 105echo "KDE - java"
103echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > ${USEFILE} 106echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_NG} ${IUSES_K}" > ${USEFILE}
104FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 107FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
105quickpkg libreoffice --include-config=y 108quickpkg libreoffice --include-config=y
106mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed" 109mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ${MYTMPDIR}/libreoffice-kde-java-${BINVERSION}.tbz2 || die "Moving package failed"
107 110
108# gnome flavor 111# gnome flavor
109echo "Gnome" 112echo "Gnome"
110echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > ${USEFILE} 113echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_NJ} ${IUSES_G} ${IUSES_NK}" > ${USEFILE}
111FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 114FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
112quickpkg libreoffice --include-config=y 115quickpkg libreoffice --include-config=y
113mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed" 116mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ${MYTMPDIR}/libreoffice-gnome-${BINVERSION}.tbz2 || die "Moving package failed"
114 117
115echo "Gnome -java" 118echo "Gnome -java"
116echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > ${USEFILE} 119echo "app-office/libreoffice ${IUSES_BASE} ${IUSES_J} ${IUSES_G} ${IUSES_NK}" > ${USEFILE}
117FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed" 120FEATURES="${FEATURES} splitdebug" CFLAGS="${MYFLAGS}" CXXFLAGS="${MYFLAGS}" emerge ${OPTS} =libreoffice-${VERSION} || die "emerge failed"
118quickpkg libreoffice --include-config=y 121quickpkg libreoffice --include-config=y
119mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ./libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed" 122mv ${MYPKGDIR}/app-office/libreoffice-${VERSION}.tbz2 ${MYTMPDIR}/libreoffice-gnome-java-${BINVERSION}.tbz2 || die "Moving package failed"
120 123
124cd ${MYTMPDIR}
121 125
122for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do 126for name in ./libreoffice-*-${BINVERSION}.tbz2 ; do
123 127
124 BN=`basename $name .tbz2` 128 BN=`basename $name .tbz2`
125 129
143 147
144 echo "Removing unpacked files" 148 echo "Removing unpacked files"
145 cd ../.. 149 cd ../..
146 rm -rf tmp.lo 150 rm -rf tmp.lo
147 151
152 echo "Removing original package file"
153 rm -f $BN.tbz2
154
155 echo "Moving results to distfiles storage"
156 mv -v $ARCH-bin-$BN.tar.xz $MYDISTDIR
157 mv -v $ARCH-debug-$BN.tar.xz $MYDISTDIR
158
148 echo "Done with $BN.tbz2" 159 echo "Done with $BN.tbz2"
149 160
150done 161done
151 162
152rm -f ${USEFILE} || die "Removing ${USEFILE} failed" 163rm -f ${USEFILE} || die "Removing ${USEFILE} failed"
153 164
154rm -f libreoffice*${VERSION}*.tbz2 || die "Removing un-split package files failed"

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20