# $Id: PKGBUILD 216505 2014-07-04 18:28:04Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>

pkgbase=calligra-l10n
pkgname=('calligra-l10n-bs'
   'calligra-l10n-ca'
   'calligra-l10n-ca@valencia'
   'calligra-l10n-cs'
   'calligra-l10n-da'
   'calligra-l10n-de'
   'calligra-l10n-el'
   'calligra-l10n-en_gb'
   'calligra-l10n-es'
   'calligra-l10n-et'
   'calligra-l10n-eu'
   'calligra-l10n-fi'
   'calligra-l10n-fr'
   'calligra-l10n-gl'
   'calligra-l10n-hu'
   'calligra-l10n-it'
   'calligra-l10n-ja'
   'calligra-l10n-kk'
   'calligra-l10n-nb'
   'calligra-l10n-nds'
   'calligra-l10n-nl'
   'calligra-l10n-pl'
   'calligra-l10n-pt'
   'calligra-l10n-pt_br'
   'calligra-l10n-ru'
   'calligra-l10n-sk'
   'calligra-l10n-sv'
   'calligra-l10n-uk'
   'calligra-l10n-zh_cn'
   'calligra-l10n-zh_tw')
pkgver=2.8.5
pkgrel=1
pkgdesc="Localization for Calligra"
arch=('any')
url='http://www.calligra-suite.org/'
license=('LGPL')
makedepends=('cmake' 'automoc4' 'kdelibs')
options=('docs')
source=("http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-bs-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-ca-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-ca@valencia-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-cs-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-da-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-de-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-el-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-en_GB-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-es-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-et-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-eu-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-fi-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-fr-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-gl-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-hu-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-it-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-ja-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-kk-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-nb-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-nds-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-nl-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-pl-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-pt-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-pt_BR-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-ru-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-sk-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-sv-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-uk-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-zh_CN-${pkgver}.tar.xz"
  "http://download.kde.org/stable/calligra-${pkgver}/${pkgbase}/${pkgbase}-zh_TW-${pkgver}.tar.xz")
md5sums=('ca78faf826f91c4b71a8d16e71dc7963'
         'c1a930ee854cf4dd637b826c55b958ce'
         'c541e41ef345dc4a4265056a32670afa'
         '695c99ae5e407882c6c0e8f41e92e071'
         '0f2680760434b0ed6b9b13beab93819a'
         'acf75a2b936e67fe0eb2a1216758b795'
         '8988c584329251bc1a0c72b340d8060e'
         'dfd3c49d148ddd597c003dc426e86809'
         '1cf0c858f5f15bfc464ebc939b2e792b'
         '86c8c447269021d15e3e0fa704309199'
         '2f2d8debc2fcff5295af8fe806487084'
         '49733484cb599484ca8ce36a2963e651'
         '9466967f0c1632a10aec4f98a36c4c29'
         '11e1759fb6d0742f0cddc24569cdb951'
         '724edbba5e7ab65f8d8640db211d1851'
         'c52bd9a46c27a4106aaf0f688eec4525'
         'b7cef30fe4d362b389782ef174a4fa96'
         '88bde2beb644ab49d16cc258cc7d1902'
         '8e96bb8799a5abd18f89d729af4aa8ca'
         '75a309c5c50af569ade85fecde31353e'
         'fb1bc7b5cb71e19105e701faa163a8b8'
         '7d603066961cd1f0531194f0c69ce762'
         '93777d79e35eddc650b542826cc0c1af'
         'cb1133e030919aec576325244cd1ad2f'
         '9d08b8ac9c180c0c50daedcb2760bc01'
         '5716557badd043f33f1b7b7d156e39c6'
         'aa956e05b86accb890d727bee7521017'
         '73a404be3560eff3a843da5334b542b8'
         '76e7e3785c2e44139f3cb4fc01346b62'
         '89880793fe955edd7a9f1ebfd9058d69')

build() {
  for lang in bs ca ca@valencia cs da de el en_GB es et eu fi fr gl hu it ja kk nb nds \
    nl pl pt pt_BR ru sk sv uk zh_CN zh_TW; do
    mkdir -p build/$lang
    cd build/$lang
    cmake ${srcdir}/${pkgbase}-$lang-${pkgver} \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=/usr
    make
    cd ../..
  done
}

