wok-6.x annotate slitaz-tools/receipt @ rev 12691

Up: slitaz-tools (5.0)
author Christophe Lincoln <pankso@slitaz.org>
date Wed May 02 16:12:14 2012 +0200 (2012-05-02)
parents 76dabc3432a1
children 9ba57c7ee2b2
rev   line source
pankso@11 1 # SliTaz package receipt.
pankso@11 2
pankso@11 3 PACKAGE="slitaz-tools"
pankso@12691 4 VERSION="5.0"
pankso@194 5 CATEGORY="system-tools"
pankso@2094 6 SHORT_DESC="SliTaz tools provide installer and utils usable on termnial."
pankso@11 7 MAINTAINER="pankso@slitaz.org"
pascal@7805 8 DEPENDS="slitaz-boot-scripts dialog gettext-base slitaz-configs-base"
slaxemulator@6925 9 BUILD_DEPENDS="gettext"
pankso@2094 10 SUGGESTED="slitaz-tools-boxes"
gokhlayeh@8012 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@11 12 WEB_SITE="http://www.slitaz.org/"
gokhlayeh@8012 13 WGET_URL="http://mirror.slitaz.org/sources/tools/$TARBALL"
pascal@1212 14 CONFIG_FILES="
pascal@1212 15 /etc/TZ
pascal@1212 16 /etc/keymap.conf
pascal@1212 17 /etc/locale.conf
pankso@2889 18 /etc/firewall.conf
pankso@2889 19 /etc/slitaz/applications.conf"
pankso@11 20
pankso@5126 21 # Rules to configure and make the package.
pankso@5126 22 compile_rules()
pankso@5126 23 {
pankso@5126 24 cd $src
domcox@12683 25 # temp tazinst patch (until next release)
pankso@12691 26 # Must stay in stable since tools <5.0 are not compaible 4.0.
pankso@12691 27 #patch -p1 < $stuff/tazinst.patch || return 1
pankso@10789 28 make && make DESTDIR=$DESTDIR install
pankso@5126 29 }
pankso@5126 30
pankso@11 31 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@11 32 genpkg_rules()
pankso@11 33 {
pankso@10789 34 mkdir -p $fs
pankso@10789 35 cp -a $install/* $fs
pankso@12691 36
pankso@12691 37 # Makefile bug in 5.0
pankso@12691 38 cp -a $src/tinyutils/decode $fs/usr/bin
pankso@12691 39
pankso@10859 40 chmod 0644 $fs/usr/share/locale/*/*/*.mo
pankso@401 41 chown -R root.root $fs
pankso@11 42 }
pascal@1062 43
pankso@1098 44 # Pre install commands.
pankso@1098 45 pre_install()
pankso@1098 46 {
pankso@1098 47 local root
pankso@1098 48 root=$1
pankso@1098 49 # Backup file to restore with post install
pankso@1098 50 echo "Creating backups of configs..."
pankso@1098 51 cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null
pankso@1098 52 cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null
pankso@1098 53 cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null
pankso@1098 54 cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null
pankso@1098 55 }
pankso@1098 56
pankso@1098 57 # Post install
pascal@1062 58 post_install()
pascal@1062 59 {
pankso@1098 60 echo "Restoring configs backups..."
pankso@1098 61 mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null
pankso@1098 62 mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null
pankso@1098 63 mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null
pankso@1098 64 mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null
pascal@1062 65 }