wok-next annotate locale-es/receipt @ rev 1908
tazndis: add symlink to ndiswrapper
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sun Dec 21 15:49:01 2008 +0100 (2008-12-21) |
parents | 8d131e7b79c2 |
children | d2be5bd5d83e |
rev | line source |
---|---|
pankso@529 | 1 # SliTaz package receipt |
pankso@529 | 2 |
pankso@529 | 3 PACKAGE="locale-es" |
pankso@529 | 4 VERSION="1.0" |
pankso@529 | 5 CATEGORY="system-tools" |
pankso@529 | 6 SHORT_DESC="Spanish locale pack." |
pankso@529 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@529 | 8 DEPENDS="glibc-base" |
pankso@602 | 9 BUILD_DEPENDS="glibc glibc-locale" |
pankso@529 | 10 WEB_SITE="http://www.slitaz.org/" |
pankso@529 | 11 |
pankso@727 | 12 CORE_PKGS="asunder epdfview gpicview gparted glib gtk+ leafpad pcmanfm xpad" |
pankso@670 | 13 |
pankso@529 | 14 LOCALE="es" |
pankso@529 | 15 LOCALEDEF="es_ES" |
pankso@529 | 16 CHARMAP="ISO-8859-1" |
pankso@529 | 17 |
pankso@529 | 18 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg |
pankso@529 | 19 PKG_NAME="$PACKAGE" |
pankso@529 | 20 PKG_VERS="$VERSION" |
pankso@529 | 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@529 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@670 | 33 # Install files in /usr/lib/locale. |
pankso@529 | 34 # |
pankso@529 | 35 genpkg_rules() |
pankso@529 | 36 { |
pankso@600 | 37 mkdir -p $fs/usr/share/locale/$LOCALE |
pankso@529 | 38 |
pankso@529 | 39 # Get the core apps messages. |
pankso@529 | 40 for pkg in $CORE_PKGS |
pankso@529 | 41 do |
pankso@529 | 42 . $WOK/$pkg/receipt |
pankso@529 | 43 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then |
pankso@529 | 44 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ |
pankso@529 | 45 $fs/usr/share/locale |
pankso@529 | 46 fi |
pankso@529 | 47 done |
pankso@529 | 48 |
pankso@529 | 49 # Glibc locale. |
pankso@670 | 50 #cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale |
pankso@529 | 51 |
pankso@529 | 52 PACKAGE="$PKG_NAME" |
pankso@529 | 53 VERSION="$PKG_VERS" |
pankso@529 | 54 |
pankso@529 | 55 # Gen locale files. |
pankso@529 | 56 mkdir -p $fs/usr/lib/locale |
pankso@529 | 57 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF |
pankso@529 | 58 } |
pankso@529 | 59 |
pankso@529 | 60 # Post install to configure default locale. |
pankso@529 | 61 post_install() |
pankso@529 | 62 { |
pankso@529 | 63 local root |
pankso@529 | 64 root=$1 |
pankso@529 | 65 # locale.conf |
pankso@951 | 66 if [ -s $root/etc/locale.conf ]; then |
pankso@529 | 67 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf |
pankso@529 | 68 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf |
pankso@529 | 69 fi |
pankso@529 | 70 } |
pankso@529 | 71 |
pankso@529 | 72 # Back to C if it's the last used locale. |
pankso@529 | 73 post_remove() |
pankso@529 | 74 { |
pankso@529 | 75 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@529 | 76 echo "LANG=C" > /etc/locale.conf |
pankso@529 | 77 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@529 | 78 fi |
pankso@529 | 79 } |