# $Id: PKGBUILD 227298 2014-12-05 15:28:03Z 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-tr'
   'calligra-l10n-uk'
   'calligra-l10n-zh_cn'
   'calligra-l10n-zh_tw')
pkgver=2.8.7
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}-tr-${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=('d40b53e9266d0381fd6951daae0fbc69'
         '42dc9dd95b709ebfcb1f00cf69cf094f'
         '867aa2c3351bd67acecad6a0b4642a4c'
         '96232bbe66f1ee60a86bcf023670ced8'
         'a8dcfa38b9c3e8ca0eb8fbc68a7b21b8'
         'd17be021229e6ccc84582da889abedb8'
         'aa141334488455d590b01fc6104e7ea8'
         '7b02333d666f7edfcb00ebf5a34a671b'
         '743d02e730421d2caa802276f6917a6a'
         'd275542a37bf6e696123ff52e2c70345'
         'a45b9e10b511c83fd2a49f03dee42241'
         'a135128f4afe4125f4e82c166fa9b17d'
         'de076e3e38ccc698288420dc719c9357'
         'd8139eb50b743144852e328278d39164'
         '46e06d980692bdd86f114d16ff71187d'
         'e1ec962ac680cd9dce72e48dd9c754e6'
         '50a3272af6c6a62bf4f5978832b96181'
         '719acbca3e86c5ddc88ab0232d3e973b'
         '2400e204e613a9710a09d57a08eb2631'
         'a8d94ba46a914a9b6d63fa71a89ecf8a'
         'dfe2b5d1ee93ad60c361cfd01b4f2057'
         'ca3546b5449ac81334b9228c88f4172f'
         '5c5f0499d26545e26cdd9a8aa21a5928'
         '70e9b04b66aa74e836a23c1c606d5280'
         '4cb22f814b8c00040246b7d3e16fea29'
         '0a50e809722ad150dba660bd43b75db7'
         '10e5faad6c7ad0b9084978840cc75603'
         'd8c7d2da35097e355a139c7a346c5d7a'
         '09011b1829c1eafddb1987080b1e627d'
         'ed20dba78078a127feb206afaa0490cc'
         '20357723a567fddf2fcf12dd399b88a8')

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 tr 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-tr() {
  pkgdesc=('Turkish Localization for Calligra')
  replaces=('koffice-l10n-tr')
  cd "${srcdir}"/build/tr
  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
}
