summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-09-30 06:47:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-09-30 06:47:28 +0000
commit0b836466143a7ff7f9fd45cd5a2a4f7a1ec3663f (patch)
treeb0199f2fecc9344a2a803dc9ad21f64beed59d72 /abuild.in
parent624d98d599859d60cb4a015a1ea544be2f14fb42 (diff)
downloadabuild-0b836466143a7ff7f9fd45cd5a2a4f7a1ec3663f.tar.gz
abuild-0b836466143a7ff7f9fd45cd5a2a4f7a1ec3663f.tar.bz2
abuild-0b836466143a7ff7f9fd45cd5a2a4f7a1ec3663f.tar.xz
abuild-0b836466143a7ff7f9fd45cd5a2a4f7a1ec3663f.zip
abuild: implement automatic -lang subpackages
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/abuild.in b/abuild.in
index e5a24eb..76eb4a0 100755
--- a/abuild.in
+++ b/abuild.in
@@ -478,6 +478,21 @@ prepare_subpackages() {
fi
}
+default_lang() {
+ pkgname="Languages for package $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel lang"
+ arch="noarch"
+ local dir
+ for dir in ${langdir:-/usr/share/locale}; do
+ mkdir -p "$subpkgdir"/${dir%/*}
+ mv "$pkgdir"/"$dir" "$subpkgdir"/"$dir" || return 1
+ done
+}
+
+lang() {
+ default_lang
+}
+
default_lang_subpkg() {
if [ -z "$lang" ]; then
error "lang is not set"