diff options
author | Binh Nguyen <binhnguyen@fastmail.fm> | 2010-09-18 14:37:59 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-09-21 22:11:08 -0500 |
commit | a1d08a2f5c442432b9cf083e717b8d315205dead (patch) | |
tree | ddfeb434fcabd0de3f8a48ed60494807f8efe714 /system/upx | |
parent | 80f94d000c1b5bf429db7da6373197ca2bd9d88a (diff) |
system/upx: Added (Ultimate Packer for eXecutables)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'system/upx')
-rw-r--r-- | system/upx/README | 6 | ||||
-rw-r--r-- | system/upx/slack-desc | 19 | ||||
-rw-r--r-- | system/upx/upx.SlackBuild | 81 | ||||
-rw-r--r-- | system/upx/upx.info | 12 |
4 files changed, 118 insertions, 0 deletions
diff --git a/system/upx/README b/system/upx/README new file mode 100644 index 000000000000..b06c7bac419b --- /dev/null +++ b/system/upx/README @@ -0,0 +1,6 @@ +UPX achieves an excellent compression ratio and offers very fast +decompression. Your executables suffer no memory overhead or other +drawbacks for most of the formats supported, because of in-place +decompression. + +This requires ucl at build-time. diff --git a/system/upx/slack-desc b/system/upx/slack-desc new file mode 100644 index 000000000000..27628006a996 --- /dev/null +++ b/system/upx/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +upx: upx (Ultimate Packer for eXecutables) +upx: +upx: UPX achieves an excellent compression ratio and offers very fast +upx: decompression. Your executables suffer no memory overhead or other +upx: drawbacks for most of the formats supported, because of in-place +upx: decompression. +upx: +upx: Homepage: http://upx.sourceforge.net/ +upx: +upx: +upx: diff --git a/system/upx/upx.SlackBuild b/system/upx/upx.SlackBuild new file mode 100644 index 000000000000..68fa75a57476 --- /dev/null +++ b/system/upx/upx.SlackBuild @@ -0,0 +1,81 @@ +#!/bin/sh + +# Slackware build script for upx + +# Copyright 2010 Binh Nguyen <binhnguyen@fastmail.fm> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=upx +VERSION=${VERSION:-3.07} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION-src +tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2 +cd $PRGNAM-$VERSION-src +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Extract LZMA SDK to a proper place for use at build-time +mkdir -p $TMP/lzma465 +tar xvf $CWD/lzma465.tar.bz2 -C $TMP/lzma465 + +make UPX_LZMA_VERSION=0x465 UPX_LZMADIR=$TMP/lzma465 all +install -D src/upx.out $PKG/usr/bin/upx + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +install -D -m 644 doc/upx.1 $PKG/usr/man/man1/upx.1 +find $PKG/usr/man -type f -exec gzip -9 {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a BUGS COPYING LICENSE NEWS PROJECTS README* THANKS TODO \ + doc/*.txt doc/upx.pod \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/upx/upx.info b/system/upx/upx.info new file mode 100644 index 000000000000..2f2cd5748986 --- /dev/null +++ b/system/upx/upx.info @@ -0,0 +1,12 @@ +PRGNAM="upx" +VERSION="3.07" +HOMEPAGE="http://upx.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/upx/upx-3.07-src.tar.bz2 \ + http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2" +MD5SUM="8186ab103288242f7e8ecad1acd4af03 \ + 29d5ffd03a5a3e51aef6a74e9eafb759" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Binh Nguyen" +EMAIL="binhnguyen@fastmail.fm" +APPROVED="Erik Hanson" |