desktop/kde-l10n/PKGBUILD

121 lines
2.8 KiB
Bash
Raw Normal View History

# How to enable a language:
2015-05-31 20:56:09 +08:00
# check the web page:
# http://l10n.kde.org/stats/gui/stable-kde4/essential/
# and enable only languages with 100% completeness
2010-05-24 23:27:39 +08:00
2013-12-18 02:36:04 +08:00
# Include global configuration
source ../kdeapps.conf
2010-05-24 23:27:39 +08:00
2016-03-29 03:54:44 +08:00
pkgbase=kde-l10n
2014-05-14 20:41:32 +08:00
arch=('x86_64')
2010-05-24 23:27:39 +08:00
pkgver=${_kdever}
2015-05-31 20:56:09 +08:00
pkgrel=1
2010-05-24 23:27:39 +08:00
url="http://www.kde.org"
2016-03-29 03:54:44 +08:00
license=('GPL')
depends=("kdelibs>=${_libsver}")
makedepends=('kdoctools' 'ki18n' 'qt5-tools' 'extra-cmake-modules' 'automoc4' 'docbook-xsl')
options=('docs')
2015-03-05 06:05:11 +08:00
2016-03-29 03:54:44 +08:00
_languages=(
'ar "Arabic"'
'bs "Bosnian"'
'ca "Catalan"'
'ca@valencia "Catalan (Valencian)"'
'cs "Czech"'
'da "Danish"'
'de "German"'
'el "Greek"'
'en_GB "British English"'
'eo "Esperanto"'
'es "Spanish"'
'et "Estonian"'
'eu "Basque"'
'fa "Farsi"'
'fi "Finnish"'
'fr "French"'
'ga "Irish"'
'gl "Galician"'
'he "Hebrew"'
'hi "Hindi"'
'hr "Croatian"'
'hu "Hungarian"'
'ia "Interlingua"'
'id "Indonesian"'
'is "Icelandic"'
'it "Italian"'
'ja "Japanese"'
'kk "Kazakh"'
'km "Khmer"'
'ko "Korean"'
'lt "Lithuanian"'
'lv "Latvian"'
'mr "Marathi"'
'nb "Norwegian Bokmal"'
'nds "Low Saxon"'
'nl "Dutch"'
'nn "Norwegian Nynorsk"'
'pa "Panjabi/Punjabi"'
'pl "Polish"'
'pt "Portuguese"'
'pt_BR "Brazilian Portuguese"'
'ro "Romanian"'
'ru "Russian"'
'sk "Slovak"'
'sl "Slovenian"'
'sr "Serbian"'
'sv "Swedish"'
'tr "Turkish"'
'ug "Uyghur"'
'uk "Ukrainian"'
'zh_CN "Chinese Simplified"'
'zh_TW "Chinese Traditional"'
)
pkgname=()
2015-03-05 06:05:11 +08:00
source=()
sha256sums=()
2016-03-29 03:54:44 +08:00
for _lang in "${_languages[@]}"; do
_locale=${_lang%% *}
_pkgname=kde-l10n-$_locale
2016-03-29 03:54:44 +08:00
pkgname+=($_pkgname)
source+=("http://download.kde.org/stable/applications/$pkgver/src/$pkgbase/$pkgbase-$_locale-$pkgver.tar.xz")
eval "package_$_pkgname() {
_package $_lang
}"
sha256sums+=(`grep "$pkgbase-$_locale-$pkgver.tar.xz" ../kdeapps.sums | cut -d " " -f1`)
2017-08-11 00:14:23 +08:00
validpgpkeys=(${Avalidpgpkeys[@]})
2015-03-05 06:05:11 +08:00
done
2013-12-21 17:55:23 +08:00
2016-03-29 03:54:44 +08:00
prepare() {
for _lang in "${_languages[@]}"; do
_locale=${_lang%% *}
2010-05-24 23:27:39 +08:00
2016-03-29 03:54:44 +08:00
# Remove kde-runtime and kde-workspace docs, conflicts with plasma-desktop
sed -e '/kde-runtime/d' -e '/kde-workspace/d' -i $pkgbase-$_locale-$pkgver/4/$_locale/docs/CMakeLists.txt || true
2010-05-24 23:27:39 +08:00
2016-03-29 03:54:44 +08:00
done
2010-05-24 23:27:39 +08:00
}
2016-03-29 03:54:44 +08:00
build() {
for _lang in "${_languages[@]}"; do
_locale=${_lang%% *}
msg "Building $_locale"
mkdir -p build/$_locale
cd build/$_locale
cmake $srcdir/$pkgbase-$_locale-$pkgver \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make
cd ../..
done
}
_package() {
pkgdesc="$2 localization for KDE"
groups=("kde-uninstall" "kde-l10n")
2016-03-29 03:54:44 +08:00
cd build/$1
make DESTDIR="$pkgdir" install
2010-05-24 23:27:39 +08:00
}