wok annotate locale-id/receipt @ rev 1249

Cups: add gnutls dependancy
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 12 15:36:40 2008 +0000 (2008-08-12)
parents c359d1c70cff
children 37105c976ab8
rev   line source
pankso@950 1 # SliTaz package receipt
pankso@950 2
pankso@950 3 PACKAGE="locale-id"
pankso@950 4 VERSION="1.0"
pankso@950 5 CATEGORY="system-tools"
pankso@950 6 SHORT_DESC="Indonesian locale pack."
pankso@950 7 MAINTAINER="pankso@slitaz.org"
pankso@950 8 DEPENDS="glibc-base"
pankso@950 9 BUILD_DEPENDS="glibc glibc-locale"
pankso@950 10 WEB_SITE="http://www.slitaz.org/"
pankso@950 11
pankso@950 12 CORE_PKGS="asunder epdfview gpicview gparted glib gtk+ leafpad pcmanfm xpad"
pankso@950 13
pankso@950 14 LOCALE="id"
pankso@950 15 LOCALEDEF="id_ID"
pankso@950 16 CHARMAP="ISO-8859-1"
pankso@950 17
pankso@950 18 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
pankso@950 19 PKG_NAME="$PACKAGE"
pankso@950 20 PKG_VERS="$VERSION"
pankso@950 21
pankso@950 22 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@950 23 # Install files in /usr/lib/locale.
pankso@950 24 #
pankso@950 25 genpkg_rules()
pankso@950 26 {
pankso@950 27 mkdir -p $fs/usr/share/locale/$LOCALE
pankso@950 28
pankso@950 29 # Get the core apps messages.
pankso@950 30 for pkg in $CORE_PKGS
pankso@950 31 do
pankso@950 32 . $WOK/$pkg/receipt
pankso@950 33 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
pankso@950 34 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
pankso@950 35 $fs/usr/share/locale
pankso@950 36 fi
pankso@950 37 done
pankso@950 38
pankso@950 39 # Glibc locale.
pankso@950 40 #cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
pankso@950 41
pankso@950 42 PACKAGE="$PKG_NAME"
pankso@950 43 VERSION="$PKG_VERS"
pankso@950 44
pankso@950 45 # Gen locale files.
pankso@950 46 mkdir -p $fs/usr/lib/locale
pankso@950 47 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
pankso@950 48 }
pankso@950 49
pankso@950 50 # Post install to configure default locale.
pankso@950 51 post_install()
pankso@950 52 {
pankso@950 53 local root
pankso@950 54 root=$1
pankso@950 55 # locale.conf
pankso@951 56 if [ -s $root/etc/locale.conf ]; then
pankso@950 57 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
pankso@950 58 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
pankso@950 59 fi
pankso@950 60 }
pankso@950 61
pankso@950 62 # Back to C if it's the last used locale.
pankso@950 63 post_remove()
pankso@950 64 {
pankso@950 65 if grep -q $LOCALEDEF /etc/locale.conf; then
pankso@950 66 echo "LANG=C" > /etc/locale.conf
pankso@950 67 echo "LC_ALL=C" >> /etc/locale.conf
pankso@950 68 fi
pankso@950 69 }