updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / openoffice-pl-bin / PKGBUILD
blob714469f8f23d884f060ccc9556162f7059aa2765
1 # Maintainer: kfgz <kfgz at interia pl>
2 # Contributor: Kurt J. Bosch <kjb-temp-2009 at alpenjodel dot de>
4 _lang=pl
5 pkgname=openoffice-${_lang}-bin
6 pkgver=3.3.0
7 pkgrel=1
8 pkgdesc="Polish language pack for OpenOffice.org - Repackaged from upstream"
9 arch=('any')
10 url="http://openoffice.org/"
11 license=('LGPL3')
12 depends=('openoffice-base-bin')
13 makedepends=(
14         'coreutils' 'findutils' 'rpmextract'
15 #       'binutils' 'tar' # _debunpack()
17 options=(!strip docs)
19 _url="http://download.services.openoffice.org/files"
21 # RPMS directory name is same as in openoffice-base-bin (stable 3.3.0)
22 _pkgver="3.3.0rc10"
23 _dirs=( "${srcdir}"/OOO330_m20_native_packed-1_${_lang}.9567 )
25 source=("${_url}"/extended/${_pkgver}/OOo_${_pkgver}_20110118_Linux_x86_langpack-rpm_${_lang}.tar.gz)
27 md5sums=('9b7703b23cbdd62d21562c74c0105fb3')
29 #_debunpack() { ar -p "$1" data.tar.gz | tar -xz; }
31 package() {
32         cd "${pkgdir}"
33         # unpack RPMs and DEBs
34         local dir file
35         for dir in "${_dirs[@]}"; do
36                 for file in $( cd "${dir}" && find -type f \( -name '*.rpm' -o -name '*.deb' \) ); do
37                         msg2 "Extracting ${file#./}"
38                         case $file
39                         in *.rpm ) rpmextract.sh "${dir}/${file}"
40                         ;; *.deb ) _debunpack    "${dir}/${file}"
41                         esac
42                 done
43         done
44         local base=opt
45         # link license files
46         local file i=0
47         for file in $( find "${base}" -type f -name 'THIRDPARTY*LICENSE*.html' ); do
48                 mkdir -p usr/share/licenses/${pkgname}
49                 ln -sT /${file} usr/share/licenses/${pkgname}/THIRDPARTY-$((++i)).html
50                 license+=( "custom:THIRDPARTY-$i" )
51         done