mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-22 07:00:28 +00:00
abuild: make it possible to override lang_subpkg
We alos introduce $langdir where you can set other dir to look for localization dirs.
This commit is contained in:
parent
85b54b355e
commit
43f888ad5e
16
abuild.in
16
abuild.in
@ -478,17 +478,25 @@ prepare_subpackages() {
|
||||
fi
|
||||
}
|
||||
|
||||
lang_subpkg() {
|
||||
default_lang_subpkg() {
|
||||
if [ -z "$lang" ]; then
|
||||
error "lang is not set"
|
||||
return 1
|
||||
fi
|
||||
pkgdesc="$pkgname language pack for $lang"
|
||||
arch="noarch"
|
||||
install_if="$pkgname=$pkgver-r$pkgrel lang-$lang"
|
||||
mkdir -p "$subpkgdir"/usr/share/locale
|
||||
mv "$pkgdir"/usr/share/locale/$lang* \
|
||||
"$subpkgdir"/usr/share/locale/ \
|
||||
local dir
|
||||
for dir in ${langdir:-/usr/share/locale}; do
|
||||
mkdir -p "$subpkgdir"/$dir
|
||||
mv "$pkgdir"/$dir/$lang* \
|
||||
"$subpkgdir"/$dir/ \
|
||||
|| return 1
|
||||
done
|
||||
}
|
||||
|
||||
lang_subpkg() {
|
||||
default_lang_subpkg
|
||||
}
|
||||
|
||||
prepare_language_packs() {
|
||||
|
Loading…
Reference in New Issue
Block a user