All pastes #248384 Raw Edit

Someone

public text v1 · immutable
#248384 ·published 2006-11-14 16:28 UTC
rendered paste body
pkgname=openoffice
pkgver=2.0.4
OO_milestone=OOD680_m5
pkgrel=3
desc="OpenOffice.org - a free multiplatform and multilingual office suite"
arch=(!i686 x86_64)
url="http://www.openoffice.org"

install=install.openoffice

conflicts=('openoffice-base' 'openoffice-cvs')
provides=('openoffice-base' 'openoffice-cvs')

source=("http://ftp.ussg.iu.edu/openoffice/stable/$pkgver/OOo_2.0.4_src.tar.gz" \
	intro.bmp
	install.openoffice)
md5sums=('df4bb26645e974a2358bc17f8381a197' '18e281491eadda03ed661b0261be0c22'\
         'cb74912aec00753a07247c331fadccd4')

build() {
	# parallel build is broken in most cases
	export MAKEFLAGS="-j1"

#	# Apply patches
#	for OOPATCHES in ../*.diff
#	do patch -p0 < ../${OOPATCHES} || return 1
#	done

	cd $startdir/src/${OO_milestone}/config_office

	# Need to recreate the configure script because of patches
#	autoconf 

	./configure --with-vendor="Archlinux"\
	--with-build-version="2.0.4 Archlinux build-2"\
	--with-arch="x86_64"\
	--disable-ldap\
	--with-openldap\
	--disable-binfilter\
	--disable-directx\
	--disable-fontooo\
	--disable-gnome-vfs\
	--disable-mono\
	--disable-mozilla\
	--disable-odk\
	--disable-qadevoo\
	--enable-gtk\
	--enable-kde\
	--enable-cups\
	--enable-cairo\
	--enable-evolution2\
	--with-package-format=native\
	--with-binsuffix=2\
	--with-system-boost\
	--with-system-cairo\
	--with-system-curl\
	--with-system-expat\
	--with-system-fonts\
	--with-system-freetype\
	--with-system-hunspell\
	--with-system-jpeg\
	--with-system-libwpd\
	--with-system-libxml\
	--with-system-libxslt\
	--with-system-neon\
	--with-system-mozilla\
	--with-system-python\
	--with-system-sane-header\
	--with-system-sndfile\
	--with-system-stdlibs\
	--with-system-xmlsec\
	--with-system-xrender-headers\
	--with-system-zlib\
	--without-fonts\
	--with-java=gij\
	--without-myspell-dicts\
	--without-nas\
	--with-system-icu\
	--with-xulrunner\
	--without-docdir\
	--with-gcc-speedup=ccache\

	#--with-lang=ALL\
	#--without-java\

	cd ..
	# Setup environment for build
	source LinuxX86-64Env.Set.sh

	# Build dmake utility
	./bootstrap || return 1

	# to compile with SMP add -P2 or above, remove -P2 if you've only got on CPU core
	# smp is know to be broken most times
	dmake -P2 || return 1

	# install binaries
	cp -R instsetoo_native/unxlngx6.pro/OpenOffice/native/install/en-US/linux-2.6-x86_64/buildroot/* $startdir/pkg/

	# multilang
#	for lang in `ls -1 instsetoo_native/unxlngx6.pro/OpenOffice/native/install/`; do
#		cp -R instsetoo_native/unxlngx6.pro/OpenOffice/native/install/${lang}/linux-2.6-x86_64/buildroot/ $startdir/pkg/
#	done

	cd $startdir/pkg/opt
	mv openoffice.org2.0 openoffice

	# replace original splash intro screen with one provided by shastry
	rm -rf $startdir/pkg/opt/openoffice/program/intro.bmp
	install -D -m644 cp $startdir/src/intro.bmp $startdir/pkg/opt/openoffice/program/

	# prepare filesystem entries
	mkdir -p $startdir/pkg/usr/{bin,share/applications}
	mkdir -p $startdir/pkg/usr/share/icons/{HighContrast,hicolor,locolor}

	# make symlinks
	cd $startdir/pkg/usr/bin
	ln -s ../../opt/openoffice/program/soffice soffice
	ln -s ../../opt/openoffice/program/spadmin spadmin

	# install shortcuts
	cp $startdir/pkg/opt/openoffice/share/xdg/*.desktop  $startdir/pkg/usr/share/applications
	cd $startdir/pkg/usr/share/applications
	sed -i -e 's|Exec=openoffice.org-2.0|Exec=/opt/openoffice/program/soffice|g' *.desktop
	sed -i -e 's|Exec=/opt/openoffice/program/soffice-printeradmin|Exec=/opt/openoffice/program/spadmin|g' printeradmin.desktop

	# fix icons in shortcuts
	sed -i -e 's|Icon=openofficeorg-20-base|Icon=base|g' *.desktop
	sed -i -e 's|Icon=openofficeorg-20-calc|Icon=ooocalc|g' *.desktop
	sed -i -e 's|Icon=openofficeorg-20-draw|Icon=draw|g' *.desktop
	sed -i -e 's|Icon=openofficeorg-20-impress|Icon=impress|g' *.desktop
	sed -i -e 's|Icon=openofficeorg-20-math|Icon=math|g' *.desktop
	sed -i -e 's|Icon=openofficeorg-20-writer|Icon=writer|g' *.desktop
	sed -i -e 's|Icon=openofficeorg-20-printeradmin.png|Icon=printeradmin|g' *.desktop

	# install icons
	cd $startdir/src/${OO_milestone}/sysui/desktop/icons
	cp -a -v HighContrast/*x* $startdir/pkg/usr/share/icons/HighContrast
	cp -a -v hicolor/*x* $startdir/pkg/usr/share/icons/hicolor
	cp -a -v locolor/*x* $startdir/pkg/usr/share/icons/locolor
	rm -rf $startdir/pkg/usr/share/icons/*/*/CVS
	rm -rf $startdir/pkg/usr/share/icons/*/*/*/CVS

	## just in case icon calc is used by calculator :)
	find $startdir/pkg/usr/share/icons -type d -name apps  -exec mv \{}/calc.png  \{}/ooocalc.png \;

	# fix ownership and permissions
	chown root.root -R $startdir/pkg/
	chmod +rX -R $startdir/pkg/usr

	rm -f $startdir/pkg/opt/openoffice/program/oo_product.bmp
}