mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
121 lines
2.8 KiB
Bash
121 lines
2.8 KiB
Bash
# How to enable a language:
|
|
# check the web page:
|
|
# http://l10n.kde.org/stats/gui/stable-kde4/essential/
|
|
# and enable only languages with 100% completeness
|
|
|
|
# Include global configuration
|
|
source ../kdeapps.conf
|
|
|
|
pkgbase=kde-l10n
|
|
arch=('x86_64')
|
|
pkgver=${_kdever}
|
|
pkgrel=1
|
|
url="http://www.kde.org"
|
|
license=('GPL')
|
|
depends=("kdelibs>=${_libsver}")
|
|
makedepends=('kdoctools' 'ki18n' 'qt5-tools' 'extra-cmake-modules' 'automoc4' 'docbook-xsl')
|
|
options=('docs')
|
|
|
|
_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=()
|
|
source=()
|
|
sha256sums=()
|
|
|
|
for _lang in "${_languages[@]}"; do
|
|
_locale=${_lang%% *}
|
|
_pkgname=kde-l10n-$_locale
|
|
|
|
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`)
|
|
validpgpkeys=(${Avalidpgpkeys[@]})
|
|
done
|
|
|
|
prepare() {
|
|
for _lang in "${_languages[@]}"; do
|
|
_locale=${_lang%% *}
|
|
|
|
# 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
|
|
|
|
done
|
|
}
|
|
|
|
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")
|
|
cd build/$1
|
|
make DESTDIR="$pkgdir" install
|
|
}
|