#!/bin/bash ## src2pkg script for: coreutils ## Auto-generated by src2pkg-1.9.7 ## src2pkg Copyright 2005-2008 Gilbert Ashley ## based on coreutils.SlackBuild by Patrick Volkerding SOURCE_NAME='coreutils-8.1.tar.xz' NAME='coreutils' VERSION='8.1' # ARCH='i586' BUILD='2' # add hostname to package to avoid needing net-tools in base PRE_FIX='usr' # Any extra options go here EXTRA_CONFIGS="--bindir=/bin --sysconfdir=/etc \ --mandir=$mandir --infodir=$infodir" # STD_FLAGS='-O2 -march=i586 -mtune=i686' PATCHLIST='coreutils-patches/coreutils.uname.diff.gz' #coreutils-patches/coreutils-6.12-revert-futimens.patch # (coreutils-6.12) 'revert-futimens' patch needed for later kernels >=2.6.30?? # as changes to the atimes code breaks the touch program and utils which use it # 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 # This seems wrong, and it stomps on files in the ksh93 package. Though, I'm # not sure the placement of those is correct, either... ( cd $PKG_DIR/usr/share/locale rm -rf */LC_TIME ) mkdir -p $PKG_DIR/bin $PKG_DIR/usr/bin ( cd $PKG_DIR/usr/bin for file in ../../bin/* ; do ln -sf $file . done ) cd $PKG_DIR # Since dircolors no longer provides any default aliases these scripts # will be needed for ls to act as expected: mkdir -p etc/profile.d # zcat $CWD/coreutils-patches/coreutils-dircolors.csh.gz > etc/profile.d/coreutils-dircolors.csh.new zcat $CWD/coreutils-patches/coreutils-dircolors.sh.gz > etc/profile.d/coreutils-dircolors.sh.new chmod 755 etc/profile.d/* # Add some default color settings # into /bin/ls now anyway: zcat $CWD/coreutils-patches/DIR_COLORS.gz > etc/DIR_COLORS.new # Remove things that are provided by other packages: # for dupe in hostname kill su uptime ; do # keep hostname so we don't have to have net-tools in base for dupe in kill su uptime ; do rm -f bin/${dupe} usr/bin/${dupe} usr/sbin/${dupe} usr/man/man?/${dupe}.* done # actually, hostname needs to be specifically built ( cd $SRC_DIR/src && make hostname ) cp $SRC_DIR/src/hostname $PKG_DIR/bin ( cd $PKG_DIR/usr/bin ; ln -sf ../../bin/hostname . ) # Add ginstall links (there's still a lot of stuff that needs this to compile): ( cd $PKG_DIR/bin ; ln -sf install ginstall ) ( cd $PKG_DIR/usr/bin ; ln -sf ../../bin/ginstall ginstall ) ( cd $MAN_DIR/man1 ; ln -sf install.1 ginstall.1 ) 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)