Commit 6c96dea4 authored by AlmAck's avatar AlmAck

added a parallel local-gen script to be able to build the locales correctly

parent 0a1b0c22
......@@ -12,8 +12,11 @@ arch=('x86_64')
url="http://www.chakraos.org/"
license=('GPL')
source=("skel.tar.gz")
source=("$pkgname"::"git://gitorious.org/chakra/${_gitname}.git#commit=${_gitsha}")
md5sums=('SKIP')
source=("$pkgname"::"git://gitorious.org/chakra/${_gitname}.git#commit=${_gitsha}"
'locale-gen-fixme')
install=chakra-live-skel.install
md5sums=('SKIP'
'476e9113489f93b348b21e144b6a8fcf')
package() {
cd ${srcdir}/${pkgname}/chakra-live-packages/chakra-live-skel/skel
......@@ -21,4 +24,8 @@ package() {
cp -a $folder ${pkgdir}; \
done
chmod 750 ${pkgdir}/etc/sudoers.d/
# copy the parallel version of locale-gen
install -dm755 ${pkgdir}/usr/sbin
install -m755 ${srcdir}/locale-gen-fixme ${pkgdir}/usr/sbin
}
post_install() {
ldconfig -r .
locale-gen-fixme
}
#!/bin/sh
set -e
LOCALEGEN=/etc/locale.gen
LOCALES=/usr/share/i18n/locales
if [ -n "$POSIXLY_CORRECT" ]; then
unset POSIXLY_CORRECT
fi
[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
# Remove all old locale dir and locale-archive before generating new
# locale data.
rm -rf /usr/lib/locale/* || true
umask 022
is_entry_ok() {
if [ -n "$locale" -a -n "$charset" ] ; then
true
else
echo "error: Bad entry '$locale $charset'"
false
fi
}
echo "Generating locales..."
while read locale charset; do \
case $locale in \#*) continue;; "") continue;; esac; \
is_entry_ok || continue
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
echo -n ".$charset"; \
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
echo -n '...'; \
if [ -f $LOCALES/$locale ]; then input=$locale; else \
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
echo ' done'; \
done < $LOCALEGEN
echo "Generation complete."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment