summaryrefslogtreecommitdiffstats
path: root/extra/openoffice/Pkgfile
blob: ae629afb227b7c464d396ce92ab9a821d869292b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Description: Suite complète de office en logiciel libre 
# URL:         http://www.openoffice.org
# Packager:    Sibelle at free dot fr
# Maintainer:  NuTyX packager team
# Depends on:  curl, python, libxslt, libpthread-stubs, gperf, apache-ant, p5-archive-zip, libsndfile
name=openoffice
version=3.1.0
release=1
OOdir=OOO310_m11
#source=()
source=( ftp://ftp.gwdg.de/pub/openoffice/stable/$version/OOo_${version}_src_core.tar.bz2\
         http://ftp.gwdg.de/pub/openoffice/stable/$version/OOo_${version}_src_system.tar.bz2\
          #http://www.linuxfromscratch.org/patches/blfs/svn/OOo_2.3.1-use_bin_hsqldb-1.patch\
           ftp://ftp.gwdg.de/pub/openoffice/stable/$version/OOo_${version}_src_l10n.tar.bz2 \
	buildfix-gcc43.diff system_hsqldb.diff buildfix-openjdk-6-no-rhino.diff libxmlsec-findcerts.diff \
	soffice-detect-mozilla-certificates.diff shell.patch \
	ftp://ftp.gwdg.de/pub/openoffice/stable/$version/OOo_${version}_src_extensions.tar.bz2\
	ftp://ftp.gwdg.de/pub/openoffice/stable/$version/OOo_${version}_src_binfilter.tar.bz2\
	ooffice.desktop ooo_getline.diff)
build() {
	install -D -m644 ooffice.desktop \
        $PKG/usr/share/ede/programs/Applications/ooffice.desktop
	source /etc/profile
	mkdir -p $PKG/opt
	mkdir -p $PKG/usr/bin
        mkdir -p $PKG/usr/share/icons
        mkdir -p $PKG/usr/share/applications
        cd $OOdir

	# build fixes
	patch -Np0 -i ../ooo_getline.diff
#	patch -Np0 -i ../buildfix-gcc43.diff
#	patch -Np0 -i ../system_hsqldb.diff
#	patch -Np0 -i ../buildfix-openjdk-6-no-rhino.diff

	# allows xmlsec to be able to read the format of the digital certificates.
#	patch -Np0 -i ../libxmlsec-findcerts.diff
	# allows soffice to find the user's firefox profile so that it can read
	# his digital certificates. Nss stores digital certificates in your mozilla firefox profile. 
#	patch -Np0 -i ../soffice-detect-mozilla-certificates.diff

	# important bugfixes
	# try to fix non-gtk integration 
	#patch -Np0 -i ../shell.patch


	#patch -Np0 -i ../internal-db-no-java_oog680_m9.diff
#	cd config_office

#	autoreconf -v

	./configure --prefix=/opt/openoffice3 \
    	--enable-libart \
        --disable-fontooo \
        --disable-gnome-vfs \
    	--without-fonts \
        --with-system-stdlibs \
        --without-system-jars \
    	--with-system-freetype \
        --with-system-expat \
        --with-system-libxml \
    	--with-system-zlib \
        --enable-cairo \
        --enable-build-mozilla \
    	--with-build-version=BLFS \
        --with-package-format=native \
    	--disable-binfilter \
        --disable-odk \
        --disable-qadevooo \
        --with-java-home=${JAVA_HOME} \
        --with-jdk-home=${JAVA_HOME} \
        --disable-mozilla \
        --with-ant-home=/opt/ant \
        --with-system-python \
	--with-system-cairo\
        --with-system-curl \
        --disable-pam \
        --with-system-jpeg \
        --disable-neon \
        --with-system-sndfile \
        --with-lang="fr" \
	--with-arch=x86 \
        --exec-prefix=/usr/bin \
	--with-use-shell=bash \
        --without-myspell-dicts \
	--enable-pdfimport \
	--enable-qadevooo \
	--disable-kde \
	--disable-kdeab \
	--with-dict=ALL \
	--with-vendor="NuTyX"
#	cd ..
        umask 0022
	unset LANG LC_ALL
#	patch -Np1 -i ../OOo_2.3.1-use_bin_hsqldb-1.patch
	./bootstrap
	. LinuxX86Env.Set.sh
#	source LinuxX86Env.Set.sh
#	./bootstrap ave
 
       cp /usr/include/X11/extensions/Xrender.h x11_extensions/inc/Xrender.h
	dmake
# pushd instsetoo_native/unxlngi6.pro/OpenOffice/inative/install/fr/linux-2.6-intel/buildroot/opt

#	cp -r /home/ooo-compile/openoffice-fr/src/$OOdir $SRC/
#	cd $OOdir

	cp -r -v instsetoo_native/unxlngi6.pro/OpenOffice/native/install/fr/linux-2.6-intel/buildroot/* $PKG/
#        popd
	cd $PKG/opt
	mv openoffice.org3 openoffice3
        for appl in sbase scalc sdraw simpress smath soffice spadmin swriter
	do
    	ln -v -sf /opt/openoffice3/program/$appl $PKG/usr/bin/$appl
	done
	cd ../../src/$OOdir/
	cd sysui/desktop/icons
	install -v -d $PKG/usr/share/icons/{hicolor,locolor} -m755
	cp -r -v hicolor/*x* $PKG/usr/share/icons/hicolor
	cp -r -v locolor/*x* $PKG/usr/share/icons/locolor

	install -v -d /usr/share/applications -m 755 &&
	cd $PKG/opt/openoffice3/share/xdg/
	chmod 644 *
	for appl in *.desktop
	do
    		sed -i '/Exec/d' $appl
    		echo "Exec=/usr/bin/s`echo $appl | sed 's/.desktop//'`" >> $appl
    		sed -i '/Icon/d' $appl
    		echo "Icon=`echo $appl | sed 's/.desktop//'`" >> $appl
	done
	sed -i 's@bin/sprinteradmin@bin/spadmin@' printeradmin.desktop &&
	chmod 444 *
	cp -v *.desktop $PKG/usr/share/applications

}