1 # Contributor: Vamp898 <vamp898@web.de>
3 pkgname=libreoffice-git
6 pkgbase=libreoffice-git
9 _gitroot="git://anongit.freedesktop.org/libreoffice/bootstrap"
14 arch=('i686' 'x86_64')
15 pkgdesc="LibreOffice is a productivity suite that is compatible with other major office suites, and available on a variety of platforms."
16 url="http://www.documentfoundation.org/"
18 makedepends=( # makedepends
19 'boost' 'sane' 'perl-archive-zip' 'zip' 'unzip' 'xulrunner' 'unixodbc' 'hsqldb-java'
20 'apache-ant' 'gperf' 'poppler' 'kdelibs' 'gconf' 'cppunit'
21 'beanshell' 'vigra' 'libldap' 'lucene' 'libmythes' 'junit' 'libwpg' 'imagemagick'
22 # for additional ooo-build features
23 'mesa>=7.5' 'gstreamer0.10-base>=0.10.26' #'mono>=2.6.1'
24 #'saxon' - currently broken
25 # the depends from libreoffice main pkg
26 "curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.0' 'libxaw' "neon>=0.28.6"
27 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt'
28 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh'
29 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'java-runtime' 'gtk2' 'gcc' 'git' 'rsync' 'hyphen')
31 conflicts=('openoffice-base' 'go-openoffice' 'go-oo-bin-base')
33 _nOfCpu="$(grep processor /proc/cpuinfo | grep -v "model name" | wc -l)"
36 unset J2REDIR; unset J2SDKDIR; unset JAVA_HOME; unset CLASSPATH
37 [ -z "${JAVA_HOME}" ] && . /etc/profile.d/openjdk6.sh
38 [ -z "${MOZ_PLUGIN_PATH}" ] && . /etc/profile.d/mozilla-common.sh
39 [ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
41 # http://www.openoffice.org/issues/show_bug.cgi?id=103205
48 # sed -i -e "s/mkbundle2/mkbundle/g" patches/mono/*.diff || return 1
49 if [ ! -d ${_gitname} ] || [ ! -e fDownloads ] ; then
50 if [ ! -d ${_gitname} ]; then
51 git clone ${_gitroot} ${_gitname}
54 mkdir -p ${srcdir}/libo/patches/hotfixes/
55 cp ../buildfix_64bit_system_libjpeg.diff ${srcdir}/libo/patches/hotfixes/
60 if [ "$CARCH" = "x86_64" ]; then
61 EXTRAOPTS="--without-stlport"
62 # else EXTRAOPTS="--with-stlport --with-additional-sections=SystemGraphiteWithSTLport"
63 # fix i686 system cppunit with-stlport
64 else EXTRAOPTS="--without-stlport"
66 # our ArchLinux distribution patch until we go upstream
67 #patch -Np1 -i ../../ArchLinux.patch || return 1
71 ${srcdir}/libo/autogen.sh --with-distro=ArchLinux \
72 --with-build-version=" ArchLinux build-${pkgrel}" \
74 --with-srcdir=${srcdir} \
75 --with-max-jobs=${MAKEFLAGS/-j/} \
76 --with-installed-ooo-dirname="${pkgbase}" \
77 --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
78 --with-docdir=/usr/share/doc/packages/"${pkgbase}" \
79 --mandir=/usr/share/man \
98 --enable-presenter-console \
99 --enable-presenter-extra-ui\
100 --enable-report-builder\
101 --enable-wiki-publisher \
108 --with-watch-window \
113 --without-system-agg\
114 --without-system-libwps\
115 --without-system-mdds\
116 --without-myspell-dicts \
117 --with-system-dicts \
118 --with-external-dict-dir=/usr/share/hunspell \
119 --with-external-hyph-dir=/usr/share/hyphen \
120 --with-external-thes-dir=/usr/share/mythes \
121 --with-system-cppunit\
122 --with-system-libwpg\
123 --with-system-redland\
124 --without-system-saxon\
126 --with-ant-home="/usr/share/java/apache-ant"\
130 --with-system-mythes\
131 --with-system-unixodbc-headers\
132 --with-system-xrender-headers\
133 --with-system-headers\
135 --with-system-lucene\
136 --with-lucene-core-jar=/usr/share/java/lucene-core.jar\
138 --with-lucene-analyzers-jar=/usr/share/java/lucene-analyzers.jar\
139 $EXTRAOPTS || return 1
145 patch -Np0 -i patches/hotfixes/buildfix_64bit_system_libjpeg.diff
148 msg "Updating Repository"
153 patch -Np0 -i patches/hotfixes/buildfix_64bit_system_libjpeg.diff
155 LD_PRELOAD="" make || return 1
162 pkgdesc="a productivity suite that is compatible with other major office suites"
163 install=${pkgname}.install
164 depends=("curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.0' 'libxaw' "neon>=0.28.6"
165 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' "icu>=4.6" 'libxslt'
166 'redland' 'libgraphite' 'hyphen' 'lpsolve' 'gcc-libs' 'sh'
167 'hicolor-icon-theme' 'desktop-file-utils' 'shared-mime-info' 'java-runtime' 'gtk2') # keep gtk2 for install script
169 optdepends=( #'java-runtime: adds java support'
170 'libcups: adds printing support'
171 'gconf: adds additional gnome support'
172 'nss: adds support for signed files/macros'
173 'pstoedit: translates PostScript and PDF graphics into other vector formats'
174 'poppler: for shipped pdfimport extension'
175 'kdelibs: for kde integration'
176 'libmythes: for use in thesaurus'
177 'hsqldb-java: default database format for OpenOffice.org'
178 'beanshell: interactive java -- good for prototyping /macros'
179 'vigra: C++ computer vision library, usable in Basebmp'
180 'libmspack: library for Microsoft compression formats for use in FontOOo'
181 'libwpg: library for importing and converting Corel WordPerfect(tm) Graphics images'
182 'libldap: to get profiles via ldap'
183 'lucene: full-text search engine library for Java needed in the help section'
184 'sane: for scanner access'
185 'unixodbc: adds ODBC database support'
186 'mesa: for the OGLTrans extension'
187 'gstreamer0.10-base: + some gstr-plugins to support multimedia content, e.g. in impress')
188 # 'mono: allows UNO automation with Mono'
189 backup=(etc/libreoffice/sofficerc
190 etc/libreoffice/bootstraprc
191 etc/libreoffice/psprint.conf)
192 provides=('go-openoffice') #'openoffice-base'
193 conflicts=('go-openoffice') #'openoffice-base'
194 replaces=('go-openoffice')
198 . ./*[Ee]nv.[Ss]et.sh && \
199 ooinstall -l ${pkgdir}
202 mkdir -p usr/lib/libreoffice
203 mv basis3.3 usr/lib/libreoffice
204 mv CREDITS.odt usr/lib/libreoffice
205 mv LICENSE usr/lib/libreoffice
206 mv LICENSE.odt usr/lib/libreoffice
207 mv program usr/lib/libreoffice
208 mv readmes usr/lib/libreoffice
209 mv share usr/lib/libreoffice
210 mv ure usr/lib/libreoffice
212 # move sysui desktop files into place we want to use - javafilter and qstarter, but not unneeded printeradmin
213 mkdir -p ${pkgdir}/usr/share/applications
214 cp ${pkgdir}/usr/lib/libreoffice/share/xdg/javafilter.desktop ${pkgdir}/usr/share/applications/
215 cp ${pkgdir}/usr/lib/libreoffice/share/xdg/qstart.desktop ${pkgdir}/usr/share/applications/
216 # remove version in menu entry and make it visible
217 sed -i -e "s/3.3 Quickstarter/Quickstarter/g" ${pkgdir}/usr/share/applications/qstart.desktop
218 sed -i -e "/NoDisplay=true/d" ${pkgdir}/usr/share/applications/qstart.desktop
219 # remove unneeded .desktop files from vanilla sysui
220 rm -rf ${pkgdir}/usr/lib/libreoffice/share/xdg
222 # put configuration files into place
223 install -dm755 ${pkgdir}/etc/libreoffice
224 install -m644 ${pkgdir}/usr/lib/libreoffice/program/{bootstraprc,sofficerc} ${pkgdir}/etc/libreoffice/
225 install -m644 ${pkgdir}/usr/lib/libreoffice/basis3.3/share/psprint/psprint.conf ${pkgdir}/etc/libreoffice/
226 # install dummy links to make them found by LibO
227 cd ${pkgdir}/usr/lib/libreoffice/program/
228 ln -vsf /etc/libreoffice/{bootstraprc,sofficerc} .
229 cd ${pkgdir}/usr/lib/libreoffice/basis3.3/share/psprint/
230 ln -vsf /etc/libreoffice/psprint.conf .
232 #fix http://bugs.archlinux.org/task/17656
233 find ${pkgdir} -perm 444 -exec ls -lh {} \;
234 find ${pkgdir} -perm 444 -exec chmod 644 {} \;
235 find ${pkgdir} -perm 555 -exec ls -lh {} \;
236 find ${pkgdir} -perm 555 -exec chmod 755 {} \;
238 mkdir -p ${pkgdir}/usr/lib
239 cd ${pkgdir}/usr/lib/
240 ln -vsf ${pkgdir}/usr/lib/libreoffice/ure/lib/libuno_sal.so.3 .
241 ln -vsf ${pkgdir}/usr/lib/libreoffice/basis3.3/program/libsofficeapp.so .
242 cd ${pkgdir}/usr/lib/libreoffice/
243 ln -vsf ${pkgdir}/usr/lib/libreoffice/basis3.3 ./basis-link
245 mkdir -p ${pkgdir}/usr/bin
247 ln -vsf ${pkdir}/usr/lib/libreoffice/program/soffice .