# $Id: PKGBUILD 213127 2014-05-19 14:15:57Z svenstaro $
# 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-es'
   'calligra-l10n-et'
   'calligra-l10n-eu'
   '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-uk'
   'calligra-l10n-zh_cn'
   'calligra-l10n-zh_tw')
pkgver=2.8.3
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}-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}-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}-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=('278c791eda6c61261f5797c14c1a6c7c'
         '2cd028cdd51e469ffda4199cdb74edc7'
         'dec926755041db16bc11e934cb5c2e14'
         '694dc45c1df24b3afdba9b35e0920cdb'
         '78cfd014eda79d4ff0a4d2cd9b25860d'
         'e18326c7e1f09041d9e3aca5d7269f92'
         '8b3b5e730da093ddb93c982c7bbd7a42'
         'e4f126bdd41913cf34106fd53c9e6441'
         '639e851b6f23e913db8784adfdd1dc10'
         '26e233a71930ee74032734186692c9a1'
         'cc3f810547ec00b0544dd26739a3f471'
         'fbcb9b613cdf672026cece530d509874'
         '7bf598efcfa57594af105322d361b405'
         '77091516cad7f88db527e61265c58369'
         'e91409ee00da4943fe2e9ee9f478a5bc'
         '4dcfc63baeba2fc8ec5cc5ef97489dd0'
         '9e3369d49a4cb7f63cc18dbb83498f92'
         '2b1dc6e34bfab4963672d20959bd313b'
         'c9c95f33c5e37eba1509e26a1ed0450d'
         '65e113d8bedad04c91dc36d4b1eac143'
         'bb274e56c2e4011a35b9e1b4163fa350'
         '7a5ab9a78c7d7500f824cd2c7b6c8e0d'
         'fef9b587e40ec9fc72d6dcc4df115dfd'
         '8f1bcadedf7082912bef37025b7e4b7a'
         'f52279cbb4bd5bab813f2d310be7520b'
         '7cdc16c67c525fc6ad44ef1cba254d5d'
         'fc8a0b06ef5ff1afcd0efc685687c0e8'
         'a8552b153de91f72636f8dd924100f9f'
         '22051f599d3ac702c1a43a046bd2a3de')

build() {
  for lang in bs ca ca@valencia cs da de el es et eu fi fr gl hu it kk nb nds \
    nl pl pt pt_BR ru sk sl 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-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-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
}