package_calligra-l10n-bs() {
  pkgdesc=('Bosnian Localization for Calligra')
  replaces=('koffice-l10n-bs')
  cd "${srcdir}"/build/bs
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-ca() {
  pkgdesc=('Catalan Localization for Calligra')
  replaces=('koffice-l10n-ca')
  cd "${srcdir}"/build/ca
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-ca@valencia() {
  pkgdesc=('Catalan (Valencia) Localization for Calligra')
  replaces=('koffice-l10n-ca@valencia')
  cd "${srcdir}"/build/ca@valencia
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-cs() {
  pkgdesc=('Czech Localization for Calligra')
  replaces=('koffice-l10n-cs')
  cd "${srcdir}"/build/cs
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-da() {
  pkgdesc=('Danish Localization for Calligra')
  replaces=('koffice-l10n-da')
  cd "${srcdir}"/build/da
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-de() {
  pkgdesc=('German Localization for Calligra')
  replaces=('koffice-l10n-de')
  cd "${srcdir}"/build/de
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-el() {
  pkgdesc=('Greek Localization for Calligra')
  replaces=('koffice-l10n-el')
  cd "${srcdir}"/build/el
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-en_gb () {
  pkgdesc=('British Localization for Calligra')
  replaces=('koffice-l10n-en_gb')
  cd "${srcdir}"/build/en_GB
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-es() {
  pkgdesc=('Spanish Localization for Calligra')
  replaces=('koffice-l10n-es')
  cd "${srcdir}"/build/es
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-et() {
  pkgdesc=('Estonian Localization for Calligra')
  replaces=('koffice-l10n-et')
  cd "${srcdir}"/build/et
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-eu() {
  pkgdesc=('Basque Localization for Calligra')
  replaces=('koffice-l10n-eu')
  cd "${srcdir}"/build/eu
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-fi() {
  pkgdesc=('Finnish Localization for Calligra')
  replaces=('koffice-l10n-fi')
  cd "${srcdir}"/build/fi
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-fr() {
  pkgdesc=('French Localization for Calligra')
  replaces=('koffice-l10n-fr')
  cd "${srcdir}"/build/fr
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-gl() {
  pkgdesc=('Galician Localization for Calligra')
  replaces=('koffice-l10n-gl')
  cd "${srcdir}"/build/gl
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-hu() {
  pkgdesc=('Hungarian Localization for Calligra')
  replaces=('koffice-l10n-hu')
  cd "${srcdir}"/build/hu
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-it() {
  pkgdesc=('Italian Localization for Calligra')
  replaces=('koffice-l10n-it')
  cd "${srcdir}"/build/it
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-ja() {
  pkgdesc=('Japanese Localization for Calligra')
  replaces=('koffice-l10n-ja')
  cd "${srcdir}"/build/ja
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-kk() {
  pkgdesc=('Kazakh Localization for Calligra')
  replaces=('koffice-l10n-kk')
  cd "${srcdir}"/build/kk
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-nb() {
  pkgdesc=('Norwegian Bookmal Localization for Calligra')
  replaces=('koffice-l10n-nb')
  cd "${srcdir}"/build/nb
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-nds() {
  pkgdesc=('Low Saxon Localization for Calligra')
  replaces=('koffice-l10n-nds')
  cd "${srcdir}"/build/nds
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-nl() {
  pkgdesc=('Dutch Localization for Calligra')
  replaces=('koffice-l10n-nl')
  cd "${srcdir}"/build/nl
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-pl() {
  pkgdesc=('Polish Localization for Calligra')
  replaces=('koffice-l10n-pl')
  cd "${srcdir}"/build/pl
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-pt() {
  pkgdesc=('Portugese Localization for Calligra')
  replaces=('koffice-l10n-pt')
  cd "${srcdir}"/build/pt
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-pt_br() {
  pkgdesc=('Brazilian Portugese Localization for Calligra')
  replaces=('koffice-l10n-pt_br')
  cd "${srcdir}"/build/pt_BR
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-ru() {
  pkgdesc=('Russian Localization for Calligra')
  replaces=('koffice-l10n-ru')
  cd "${srcdir}"/build/ru
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-sk() {
  pkgdesc=('Slovak Localization for Calligra')
  replaces=('koffice-l10n-sk')
  cd "${srcdir}"/build/sk
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-sv() {
  pkgdesc=('Swedish Localization for Calligra')
  replaces=('koffice-l10n-sv')
  cd "${srcdir}"/build/sv
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-uk() {
  pkgdesc=('Ukrainian Localization for Calligra')
  replaces=('koffice-l10n-uk')
  cd "${srcdir}"/build/uk
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-zh_cn() {
  pkgdesc=('Simplified Chinese Localization for Calligra')
  replaces=('koffice-l10n-zh_cn')
  cd "${srcdir}"/build/zh_CN
  make DESTDIR="${pkgdir}" install
}

package_calligra-l10n-zh_tw() {
  pkgdesc=('Traditional Chinese Localization for Calligra')
  replaces=('koffice-l10n-zh_tw')
  cd "${srcdir}"/build/zh_TW
  make DESTDIR="${pkgdir}" install
}
