blob: 0be210ef410a986d1efffc989772e5dc2c174810 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
From 43f888ad5e92b2242f512992c71902100956a87a Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 2 Sep 2011 09:35:55 +0000
Subject: [PATCH] abuild: make it possible to override lang_subpkg
We alos introduce $langdir where you can set other dir to look for
localization dirs.
---
abuild.in | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/abuild.in b/abuild.in
index 4fd739f..e5a24eb 100755
--- a/abuild.in
+++ b/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() {
--
1.7.6.1
|