# $Id: PKGBUILD 200399 2013-11-28 07:36:22Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>

pkgbase=calligra-l10n
pkgname=('calligra-l10n-bs'
   'calligra-l10n-ca'
   'calligra-l10n-cs'
   'calligra-l10n-da'
   'calligra-l10n-de'
   'calligra-l10n-el'
   'calligra-l10n-es'
   'calligra-l10n-et'
   'calligra-l10n-fi'
   'calligra-l10n-fr'
   'calligra-l10n-gl'
   'calligra-l10n-hu'
   'calligra-l10n-it'
   '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-sl'
   'calligra-l10n-sv'
   'calligra-l10n-tr'
   'calligra-l10n-uk'
   'calligra-l10n-zh_cn'
   'calligra-l10n-zh_tw')
pkgver=2.7.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}-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}-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}-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}-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}-sl-${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=('c28966dce75cc5731d13f6461cba6977'
         '44d4b9167167b51da439d30945d1c898'
         'c2601b227432c6e2a26d174f191942cb'
         'eeeb7a652603eefcad25466c441ac700'
         'a2b98cfd74dab9c20e07b478b9aef4c6'
         '83597b02415eed90b49d699707540ba7'
         'f217fe79f710a0316add8c10df5e20d1'
         '9b4fa02ddad5373d79aaf2c0f9a679c6'
         'ba18303b4aeef8cca7fa0fb6b44aaccc'
         '968b2b558a6d3ba22466de3a3f5a6163'
         '116ba36f96ebeaad778a9ec9dbbde396'
         '39f007c871406102192c420d86dac78f'
         'dc72617f9e6fc1fb99435141c1b62aa8'
         '7a07e2ec30a8a2bf21f748f4076f7926'
         '76aa878f9f7d14021a7360896f2eed40'
         '1a6af385cbb7ce70724fc2d6be57d725'
         'c654a558c39398165a4cdc29164d5f6c'
         '8b2cd22d771f8f92b681adbee84a6144'
         '13e9d33cb428040518247a5e304c2e75'
         'cf7a706eeb04ca44100d550c9f6bda12'
         '529fab32d05384c702b78c76cc6375cd'
         '6b89099115630ee46ce12b4cf1916701'
         'fb6db0304d6f531136b673338688aeac'
         'c2e0180460609af6e25c8107201ae000'
         'c6b22213e65a6eda16946ad0644e800f'
         '7ba49bdd90870b63479df782f57f1488'
         'bc8b5570928b4e83eaceedbd60aae23f'
         '3fb85153b2800f5527d3b76f54d5af0f')

build() {
  for lang in bs ca cs da de el es et fi fr gl hu it kk nb nds \
    nl pl pt pt_BR ru sk sl 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-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-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-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-sl() {
  pkgdesc=('Slovenian Localization for Calligra')
  replaces=('koffice-l10n-sl')
  cd "${srcdir}"/build/sl
  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
}
