summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-30 16:23:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-30 16:23:45 +0000
commitdc0edc4cf99b00d943e2c601306682141afff174 (patch)
treeec0e98d75ec0892f32c0df60e824d1df92218b5b /perl-install
parent6c8dd68e7062a96d88a59cc128ac01ec28490a97 (diff)
downloaddrakx-backup-do-not-use-dc0edc4cf99b00d943e2c601306682141afff174.tar
drakx-backup-do-not-use-dc0edc4cf99b00d943e2c601306682141afff174.tar.gz
drakx-backup-do-not-use-dc0edc4cf99b00d943e2c601306682141afff174.tar.bz2
drakx-backup-do-not-use-dc0edc4cf99b00d943e2c601306682141afff174.tar.xz
drakx-backup-do-not-use-dc0edc4cf99b00d943e2c601306682141afff174.zip
automatic handling of locales.tar.bz2 based on installed glibc
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile4
-rw-r--r--perl-install/share/.cvsignore2
-rwxr-xr-xperl-install/share/gen_locales.sh42
-rw-r--r--perl-install/share/locales-skeleton.tar.bz2bin0 -> 25822 bytes
4 files changed, 45 insertions, 3 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 5bd11ad7c..60d8cab2b 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -123,11 +123,9 @@ ifeq (i386,$(ARCH))
endif
ln -sf ash $(DEST)/usr/bin/sh
+ cd share ; ./gen_locales.sh
for i in fonts keyboards locales keymaps; do tar xfj `../tools/specific_arch share/$$i.tar.bz2` -C $(DEST); done
-# # temporary hack to have at least good UTF-8 based locales (otherwise rpmlib segfaults)
- cd $(DEST)/usr/share/locale/UTF-8 ; for i in `find -type f`; do cp -f /usr/share/locale/en/$$i $$i; done
-
grep ChangeLog CVS/Entries > $(DEST)/usr/share/VERSION
gzip -9f $(DEST)/usr/share/ldetect-lst/*
diff --git a/perl-install/share/.cvsignore b/perl-install/share/.cvsignore
new file mode 100644
index 000000000..4173dc671
--- /dev/null
+++ b/perl-install/share/.cvsignore
@@ -0,0 +1,2 @@
+locales.tar.bz2
+locales-*-drakx.tar.bz2
diff --git a/perl-install/share/gen_locales.sh b/perl-install/share/gen_locales.sh
new file mode 100755
index 000000000..bb330d888
--- /dev/null
+++ b/perl-install/share/gen_locales.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+locales=`rpm -q locales`
+file="$locales-drakx.tar.bz2"
+
+# already build?
+[ -e $file ] && exit 0
+
+# remove previous ones
+rm -f locales-*-drakx.tar.bz2
+
+rm -rf .tmp ; mkdir .tmp ; cd .tmp
+tar xfj ../locales-skeleton.tar.bz2
+
+# locale utf-8
+for i in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_MESSAGES/SYS_LC_MESSAGES ; do
+ cp -f /usr/share/locale/UTF-8/$i usr/share/locale/UTF-8/$i
+done
+
+# lc_ctype for common encoding
+for i in CP1251 CP1255 CP1256 ISO-8859-13 ISO-8859-14 ISO-8859-15 ISO-8859-2 ISO-8859-3 ISO-8859-5 ISO-8859-7 ISO-8859-9 ISO-8859-9E ; do
+ f=usr/share/locale/$i/LC_CTYPE
+ [ -e /$f ] || { echo missing /$f ; exit 1 ; }
+ cp -f /$f $f
+done
+
+rm -rf .tmp2 ; mkdir .tmp2 ; cd .tmp2
+for i in hy ja ko ta th vi zh_CN.GB2312 zh_TW.Big5 ; do
+ ii=locales-`echo $i | sed 's/\(..\).*/\1/'`
+ rpm2cpio /RPMS/$ii-*.rpm | cpio -id --quiet
+ f=usr/share/locale/$i/LC_CTYPE
+ [ -e $f ] || { echo missing $f in package $ii ; exit 1 ; }
+ cp -f $f ../$f
+ rm -rf *
+done
+cd .. ; rm -rf .tmp2
+
+tar cfj ../$file usr
+
+cd .. ; rm -rf .tmp
+
+ln -sf $file locales.tar.bz2
diff --git a/perl-install/share/locales-skeleton.tar.bz2 b/perl-install/share/locales-skeleton.tar.bz2
new file mode 100644
index 000000000..9e96c72ca
--- /dev/null
+++ b/perl-install/share/locales-skeleton.tar.bz2
Binary files differ