#!/bin/bash ## src2pkg script for: binutils ## Auto-generated by src2pkg-1.9.8 ## src2pkg Copyright 2005-2009 Gilbert Ashley SOURCE_NAME='binutils-2.19.tar.bz2' NAME='binutils' # Use ALT_NAME to override guessed value VERSION='2.19' # Use ALT_VERSION to override guessed value KSYMOOPS_VERSION=2.4.11 BUILD=3 ARCH=${ARCH:-i586} # STD_FLAGS='-O2 -march=i586 -mtune=i686' TARGET=${TARGET:-$ARCH-kiss-linux} # for cross-compile, add targets here separated by commas # ALL_TARGETS=${ALL_TARGETS:-$TARGET,i486-slackware-linux} ALL_TARGETS=${ALL_TARGETS:-$TARGET} PRE_FIX='usr' # Any extra options go here EXTRA_CONFIGS="--enable-shared \ --enable-targets=${ALL_TARGETS}\ --enable-64-bit-bfd \ ${TARGET}" MAKE_COMMAND='make clean all info' # DESTDIR is the default, but make *sure* we use it here INSTALL_TYPE="DESTDIR" # check if this is right, maybe UNION doesn't work either INSTALL_FAIL=JAIL # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the 16 standard packaging steps: pre_process find_source make_dirs unpack_source # unpack the ksymoops now so they get their perms fixed too echo -n $BLUE"Unpacking ksymoops - "$NORMAL ( cd $SRC_DIR ; tar xjvf $CWD/ksymoops/ksymoops-$KSYMOOPS_VERSION.tar.bz2 &> /dev/null ) echo $GREEN"Done"$NORMAL fix_source_perms configure_source compile_source fake_install ( cd $PKG_DIR/usr/bin ; mv strings strings-GNU ) ( cd $PKG_DIR/usr/man/man1 ; mv strings.1 strings-GNU.1 ) # Manually install ldscripts -this keeps us from having to spam the rootfs mkdir -p $PKG_DIR/usr/lib$LIBDIRSUFFIX/ldscripts cp $SRC_DIR/ld/ldscripts/* $PKG_DIR/usr/lib$LIBDIRSUFFIX/ldscripts # Now adjust ldscripts (real dir is /usr/lib$LIBDIRSUFFIX/ldscripts/, # links go in /usr/*-linux/lib/ ), and the bin links: mkdir -p $PKG_DIR/usr/${TARGET}/lib ( cd $PKG_DIR/usr/${TARGET}/lib ; rm -rf ldscripts ; ln -sf /usr/lib$LIBDIRSUFFIX/ldscripts ldscripts ) # create links for multiple targets, if necessary (convert ',' to space) for ONE_TARGET in ${ALL_TARGETS//,/ } ; do # create links to the binaries under TARGET/bin with the same plain name # as the programs in bin. This lets you easily use PATH if you want mkdir -p $PKG_DIR/usr/${ONE_TARGET}/bin ( cd $PKG_DIR/usr/${ONE_TARGET}/bin for file in $(ls -1 $PKG_DIR/usr/bin) ; do rm -f $file ln -sf /usr/bin/$file $file done ) # then create TARGET-prog names under usr/bin. This # provides target-specific binary names ( cd $PKG_DIR/usr/bin # refer to the list of links created above under TARGET/bin for file in $(ls -1 $PKG_DIR/usr/${ONE_TARGET}/bin) ; do ln -sf $file ${ONE_TARGET}-$file done ) done cp -a $SRC_DIR/include/libiberty.h $PKG_DIR/usr/include/libiberty.h cp -a $SRC_DIR/gas/doc/as.1 $PKG_DIR/usr/man/man1 # Docs adjustment: ( cd $PKG_DIR/usr/man/man1 rm -f dlltool.1 windres.1 ) # now patch, compile and add ksymoops to the package echo -n $BLUE"Building ksymoops - "$NORMAL export LD_LIBRARY_PATH=$PKG_DIR/usr/lib$LIBDIRSUFFIX:$LD_LIBRARY_PATH cd $SRC_DIR/ksymoops-$KSYMOOPS_VERSION zcat $CWD/ksymoops/ksymoops.dynamic.bfd.diff.gz | patch -p1 [[ $QUIET = "NO" ]] && make || make &> /dev/null mkdir -p $PKG_DIR/usr/bin cat ksymoops > $PKG_DIR/usr/bin/ksymoops mkdir -p $PKG_DIR/usr/man/man8 cat ksymoops.8 > $PKG_DIR/usr/man/man8/ksymoops.8 mkdir -p $PKG_DIR/usr/doc/ksymoops-$VERSION cp -a COPYING Changelog INSTALL README* $PKG_DIR/usr/doc/ksymoops-$VERSION echo $GREEN"Done"$NORMAL fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process # src2pkg - Copyright 2005-2009 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)