wok-current annotate locale-sv/receipt @ rev 10778
Improve existing locale pack and locale-pt only for Portuguese/Portugal
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Jun 01 01:50:07 2011 +0200 (2011-06-01) |
parents | 394a91b6b78d |
children | ee88cfdf14a2 |
rev | line source |
---|---|
pankso@10752 | 1 # SliTaz package receipt |
pankso@10752 | 2 |
pankso@10752 | 3 PACKAGE="locale-sv" |
pankso@10752 | 4 VERSION="4.0" |
pankso@10752 | 5 CATEGORY="system-tools" |
pankso@10752 | 6 SHORT_DESC="Swedish locale pack." |
pankso@10752 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@10752 | 8 DEPENDS="glibc-base" |
pankso@10752 | 9 BUILD_DEPENDS="glibc glibc-locale slitaz-i18n" |
pankso@10752 | 10 WEB_SITE="http://www.slitaz.org/" |
pankso@10752 | 11 |
pankso@10752 | 12 LOCALE="sv" |
pankso@10778 | 13 LOCALEDEF="sv_SE" |
pankso@10778 | 14 CHARMAP="UTF-8" |
pankso@10752 | 15 |
pankso@10752 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@10752 | 17 genpkg_rules() |
pankso@10752 | 18 { |
pankso@10752 | 19 . $WOK/slitaz-i18n/stuff/locale-pack.functions |
pankso@10752 | 20 . $WOK/slitaz-i18n/stuff/locale-pack.conf |
pankso@10752 | 21 PKG_NAME="$PACKAGE" |
pankso@10752 | 22 PKG_VERS="$VERSION" |
pankso@10752 | 23 mk_locale_dir |
pankso@10752 | 24 get_slitaz_messages |
pankso@10752 | 25 get_core_messages |
pankso@10752 | 26 PACKAGE="$PKG_NAME" |
pankso@10752 | 27 VERSION="$PKG_VERS" |
pankso@10778 | 28 # Pregenerate locale file so we dont need glibc-locale as dep. |
pankso@10778 | 29 mkdir -p $fs/usr/lib/locale |
pankso@10778 | 30 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF |
pankso@10752 | 31 } |
pankso@10752 | 32 |
pankso@10752 | 33 # Back to C if it's the last used locale. |
pankso@10752 | 34 post_remove() |
pankso@10752 | 35 { |
pankso@10752 | 36 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@10752 | 37 echo "LANG=C" > /etc/locale.conf |
pankso@10752 | 38 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@10752 | 39 fi |
pankso@10778 | 40 rm -rf /usr/lib/locale/$LOCALEDEF |
pankso@10752 | 41 } |