wok-current annotate locale-id/receipt @ rev 2502

gnutls: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 16 11:45:33 2009 +0000 (2009-03-16)
parents 8d131e7b79c2
children d2be5bd5d83e
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
pascal@1552 22 # Rules to configure and make the package.
pascal@1552 23 compile_rules()
pascal@1552 24 {
pascal@1552 25 # Ensure packages are built.
pascal@1552 26 for pkg in $CORE_PKGS
pascal@1552 27 do
pascal@1552 28 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg
pascal@1552 29 done
pascal@1552 30 }
pascal@1552 31
pankso@950 32 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@950 33 # Install files in /usr/lib/locale.
pankso@950 34 #
pankso@950 35 genpkg_rules()
pankso@950 36 {
pankso@950 37 mkdir -p $fs/usr/share/locale/$LOCALE
pankso@950 38
pankso@950 39 # Get the core apps messages.
pankso@950 40 for pkg in $CORE_PKGS
pankso@950 41 do
pankso@950 42 . $WOK/$pkg/receipt
pankso@950 43 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
pankso@950 44 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
pankso@950 45 $fs/usr/share/locale
pankso@950 46 fi
pankso@950 47 done
pankso@950 48
pankso@950 49 # Glibc locale.
pankso@950 50 #cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
pankso@950 51
pankso@950 52 PACKAGE="$PKG_NAME"
pankso@950 53 VERSION="$PKG_VERS"
pankso@950 54
pankso@950 55 # Gen locale files.
pankso@950 56 mkdir -p $fs/usr/lib/locale
pankso@950 57 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
pankso@950 58 }
pankso@950 59
pankso@950 60 # Post install to configure default locale.
pankso@950 61 post_install()
pankso@950 62 {
pankso@950 63 local root
pankso@950 64 root=$1
pankso@950 65 # locale.conf
pankso@951 66 if [ -s $root/etc/locale.conf ]; then
pankso@950 67 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
pankso@950 68 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
pankso@950 69 fi
pankso@950 70 }
pankso@950 71
pankso@950 72 # Back to C if it's the last used locale.
pankso@950 73 post_remove()
pankso@950 74 {
pankso@950 75 if grep -q $LOCALEDEF /etc/locale.conf; then
pankso@950 76 echo "LANG=C" > /etc/locale.conf
pankso@950 77 echo "LC_ALL=C" >> /etc/locale.conf
pankso@950 78 fi
pankso@950 79 }