#!/bin/bash ## src2pkg script for: upx ## Auto-generated by src2pkg-1.9.6 ## src2pkg Copyright 2005-2008 Gilbert Ashley SOURCE_URL='http://upx.sourceforge.net/download/upx-3.07-src.tar.bz2' EXTRA_SOURCES='http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz http://upx.sourceforge.net/download/upx-3.04-i386_linux.tar.bz2 http://garr.dl.sourceforge.net/sourceforge/sevenzip/lzma449.tar.bz2 ' ALT_NAME='upx' ALT_VERSION='3.07' # ARCH='i486' # BUILD='1' # PRE_FIX='usr' # Any extra options go here # EXTRA_CONFIGS='' # STD_FLAGS='-O2 -march=i486 -mtune=i686' DOCLIST='BUGS COPYING LICENSE README README.1ST README.SRC THANKS TODO' #PATCHLIST='upx-gcc44-relax.diff' # Use variables for these so that we don't need to edit everything below # when using different versions -the UPX_VERSION is for the binary package UCL_VERSION=1.03 LZMA_VERSION=449 UPX_VERSION=3.07 # This build script will build the open-source version of upx using # ucl and lzma. If you want to also include the authors' pre-compiled # version which uses better NRW compression, edit the next line to set to '1' INCLUDE_AUTHORS_UPX=0 # The above version is the one running (still!) on the Mars Rovers # See the file README.SRC in the docs for more information on the # differences and rationalization of the two versions # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # do_all_processes can substitute these 16 steps: pre_process find_source make_dirs unpack_source fix_source_perms #configure_source #compile_source #fake_install cd $SRC_DIR ; tar xf $CWD/ucl-$UCL_VERSION.tar.gz tar xf $CWD/lzma$LZMA_VERSION.tar.bz2 ( cd ucl-1.03 ./configure make ) export UPX_UCLDIR=$SRC_DIR/ucl-$UCL_VERSION export UPX_LZMADIR=$SRC_DIR make all # install the open-source version as upx-ucl mkdir -p $PKG_DIR/usr/bin cp $SRC_DIR/src/upx.out $PKG_DIR/usr/bin/upx-ucl # if asked for, install the authors version as 'upx' if [[ "$INCLUDE_AUTHORS_UPX" = "1" ]] ; then cd $SRC_DIR tar xf $CWD/upx-$UPX_VERSION-i386_linux.tar.bz2 cp $SRC_DIR/upx-$UPX_VERSION-i386_linux/upx $PKG_DIR/usr/bin mkdir -p $MAN_DIR/man1 cp $SRC_DIR/upx-$UPX_VERSION-i386_linux/upx.1 $MAN_DIR/man1 ( cd $MAN_DIR/man1 ; ln -sf upx.1 upx-ucl.1 ) # install the description file which covers both programs mkdir -p $PKG_DIR/install cat "$CWD"/pkg-desc.both > $PKG_DIR/install/pkg-desc else # otherwise link the open-source version upx-ucl to upx ( cd $PKG_DIR/usr/bin ; ln -sf upx-ucl upx ) fi fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process # src2pkg - Copyright 2005-2008 Gilbert Ashley ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # EXTRA_CONFIGS='' PRE_FIX='' DOCLIST='' # MAKE_COMMAND='' INSTALL_LINE='' # SHELL_INSTALL='YES' CORRECT_PERMS='NO' # When editing src2pkg scripts to add custom code, use these variables # to refer to the current directory, the sources or the package tree: # $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree)