diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-02 09:35:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-02 09:35:55 +0000 |
commit | 43f888ad5e92b2242f512992c71902100956a87a (patch) | |
tree | 3d03f0c11b2e512f3a7d1618c54782bee4039073 | |
parent | 85b54b355e416ccce6b34866bb3d7a5fa8f2bb5a (diff) | |
download | abuild-43f888ad5e92b2242f512992c71902100956a87a.tar.gz abuild-43f888ad5e92b2242f512992c71902100956a87a.tar.bz2 abuild-43f888ad5e92b2242f512992c71902100956a87a.tar.xz abuild-43f888ad5e92b2242f512992c71902100956a87a.zip |
abuild: make it possible to override lang_subpkg
We alos introduce $langdir where you can set other dir to look for
localization dirs.
-rwxr-xr-x | abuild.in | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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() { |