#!/bin/bash ## src2pkg script for: dash ## Auto-generated by src2pkg-1.9.8 ## src2pkg - Copyright 2005-2009 Gilbert Ashley SOURCE_NAME='dash-5.5.1-20090214.tar.bz2' NAME='dash' # Use ALT_NAME to override guessed value ALT_VERSION='5.5.1.20090214' # ARCH='' BUILD='1' PRE_FIX='usr' # Any extra options go here: EXTRA_CONFIGS="--enable-fnmatch --enable-glob" # got libedit? # --with_libedit=yes PATCHLIST='dash-patches/dash-lineno.patch dash-patches/0001--MAN-rename-sh-to-dash-update-DESCRIPTION-and-HISTO.diff dash-patches/0002--SHELL-print-n-upon-EOF-CTRL-D-when-run-interacti.diff' # comment out if you don't want to build a static version BUILD_STATIC=1 # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the 16 standard packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source compile_source fake_install # build a static version of dash for /bin if requested # it will be built plain-jane without the EXTRA_CONFIGS from above if [[ $BUILD_STATIC = 1 ]] ; then # use dietlibc if available 94K (stripped) vs. 640K with glibc if [[ $(which diet 2> /dev/null) ]] ; then ( cd $SRC_DIR make clean ./configure CC="diet gcc" make CC="diet gcc" mkdir -p $PKG_DIR/bin mv src/dash $PKG_DIR/bin/dash ) else ( cd $SRC_DIR make clean ./configure --enable-static LDFLAGS="-static" make mkdir -p $PKG_DIR/bin mv src/dash $PKG_DIR/bin/dash ) fi else # otherwise, move the prog to /bin # and put a link in usr/bin to bin/dash mkdir -p $PKG_DIR/bin mv $PKG_DIR/usr/bin/dash $PKG_DIR/bin/dash ( cd $PKG_DIR/usr/bin ; ln -sf ../../bin/dash . ) fi fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # DOCLIST='' PATCHLIST='' INSTALL_TYPE='' # CONFIG_COMMAND='' MAKE_COMMAND='' INSTALL_LINE='' # 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)