wok rev 1769
Add get-upx
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 26 11:51:02 2008 +0000 (2008-11-26) |
parents | c186b215c435 |
children | b46a95b3d2ee |
files | get-upx/receipt get-upx/stuff/get-upx |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-upx/receipt Wed Nov 26 11:51:02 2008 +0000 1.3 @@ -0,0 +1,16 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-upx" 1.7 +VERSION="1.00" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="Get UPX executable packer." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://upx.sourceforge.net/" 1.12 + 1.13 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.14 +genpkg_rules() 1.15 +{ 1.16 + mkdir -p $fs/usr/bin 1.17 + cp stuff/get-upx $fs/usr/bin 1.18 +} 1.19 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-upx/stuff/get-upx Wed Nov 26 11:51:02 2008 +0000 2.3 @@ -0,0 +1,55 @@ 2.4 +#!/bin/sh -e 2.5 + 2.6 +ROOT="$1" 2.7 +VERSION="3.03" 2.8 +TARBALL="upx-$VERSION-i386_linux.tar.bz2" 2.9 +WEB_SITE="http://upx.sourceforge.net/" 2.10 +WGET_URL="${WEB_SITE}download/$TARBALL" 2.11 + 2.12 +if test $(id -u) != 0 ; then 2.13 + echo -e "\nYou must be root to run `basename $0`." 2.14 + echo -e "Please type 'su' and root password to become super-user.\n" 2.15 + exit 0 2.16 +fi 2.17 + 2.18 +if [ -d $ROOT/var/lib/tazpkg/installed/upx ]; then 2.19 + [ -n "$ROOT" ] && exit 1 2.20 + tazpkg remove upx 2.21 + [ -d /var/lib/tazpkg/installed/upx ] && exit 1 2.22 +fi 2.23 + 2.24 +BASE=$PWD 2.25 +DIR=/tmp/$0-$$ 2.26 +mkdir -p $DIR 2.27 +cd $DIR 2.28 + 2.29 +# Download tarball 2.30 +wget $WGET_URL 2.31 + 2.32 +# Extract 2.33 +tar xjf $TARBALL 2.34 + 2.35 +# Install files 2.36 +dir=upx-$VERSION/fs/usr/bin 2.37 +mkdir -p $dir 2.38 +mv upx-$VERSION-i386_linux/upx $dir 2.39 + 2.40 +# Create pseudo package 2.41 +cat > upx-$VERSION/receipt <<EOT 2.42 +PACKAGE="upx" 2.43 +VERSION="$VERSION" 2.44 +CATEGORY="non-free" 2.45 +SHORT_DESC="Executable packer for several different executable formats." 2.46 +WEB_SITE="$WEB_SITE" 2.47 +EOT 2.48 + 2.49 +# Pack 2.50 +tazpkg pack upx-$VERSION 2.51 + 2.52 +# Install pseudo package 2.53 +tazpkg install upx-$VERSION.tazpkg --root=$ROOT 2.54 +cd $BASE 2.55 + 2.56 +# Clean 2.57 +rm -rf $DIR $TARBALL 2.58 +