wok view get-upx/stuff/get-upx @ rev 4002
Xvkbd: add pixmap
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 31 13:11:29 2009 +0200 (2009-08-31) |
parents | a85ffe1b42a5 |
children | 007b91d3da0b |
line source
1 #!/bin/sh -e
3 ROOT="$1"
4 VERSION="3.03"
5 TARBALL="upx-$VERSION-i386_linux.tar.bz2"
6 WEB_SITE="http://upx.sourceforge.net/"
7 WGET_URL="${WEB_SITE}download/$TARBALL"
9 if test $(id -u) != 0 ; then
10 echo -e "\nYou must be root to run `basename $0`."
11 echo -e "Please type 'su' and root password to become super-user.\n"
12 exit 0
13 fi
15 if [ -d $ROOT/var/lib/tazpkg/installed/upx ]; then
16 [ -n "$ROOT" ] && exit 1
17 tazpkg remove upx
18 [ -d /var/lib/tazpkg/installed/upx ] && exit 1
19 fi
21 BASE=$PWD
22 DIR=/tmp/$0-$$
23 mkdir -p $DIR
24 cd $DIR
26 # Download tarball
27 wget $WGET_URL
28 if [ ! -f $TARBALL ]; then
29 cd $BASE
30 rm -rf $DIR
31 echo "Could not download $TARBALL. Exiting."
32 exit 1
33 fi
35 # Extract
36 tar xjf $TARBALL
38 # Install files
39 dir=upx-$VERSION/fs/usr/bin
40 mkdir -p $dir
41 mv upx-$VERSION-i386_linux/upx $dir
43 # Create pseudo package
44 cat > upx-$VERSION/receipt <<EOT
45 PACKAGE="upx"
46 VERSION="$VERSION"
47 CATEGORY="non-free"
48 SHORT_DESC="Executable packer for several different executable formats."
49 WEB_SITE="$WEB_SITE"
50 EOT
52 # Pack
53 tazpkg pack upx-$VERSION
55 # Install pseudo package
56 tazpkg install upx-$VERSION.tazpkg --root=$ROOT
57 cd $BASE
59 # Clean
60 rm -rf $DIR $TARBALL