wok-6.x annotate locale-fr/receipt @ rev 2925

Do not use busybox depmod
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 07 09:09:46 2009 +0200 (2009-05-07)
parents
children b48930694762
rev   line source
pankso@2892 1 # SliTaz package receipt
pankso@2892 2
pankso@2892 3 PACKAGE="locale-fr"
pankso@2892 4 VERSION="2.0"
pankso@2892 5 CATEGORY="system-tools"
pankso@2892 6 SHORT_DESC="French locale pack."
pankso@2892 7 MAINTAINER="pankso@slitaz.org"
pankso@2892 8 DEPENDS="glibc-base"
pankso@2892 9 BUILD_DEPENDS="glibc glibc-locale"
pankso@2892 10 WEB_SITE="http://www.slitaz.org/"
pankso@2892 11
pankso@2892 12 # French messages are directly include in all packages by tazwok.
pankso@2892 13 CORE_PKGS=""
pankso@2892 14
pankso@2892 15 LOCALE="fr"
pankso@2892 16 LOCALEDEF="fr_FR"
pankso@2892 17 CHARMAP="ISO-8859-1"
pankso@2892 18
pankso@2892 19 # Rules to configure and make the package.
pankso@2892 20 compile_rules()
pankso@2892 21 {
pankso@2892 22 # Ensure packages are built.
pankso@2892 23 for pkg in $CORE_PKGS
pankso@2892 24 do
pankso@2892 25 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg
pankso@2892 26 done
pankso@2892 27 }
pankso@2892 28
pankso@2892 29 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@2892 30 # Genereted locale files are in /usr/lib/locale.
pankso@2892 31 genpkg_rules()
pankso@2892 32 {
pankso@2892 33 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
pankso@2892 34 cp -a stuff/etc $fs
pankso@2892 35 cp -a stuff/usr $fs
pankso@2892 36 PKG_NAME="$PACKAGE"
pankso@2892 37 PKG_VERS="$VERSION"
pankso@2892 38 # Get the core packages messages.
pankso@2892 39 for pkg in $CORE_PKGS
pankso@2892 40 do
pankso@2892 41 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt
pankso@2892 42 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
pankso@2892 43 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
pankso@2892 44 $fs/usr/share/locale
pankso@2892 45 fi
pankso@2892 46 done
pankso@2892 47 PACKAGE="$PKG_NAME"
pankso@2892 48 VERSION="$PKG_VERS"
pankso@2892 49 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
pankso@2892 50 }
pankso@2892 51
pankso@2892 52 # Post install to configure default locale.
pankso@2892 53 post_install()
pankso@2892 54 {
pankso@2892 55 local root
pankso@2892 56 root=$1
pankso@2892 57 # locale.conf
pankso@2892 58 if [ -s $root/etc/locale.conf ]; then
pankso@2892 59 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
pankso@2892 60 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
pankso@2892 61 fi
pankso@2892 62 }
pankso@2892 63
pankso@2892 64 # Back to C if it's the last used locale.
pankso@2892 65 post_remove()
pankso@2892 66 {
pankso@2892 67 if grep -q $LOCALEDEF /etc/locale.conf; then
pankso@2892 68 echo "LANG=C" > /etc/locale.conf
pankso@2892 69 echo "LC_ALL=C" >> /etc/locale.conf
pankso@2892 70 fi
pankso@2892 71 }