### this file is sourced not run
PKGVER=3.91
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=upx-$PKGVER-src.tar.bz2
MD5SUM=c6d0b3ea2ecb28cb8031d59a4b087a43
SRC_URL=http://downloads.sourceforge.net/upx/$TARBALL
BUNDLE=

SLACKREQ= # libucl build-time only
SLACKDESC="upx: upx $PKGVER (Executable compressor)  
upx:  
upx: UPX is a free, portable, extendable, high-performance executable packer 
upx: for several executable formats. UPX achieves an excellent compression 
upx: ratio and offers very fast decompression. Your executables suffer no 
upx: memory overhead or other drawbacks for most of the formats supported, 
upx: because of in-place decompression.  
upx: 
upx: 
upx: 
upx: http://upx.sourceforge.net/ 
"

### default pkg_download
### default pkg_prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/upx*
	mkdir lzma &&
	tar -xf $CHROOT_DIR/tmp/pkg/lzma465.tar.bz2 -C ./lzma
}
### default pkg_package
### build
pkg_build() {
	cd /tmp/upx*
	export UPX_LZMADIR="/tmp/upx*/lzma"
	cp -r ./lzma/C ./src/
	make $MAKEFLAGS all &&
	cp src/upx.out /usr/bin/upx &&
	cp doc/upx.1 /usr/share/man/man1 &&
	mkdir -p /usr/share/doc/upx &&
	cp doc/upx.doc doc/upx.html /usr/share/doc/upx/ &&
	pkg_build_slackdesc
}

