summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-12-14 22:20:25 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-12-14 22:20:25 +0400
commit967d73dbaa7c376ab993bec5557fb2bd51b9be9c (patch)
treefe7488ec89a37a7daf048ed96353d3e52225a705
parente958d25edd7ca8b898ba1ec857101bf36b2c3df2 (diff)
downloadillumos-packaging-967d73dbaa7c376ab993bec5557fb2bd51b9be9c.tar.gz
libc (2.10+11) unstable; urgency=low
* Added the locales-all package
-rw-r--r--libc/debian/changelog6
-rw-r--r--libc/debian/control13
-rwxr-xr-xlibc/debian/generate-locales-all24
-rwxr-xr-xlibc/debian/rules4
4 files changed, 45 insertions, 2 deletions
diff --git a/libc/debian/changelog b/libc/debian/changelog
index ea3968c..7d9041d 100644
--- a/libc/debian/changelog
+++ b/libc/debian/changelog
@@ -1,3 +1,9 @@
+libc (2.10+11) unstable; urgency=low
+
+ * Added the locales-all package
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sat, 14 Dec 2013 21:34:28 +0400
+
libc (2.10+10) unstable; urgency=low
* Link lddstub to -lc to make it a dynamic executable with GNU ld
diff --git a/libc/debian/control b/libc/debian/control
index 2c51a56..fd17b39 100644
--- a/libc/debian/control
+++ b/libc/debian/control
@@ -170,6 +170,19 @@ Description: C Library: National Language (locale) data [support]
actually get generated. This is a space-saver over how this package used
to be, with all locales generated by default.
+Package: locales-all
+Architecture: any
+Section: localization
+Priority: extra
+Multi-Arch: foreign
+Depends: ${locale:Depends}, ${misc:Depends}
+Provides: locales
+Description: C Library: Precompiled locale data
+ This package contains the precompiled locale data for all supported locales.
+ A better alternative is to install the locales package and only select
+ desired locales, but it can be useful on a low-memory machine because some
+ locale files take a lot of memory to be compiled.
+
Package: libsunelf1-dev
Architecture: illumos-any
Priority: optional
diff --git a/libc/debian/generate-locales-all b/libc/debian/generate-locales-all
new file mode 100755
index 0000000..a5ed110
--- /dev/null
+++ b/libc/debian/generate-locales-all
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+set -u
+
+LOCALES_PKG=debian/locales
+LOCALES_ALL_PKG=debian/locales-all
+LOCALES=/usr/share/i18n/locales
+LOCALEDEF=${LOCALEDEF-debian/libc-bin/usr/bin/localedef}
+
+LOCALES_LIST=`awk '{print $1}' debian/SUPPORTED`
+
+set -x
+mkdir -p $LOCALES_ALL_PKG/usr/lib/locale
+while read -r line; do
+ set -- $line
+ echo "Generating $1 / $2 ..."
+ (cat $LOCALES_PKG/$LOCALES/$1.src && gunzip -c $LOCALES_PKG/usr/share/i18n/LC_DATA.gz) | \
+ $LOCALEDEF -f $LOCALES_PKG/$LOCALES/$2.cm \
+ $LOCALES_ALL_PKG/usr/lib/locale/$1
+done < debian/SUPPORTED
+
+exit 0
+
diff --git a/libc/debian/rules b/libc/debian/rules
index 53d9230..eb2d5b6 100755
--- a/libc/debian/rules
+++ b/libc/debian/rules
@@ -235,6 +235,7 @@ binary-stamp: install-stamp
find debian/locales/usr/share/i18n/locales -name *.UTF-8.src | \
xargs sed -i '/^LC_CTYPE/,/^END LC_CTYPE/d'
# language=C because of ld.so.1.1
+ ./debian/generate-locales-all
dh_installman --language=C
dh_installdocs
dh_installexamples
@@ -266,7 +267,7 @@ binary-stamp: install-stamp
# and when regenerating locales will insert contents of LC_DATA
# into source locale file. Illumos localedef does not support
# copy action for including other files source files.
-debian/LC_DATA.gz:
+debian/LC_DATA.gz: patch-stamp
sh usr/src/cmd/localedef/data/ctype.sh \
usr/src/cmd/localedef/data/*.UTF-8.src \
| gzip -c -9 > $@
@@ -291,5 +292,4 @@ clean: unpatch
rm -f debian/locales.config
rm -rf usr .pc
rm -f crle
- rm -f libc-fake.so