2 # Maintainer: Kurt J. Bosch <kjb-temp-2009 at alpenjodel.de>
3 # Modified for Czech language by Jirka Zelinka j.zelinka@centrum.cz
6 pkgname=openoffice-base-bin-cs
9 pkgdesc="OpenOffice.org - Repackaged from upstream"
10 arch=('i686' 'x86_64')
11 url="http://openoffice.org/"
12 license=('LGPL3') # more below
13 # Some depends can be found in the README, some with namcap, some with _extract_depends() below
15 'desktop-file-utils' # install script
20 'sh' # freedesktop-menus
21 'shared-mime-info' # install script
24 'coreutils' 'findutils' 'rpmextract'
25 # 'binutils' 'tar' # _debunpack()
28 'libgail-gnome: GNOME Assistive Technology'
29 'mime-types: provides /etc/mime.types'
30 'openoffice-de-bin: Language pack (example)'
32 backup=() # more below
34 install=openoffice-bin-cs.install
36 _url="http://download.services.openoffice.org/files"
37 _arch="-ARCH-" # feed the AUR ;-)
40 in "i686" ) _arch="x86" ; md5sums=( 'f3f4984212021253df3507767eccc5b0' )
41 ;; "x86_64" ) _arch="x86-64"; _src_extra="-wJRE"; md5sums=( '00c9d69a798d5d7437a30a93f6f4df97' )
43 _dirs=( "${srcdir}"/OOO330_m20_native_packed-1_${_lang}.9567 )
45 # deb tarballs contain no freedesktop integration !
46 source=("${_url}"/localized/cs/${pkgver}/OOo_${pkgver}_Linux_${_arch}_install-rpm${_src_extra}_cs.tar.gz )
48 #_debunpack() { ar -p "$1" data.tar.gz | tar -xz; }
52 # unpack RPMs and DEBs
54 for dir in "${_dirs[@]}"; do
55 for file in $( cd "${dir}" && find -type f \( -name '*.rpm' -o -name '*.deb' \) ); do
56 if [[ $file == */desktop-integration/* && $file != *-freedesktop-menus-* ]] ||
57 [[ $file == */jre* ]]; then
58 msg2 "Skipping ${file#./}"
61 msg2 "Extracting ${file#./}"
63 in *.rpm ) rpmextract.sh "${dir}/${file}"
64 ;; *.deb ) _debunpack "${dir}/${file}"
71 for file in $( find "${base}" -type f -name 'THIRDPARTY*LICENSE*.html' ); do
72 mkdir -p usr/share/licenses/${pkgname}
73 ln -sT /${file} usr/share/licenses/${pkgname}/THIRDPARTY-$((++i)).html
74 license+=( "custom:THIRDPARTY-$i" )
77 backup+=( ${base}/openoffice.org3/program/sofficerc )
79 mkdir -p usr/lib/mozilla/plugins
80 ln -s -t usr/lib/mozilla/plugins /${base}/openoffice.org3/program/libnpsoplugin.so
83 # Function for listing external dependencies
85 (( $# == 1 )) || { echo "Usage: $FUNCNAME <RPMS-directory-path>" >&2; return 1; }
88 for f in $( find -type f -name '*.rpm' ); do
89 r=$( rpmmeta -t requirename $f | sed -re 's;(ooobasis|openoffice|rpmlib)[^ ]*;;g' )
90 [[ $r ]] && echo ${f#./} $r
95 # Function for extracting install script code
97 (( $# == 1 )) || { echo "Usage: $FUNCNAME <RPMS-directory-path>" >&2; return 1; }
99 ## arg 1: the new package version
102 ## code from freedesktop-menus rpm tag postin
104 #### Inappropriate parts should be removed:
105 #### - mime.type stuff is already provided by mime-types package
106 #### - /etc/mailcap does not exist on ArchLinux normaly
107 #### - Don't use 'which' because tools are already in depends
110 rpmmeta -t postin "${1}"/desktop-integration/openoffice*-freedesktop-menus-*.noarch.rpm
114 ## arg 1: the new package version
115 ## arg 2: the old package version
120 ## arg 1: the old package version
123 ## code from freedesktop-menus rpm tag postun
125 #### inappropriate parts should be removed
128 rpmmeta -t postun "${1}"/desktop-integration/openoffice*-freedesktop-menus-*.noarch.rpm