#!/bin/bash ## src2pkg script for: bzip2 ## Auto-generated by src2pkg-1.9.7 ## src2pkg Copyright 2005-2008 Gilbert Ashley ## based on the bzip2.SlackBuild by Patrick Volkerding SOURCE_NAME='bzip2-1.0.5.tar.gz' NAME='bzip2' VERSION='1.0.5' # ARCH='i586' # BUILD='1' # PRE_FIX='usr' # Any extra options go here # EXTRA_CONFIGS='' # STD_FLAGS='-O2 -march=i586 -mtune=i686' PATCHLIST='./bzip2-1.0.4.saneso.diff.gz' # the so lib may have a different version # be sure to adjust the doinst.sh if this changes SOLIB=1.0.4 # the doinst.sh must be manually edited because of bad links EXTRA_DOCS='manual.html' INSTALL_FAIL=JAIL,DESTDIR # 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 mkdir -p $PKG_DIR/lib ( cd $SRC_DIR make -f Makefile-libbz2_so || exit 1 cp -a libbz2.so.$SOLIB $PKG_DIR/lib/libbz2.so.$SOLIB ) mkdir -p $PKG_DIR/bin cat $SRC_DIR/bzip2-shared > $PKG_DIR/bin/bzip2 mkdir -p $PKG_DIR/usr/{bin,lib} cp $SRC_DIR/libbz2.a $PKG_DIR/usr/lib for PROG in bzdiff bzgrep bzmore ; do cp -a $SRC_DIR/$PROG $PKG_DIR/usr/bin done ( cd $PKG_DIR ( cd lib rm -f libbz2.so.1.0 libbz2.so.1 ln -sf libbz2.so.$SOLIB libbz2.so.1.0 ln -sf libbz2.so.1.0 libbz2.so.1 ) ( cd usr/lib ; ln -sf ../../lib/libbz2.so.1 libbz2.so ) ( cd bin ; ln -sf bzip2 bunzip2 ) ( cd bin ; ln -sf bzip2 bzcat ) ( cd usr/bin ln -sf ../../bin/bzip2 . ln -sf ../../bin/bzip2 bunzip2 ln -sf ../../bin/bzip2 bzcat ln -sf bzmore bzless ln -sf bzgrep bzegrep ln -sf bzgrep bzfgrep ln -sf bzdiff bzcmp ) ) # install the header mkdir -p $PKG_DIR/usr/include cp $SRC_DIR/bzlib.h $PKG_DIR/usr/include 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) # Other commonly-used directories include: $DOC_DIR (document directory) # $MAN_DIR (man-page directory) $DATA_DIR (shared-data directory)