wok annotate locale-sl/receipt @ rev 2790
locale-hu: Include OB menu in package
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 28 01:42:42 2009 +0200 (2009-04-28) |
parents | c8cf74f5d243 |
children | f3f6bcae6367 |
rev | line source |
---|---|
pankso@2304 | 1 # SliTaz package receipt |
pankso@2304 | 2 |
pankso@2304 | 3 PACKAGE="locale-sl" |
pankso@2702 | 4 VERSION="1.1" |
pankso@2304 | 5 CATEGORY="system-tools" |
pankso@2304 | 6 SHORT_DESC="Slovenian locale pack." |
pankso@2304 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@2304 | 8 DEPENDS="glibc-base" |
pankso@2304 | 9 BUILD_DEPENDS="glibc-locale" |
pankso@2304 | 10 WEB_SITE="http://www.slitaz.org/" |
pankso@2304 | 11 |
pankso@2702 | 12 CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \ |
pankso@2702 | 13 glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad" |
pankso@2304 | 14 |
pankso@2304 | 15 LOCALE="sl" |
pankso@2304 | 16 LOCALEDEF="sl_SI" |
pankso@2304 | 17 CHARMAP="UTF-8" |
pankso@2304 | 18 |
pankso@2702 | 19 # Rules to configure and make the package. |
pankso@2702 | 20 compile_rules() |
pankso@2702 | 21 { |
pankso@2702 | 22 # Ensure packages are built. |
pankso@2702 | 23 for pkg in $CORE_PKGS |
pankso@2702 | 24 do |
pankso@2702 | 25 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg |
pankso@2702 | 26 done |
pankso@2702 | 27 } |
pankso@2304 | 28 |
pankso@2304 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@2702 | 30 # Genereted locale files are in /usr/lib/locale. |
pankso@2304 | 31 genpkg_rules() |
pankso@2304 | 32 { |
pankso@2702 | 33 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale |
pankso@2702 | 34 PKG_NAME="$PACKAGE" |
pankso@2702 | 35 PKG_VERS="$VERSION" |
pankso@2702 | 36 # Get the core packages messages. |
pankso@2304 | 37 for pkg in $CORE_PKGS |
pankso@2304 | 38 do |
pankso@2702 | 39 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt |
pankso@2304 | 40 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then |
pankso@2304 | 41 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ |
pankso@2304 | 42 $fs/usr/share/locale |
pankso@2304 | 43 fi |
pankso@2304 | 44 done |
pankso@2304 | 45 PACKAGE="$PKG_NAME" |
pankso@2304 | 46 VERSION="$PKG_VERS" |
pankso@2702 | 47 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF |
pankso@2304 | 48 } |
pankso@2304 | 49 |
pankso@2304 | 50 # Post install to configure default locale. |
pankso@2304 | 51 post_install() |
pankso@2304 | 52 { |
pankso@2304 | 53 local root |
pankso@2304 | 54 root=$1 |
pankso@2304 | 55 # locale.conf |
pankso@2304 | 56 if [ -f $root/etc/locale.conf ]; then |
pankso@2304 | 57 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf |
pankso@2304 | 58 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf |
pankso@2304 | 59 fi |
pankso@2304 | 60 } |
pankso@2304 | 61 |
pankso@2304 | 62 # Back to C if it's the last used locale. |
pankso@2304 | 63 post_remove() |
pankso@2304 | 64 { |
pankso@2304 | 65 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@2304 | 66 echo "LANG=C" > /etc/locale.conf |
pankso@2304 | 67 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@2304 | 68 fi |
pankso@2304 | 69 } |