mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
285 lines
10 KiB
Bash
285 lines
10 KiB
Bash
# $Id: PKGBUILD 53272 2009-09-27 19:22:07Z andyrtr $
|
|
# Maintainer: AndyRTR <andyrtr@archlinux.org>
|
|
# Contributor: Hussam Al-Tayeb <ht990332@gmail.com>
|
|
|
|
pkgname=openoffice-base
|
|
pkgver=3.1.1
|
|
pkgrel=2
|
|
pkgdesc="OpenOffice.org - a free multiplatform and multilingual office suite"
|
|
arch=(i686 x86_64)
|
|
_OO_milestone=OOO310_m19 # =RC2 = final
|
|
license=('LGPL3')
|
|
url="http://www.openoffice.org"
|
|
install=openoffice.install
|
|
depends=('curl>=7.19.6' 'hunspell>=1.2.8' 'python>=2.6.2-6' 'libwpd>=0.8.14' 'redland>=1.0.9-4' 'libxaw>=1.0.6' 'neon>=0.28.6'
|
|
'dbus-glib>=0.80' 'icu>=4.2.1' 'hsqldb-java' 'libxslt>=1.1.24-2' 'hicolor-icon-theme' 'desktop-file-utils')
|
|
optdepends=('java-runtime: adds java support'
|
|
'libcups: adds printing support'
|
|
'gconf: adds additional gnome support'
|
|
'nss: adds support for signed files/macros'
|
|
'pstoedit: translates PostScript and PDF graphics into other vector formats')
|
|
makedepends=('bison' 'svn' 'automake' 'findutils' 'flex' 'gawk' 'gcc-libs' 'libart-lgpl' 'libxtst'
|
|
'pam' 'sane' 'zip' 'perl-archive-zip' 'pkgconfig' 'unzip' 'xulrunner>=1.9.1.3'
|
|
'apache-ant>=1.7.1-3' 'cairo' 'gperf' 'libcups' 'pstoedit' 'gconf' 'openjdk6>=1.6.1')
|
|
backup=(usr/lib/openoffice/program/sofficerc)
|
|
source=(ftp://ftp.archlinux.org/other/openoffice/${pkgname}-${_OO_milestone}.tar.bz2
|
|
startcenter.desktop
|
|
default-no-startup-wizard.diff
|
|
default-system-fpicker.diff
|
|
soffice-detect-mozilla-certificates.diff
|
|
buildfix-gcc43.diff
|
|
shell.patch
|
|
openoffice.profile
|
|
soltools-mkdepend-getline.diff
|
|
buildfix-sw-printf.diff
|
|
xulrunner-1.9.1.diff
|
|
nsplugin-path.diff
|
|
no-mozilla-plug-in-option.diff
|
|
buildfix_system_db48.diff)
|
|
options=('!distcc' '!ccache' '!makeflags')
|
|
md5sums=('23370db83cc40bfbf22cedc460fd6b85'
|
|
'90897451b6cfed490e481f06d45408aa'
|
|
'71f136a31e296a04ab68932a31dd533e'
|
|
'6c596129fb48316226ce3adfd3a4c86d'
|
|
'1dc7480a04f572ad136d35923a2af66d'
|
|
'bf7119084a2d1e0566b5e34b57dce8eb'
|
|
'a51200f770c635355c430cc5052db8cf'
|
|
'8d68d44c941a687813ddd968383cdf27'
|
|
'7f9012680d0e329227445925710bafe6'
|
|
'2461119a2b7f1580f997f504a76a1c98'
|
|
'94b52cefc3656013f33ccedc0392848b'
|
|
'b48650dbdcf72c09a15dc9dff54915f1'
|
|
'00d28e85d97a467c58f317a2d93d26ac'
|
|
'0cd6f3525939d3ef6e5a30ad30c25d27')
|
|
|
|
# see ftp://ftp.linux.cz/pub/localization/OpenOffice.org/devel/build/build for upstream build instructions
|
|
|
|
build() {
|
|
cd ${srcdir}
|
|
# now svn: http://wiki.services.openoffice.org/wiki/OOo_and_Subversion
|
|
# svn checkout svn://svn.services.openoffice.org/ooo/tags/${_OO_milestone}
|
|
# find ${srcdir} -type d -depth -name ".svn" -exec rm -rf {} \;
|
|
# tar -cvjf ../${pkgname}-${_OO_milestone}.tar.bz2 ${_OO_milestone}/*
|
|
# return 1
|
|
|
|
cd ${srcdir}/${_OO_milestone}
|
|
|
|
# just to make sure that it will detect the desired JDK/JVM - we want openjdk6
|
|
unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH
|
|
[ -z "${JAVA_HOME}" ] && . /etc/profile.d/openjdk6.sh
|
|
JAVAHOME=${JAVA_HOME}
|
|
[ -z "${MOZ_PLUGIN_PATH}" ] && . /etc/profile.d/mozilla-common.sh
|
|
[ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
|
|
|
|
# some speedups
|
|
export SMP="6"
|
|
MAXMODULESFLAG="-P${SMP}"
|
|
MAXPROCESSESFLAG="-P${SMP}"
|
|
export nodep=true
|
|
export NO_HIDS=true
|
|
|
|
# build fixes
|
|
patch -Np0 -i ${srcdir}/buildfix-gcc43.diff || return 1
|
|
patch -Np0 -i ${srcdir}/buildfix-sw-printf.diff || return 1
|
|
patch -Np0 -i ${srcdir}/soltools-mkdepend-getline.diff || return 1
|
|
patch -Np0 -i ${srcdir}/xulrunner-1.9.1.diff || return 1
|
|
patch -Np0 -i ${srcdir}/buildfix_system_db48.diff || return 1
|
|
|
|
# allows soffice to find the user's firefox profile so that it can read
|
|
# its digital certificates. Nss stores digital certificates in your mozilla firefox profile.
|
|
patch -Np0 -i ${srcdir}/soffice-detect-mozilla-certificates.diff || return 1
|
|
|
|
# important bugfixes
|
|
# try to fix non-gtk integration
|
|
patch -Np0 -i ${srcdir}/shell.patch || return 1
|
|
# fix the mozilla plugin and remove it from option menu
|
|
patch -Np0 -i ${srcdir}/nsplugin-path.diff || return 1
|
|
patch -Np0 -i ${srcdir}/no-mozilla-plug-in-option.diff || return 1
|
|
|
|
# remove the startup wizard
|
|
patch -Np0 -i ${srcdir}/default-no-startup-wizard.diff || return 1
|
|
# enables the default system-file-picker in case we have that built
|
|
patch -Np0 -i ${srcdir}/default-system-fpicker.diff || return 1
|
|
|
|
if [ "$CARCH" = "x86_64" ]; then
|
|
EXTRAOPTS="--without-stlport"
|
|
# fix to build with SUN jdk/jre and OpenJDK
|
|
# http://qa.openoffice.org/issues/show_bug.cgi?id=74749
|
|
sed -i "s:lib64\/libjpeg.so:lib\/libjpeg.so:g" ${srcdir}/${_OO_milestone}/solenv/inc/libs.mk || return 1
|
|
else EXTRAOPTS="--with-stlport"
|
|
fi
|
|
|
|
cd ${srcdir}/${_OO_milestone}
|
|
|
|
# export C(XX)FLAGS
|
|
# http://www.openoffice.org/issues/show_bug.cgi?id=103205
|
|
unset CFLAGS
|
|
unset CXXFLAGS
|
|
# export ARCH_FLAGS="$CFLAGS"
|
|
|
|
# Need to recreate the configure script because of patches
|
|
autoreconf -v || return 1
|
|
|
|
./configure --with-build-version="${pkgver} ArchLinux build-${pkgrel} (${_OO_milestone})" \
|
|
--with-vendor="ArchLinux"\
|
|
--prefix=/usr --exec-prefix=/usr\
|
|
--disable-ldap\
|
|
--with-lang="en-US"\
|
|
--with-dict=ALL\
|
|
--disable-gnome-vfs\
|
|
--disable-binfilter\
|
|
--disable-evolution2\
|
|
--disable-kde\
|
|
--disable-lockdown\
|
|
--disable-mediawiki\
|
|
--disable-minimizer\
|
|
--disable-odk\
|
|
--disable-pdfimport\
|
|
--disable-qadevooo\
|
|
--disable-reportdesign\
|
|
--disable-systray\
|
|
--disable-mathmldtd\
|
|
--enable-gio\
|
|
--enable-gtk\
|
|
--enable-cups\
|
|
--enable-dbus\
|
|
--enable-cairo\
|
|
--enable-crashdump=no\
|
|
--enable-vba\
|
|
--with-package-format=native\
|
|
--with-system-db\
|
|
--with-system-cairo\
|
|
--with-system-curl\
|
|
--with-system-expat\
|
|
--with-system-freetype\
|
|
--with-system-hunspell\
|
|
--with-system-icu\
|
|
--with-system-jpeg\
|
|
--with-system-libwpd\
|
|
--with-system-libxml\
|
|
--with-system-libxslt\
|
|
--with-system-neon\
|
|
--with-system-python\
|
|
--with-system-redland\
|
|
--with-system-sane-header\
|
|
--with-system-sndfile\
|
|
--with-system-stdlibs\
|
|
--with-system-xrender-headers\
|
|
--with-system-zlib\
|
|
--with-system-openssl\
|
|
--with-system-mozilla=libxul\
|
|
--without-fonts\
|
|
--without-afms\
|
|
--without-gpc\
|
|
--without-nas\
|
|
--with-jdk-home=${JAVA_HOME}\
|
|
--with-system-hsqldb\
|
|
--with-hsqldb-jar=/usr/share/java/hsqldb.jar\
|
|
--with-system-xerces\
|
|
--with-xerces-jar=/usr/share/java/xercesImpl.jar\
|
|
--with-system-xalan\
|
|
--with-xalan-jar=/usr/share/java/xalan.jar\
|
|
--with-system-xml-apis\
|
|
--with-xml-apis-jar=/usr/share/java/xml-apis.jar\
|
|
--with-serializer-jar=/usr/share/java/serializer.jar\
|
|
--with-ant-home=/usr/share/java/apache-ant \
|
|
--with-use-shell=bash\
|
|
$EXTRAOPTS || return 1
|
|
|
|
# Setup environment for build
|
|
if [ "$CARCH" = "x86_64" ]; then
|
|
source LinuxX86-64Env.Set.sh
|
|
else source LinuxX86Env.Set.sh
|
|
fi
|
|
|
|
# Build dmake utility
|
|
./bootstrap || return 1
|
|
|
|
cd instsetoo_native
|
|
build.pl -P${SMP} ${MAXMODULESFLAG} ${MAXPROCESSESFLAG} --dlv_switch -link --all || return 1
|
|
cd ..
|
|
|
|
# install binaries
|
|
if [ "$CARCH" = "x86_64" ]; then
|
|
cp -R instsetoo_native/unxlngx6.pro/OpenOffice/native/install/en-US/linux-2.6-x86_64/buildroot/* ${pkgdir}/
|
|
else cp -R instsetoo_native/unxlngi6.pro/OpenOffice/native/install/en-US/linux-2.6-intel/buildroot/* ${pkgdir}/
|
|
fi
|
|
|
|
# move all to /usr/lib
|
|
mkdir -p ${pkgdir}/usr/lib
|
|
mv ${pkgdir}/opt/* ${pkgdir}/usr/lib/
|
|
rmdir ${pkgdir}/opt
|
|
|
|
## Step 1
|
|
cd ${pkgdir}/usr/lib/openoffice.org || return 1
|
|
mv ure/ basis3.1/ || return 1
|
|
cd basis3.1 || return 1
|
|
rm ure-link && mv ure ure-link || return 1
|
|
## Step 2
|
|
cd ${pkgdir}/usr/lib/ || return 1
|
|
mv openoffice.org/basis3.1/ openoffice.org3/ || return 1
|
|
cd openoffice.org3/ || return 1
|
|
rm basis-link && mv basis3.1 basis-link || return 1
|
|
## Step 3
|
|
cd ${pkgdir}/usr/lib/ || return 1
|
|
rmdir ${pkgdir}/usr/lib/openoffice.org || return 1
|
|
mv openoffice.org3 openoffice || return 1
|
|
|
|
# install all built dictionaries from source tree
|
|
pushd ${srcdir}/${_OO_milestone}/dictionaries/unxlng?6.pro/bin
|
|
for i in `ls -1 dict-??.oxt`; do
|
|
install -D -m644 $i ${pkgdir}/usr/lib/openoffice/share/extension/install/$i || return 1
|
|
done
|
|
popd
|
|
|
|
# prepare filesystem entries
|
|
mkdir -p ${pkgdir}/usr/{bin,share/applications}
|
|
mkdir -p ${pkgdir}/usr/share/icons/{hicolor,locolor}
|
|
|
|
# install shortcuts
|
|
mv ${pkgdir}/usr/lib/openoffice/share/xdg/*.desktop ${pkgdir}/usr/share/applications
|
|
# add startcenter desktop file
|
|
install -D -m644 ${srcdir}/startcenter.desktop ${pkgdir}/usr/share/applications/startcenter.desktop || return 1
|
|
|
|
cd ${pkgdir}/usr/share/applications
|
|
sed -i -e 's|Exec=openoffice.org3|Exec=/usr/bin/soffice|g' *.desktop || return 1
|
|
sed -i -e 's|Exec=/usr/bin/soffice-printeradmin|Exec=/usr/bin/spadmin|g' printeradmin.desktop || return 1
|
|
# fix exec commands in shortcuts for Xfce menu
|
|
sed -i -e 's|base %U|base|g' base.desktop || return 1
|
|
sed -i -e 's|calc %U|calc|g' calc.desktop || return 1
|
|
sed -i -e 's|draw %U|draw|g' draw.desktop || return 1
|
|
sed -i -e 's|impress %U|impress|g' impress.desktop || return 1
|
|
sed -i -e 's|math %U|math|g' math.desktop || return 1
|
|
sed -i -e 's|writer %U|writer|g' writer.desktop || return 1
|
|
# remove quickstarter, we disabled it above
|
|
rm -rf ${pkgdir}/usr/share/applications/qstart.desktop
|
|
# fix icons in desktop files
|
|
sed -i -e 's|Icon=openofficeorg3-|Icon=|g' *.desktop
|
|
|
|
# install icons
|
|
cd ${srcdir}/${_OO_milestone}/sysui/desktop/icons
|
|
cp -a -v hicolor/*x* ${pkgdir}/usr/share/icons/hicolor
|
|
cp -a -v locolor/*x* ${pkgdir}/usr/share/icons/locolor
|
|
|
|
# just in case icon calc is used by calculator :)
|
|
find ${pkgdir}/usr/share/icons -type d -name apps -exec mv {}/calc.png {}/ooocalc.png \;
|
|
sed -i -e 's|Icon=calc|Icon=ooocalc|g' ${pkgdir}/usr/share/applications/calc.desktop # already done above
|
|
|
|
# fix ownership and permissions
|
|
chown root.root -R ${pkgdir}/
|
|
chmod +rX -R ${pkgdir}/usr
|
|
|
|
# make symlinks
|
|
cd ${pkgdir}/usr/bin
|
|
ln -s /usr/lib/openoffice/program/soffice soffice
|
|
ln -s /usr/lib/openoffice/program/spadmin spadmin
|
|
|
|
# link the mozilla-plugin
|
|
mkdir -p ${pkgdir}/usr/lib/mozilla/plugins/
|
|
cd ${pkgdir}/usr/lib/mozilla/plugins/
|
|
ln -v -s /usr/lib/openoffice/program/libnpsoplugin.so .
|
|
|
|
# set desktop variable to force gtk/gnome vcl usage
|
|
install -m755 -d ${pkgdir}/etc/profile.d
|
|
install -m755 ${srcdir}/openoffice.profile ${pkgdir}/etc/profile.d/openoffice.sh || return 1
|
|
}
|