wok annotate locale-pt/receipt @ rev 3091
locale-*: Dont source slitaz-18n file each time
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 16 21:40:06 2009 +0200 (2009-05-16) |
parents | a51ace1961b2 |
children | d42b38d61b43 |
rev | line source |
---|---|
pankso@3035 | 1 # SliTaz package receipt |
pankso@3035 | 2 |
pankso@3035 | 3 PACKAGE="locale-pt" |
pankso@3035 | 4 VERSION="2.0" |
pankso@3035 | 5 CATEGORY="system-tools" |
pankso@3035 | 6 SHORT_DESC="Portuguese/Brazilian locale pack." |
pankso@3035 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@3035 | 8 DEPENDS="glibc-base" |
pankso@3087 | 9 BUILD_DEPENDS="glibc glibc-locale slitaz-i18n" |
pankso@3035 | 10 WEB_SITE="http://www.slitaz.org/" |
pankso@3035 | 11 |
pankso@3087 | 12 LOCALE="pt" |
pankso@3035 | 13 LOCALEDEF="pt_BR" |
pankso@3035 | 14 CHARMAP="ISO-8859-1" |
pankso@3035 | 15 |
pankso@3035 | 16 # Rules to configure and make the package. |
pankso@3035 | 17 compile_rules() |
pankso@3035 | 18 { |
pankso@3091 | 19 . $WOK/slitaz-i18n/stuff/locale-pack.conf |
pankso@3035 | 20 # Ensure packages are built. |
pankso@3035 | 21 for pkg in $CORE_PKGS |
pankso@3035 | 22 do |
pankso@3035 | 23 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg |
pankso@3035 | 24 done |
pankso@3035 | 25 } |
pankso@3035 | 26 |
pankso@3035 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@3035 | 28 genpkg_rules() |
pankso@3091 | 29 { |
pankso@3091 | 30 . $WOK/slitaz-i18n/stuff/locale-pack.functions |
pankso@3091 | 31 . $WOK/slitaz-i18n/stuff/locale-pack.conf |
pankso@3035 | 32 PKG_NAME="$PACKAGE" |
pankso@3035 | 33 PKG_VERS="$VERSION" |
pankso@3087 | 34 mk_locale_dir |
pankso@3087 | 35 get_slitaz_messages |
pankso@3087 | 36 get_core_messages |
pankso@3035 | 37 PACKAGE="$PKG_NAME" |
pankso@3035 | 38 VERSION="$PKG_VERS" |
pankso@3087 | 39 LOCALE="pt_BR" |
pankso@3035 | 40 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF |
pankso@3035 | 41 } |
pankso@3035 | 42 |
pankso@3043 | 43 # Post install to remove old locale-pt_BR. |
pankso@3035 | 44 post_install() |
pankso@3035 | 45 { |
pankso@3035 | 46 if [ -d /var/lib/tazpkg/installed/locale-pt_BR ]; then |
pankso@3035 | 47 echo "y" | tazpkg remove locale-pt_BR |
pankso@3035 | 48 fi |
pankso@3035 | 49 } |
pankso@3035 | 50 |
pankso@3035 | 51 # Back to C if it's the last used locale. |
pankso@3035 | 52 post_remove() |
pankso@3035 | 53 { |
pankso@3035 | 54 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@3035 | 55 echo "LANG=C" > /etc/locale.conf |
pankso@3035 | 56 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@3035 | 57 fi |
pankso@3035 | 58 } |