Commit 43f888ad authored by Natanael Copa's avatar Natanael Copa

abuild: make it possible to override lang_subpkg

We alos introduce $langdir where you can set other dir to look for
localization dirs.
parent 85b54b35
...@@ -478,17 +478,25 @@ prepare_subpackages() { ...@@ -478,17 +478,25 @@ prepare_subpackages() {
fi fi
} }
lang_subpkg() { default_lang_subpkg() {
if [ -z "$lang" ]; then if [ -z "$lang" ]; then
error "lang is not set" error "lang is not set"
return 1 return 1
fi fi
pkgdesc="$pkgname language pack for $lang"
arch="noarch" arch="noarch"
install_if="$pkgname=$pkgver-r$pkgrel lang-$lang" install_if="$pkgname=$pkgver-r$pkgrel lang-$lang"
mkdir -p "$subpkgdir"/usr/share/locale local dir
mv "$pkgdir"/usr/share/locale/$lang* \ for dir in ${langdir:-/usr/share/locale}; do
"$subpkgdir"/usr/share/locale/ \ mkdir -p "$subpkgdir"/$dir
mv "$pkgdir"/$dir/$lang* \
"$subpkgdir"/$dir/ \
|| return 1 || return 1
done
}
lang_subpkg() {
default_lang_subpkg
} }
prepare_language_packs() { prepare_language_packs() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment