#!/bin/bash ## src2pkg script for: util-linux-ng ## Auto-generated by src2pkg-2.0 ## src2pkg - Copyright 2005-2009 Gilbert Ashley SOURCE_NAME='util-linux-ng-2.17.2.tar.xz' NAME='util-linux-ng' # Use ALT_NAME to override guessed value VERSION='2.17.2' # Use ALT_VERSION to override guessed value BUILD=2 # ADJTIMEXVERS=1.23 # set-serial, ziptools have been # been moved to separate packages # SETSERIALVERS=2.17 # ZIPTOOLVERS=1.4.0 # NETTOOLSVERS=1.60 # ARCH='' # BUILD='1' # PRE_FIX='usr' # Any extra options go here: EXTRA_CONFIGS="--sysconfdir=/etc --localstatedir=/var \ --libdir=/lib${LIBDIRSUFFIX} \ --enable-arch --enable-agetty --disable-init \ --enable-kill --enable-rdev --disable-last \ --enable-mesg --enable-raw --enable-rename \ --enable-reset --disable-login-utils --enable-schedutils \ --enable-wall --enable-write --enable-use-tty-group \ --enable-libblkid --enable-libuuid --disable-uuidd \ --mandir=$mandir --infodir=$infodir" ADD_EXPLICIT_HOST=YES PATCHLIST='util-linux-ng-patches/util-linux-ng.fdisk-no-solaris.diff.gz util-linux-ng-patches/hwclock-add-notickwait.diff' # Optional function replaces configure_source, compile_source, fake_install # To use, uncomment and write/paste CODE between the {} brackets. # build() { CODE } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source # unpack the rest of the sources inside SRC_DIR (cd $SRC_DIR tar xvf $PATCHES_DIR/util-linux-ng-patches/adjtimex_${ADJTIMEXVERS}.orig.tar.gz tar xvf $PATCHES_DIR/util-linux-ng-patches/bsdstrings.tar.gz # these have been moved to separate packages #tar xvf $PATCHES_DIR/util-linux-ng/ziptool-$ZIPTOOLVERS.tar.bz2 #tar xvf $PATCHES_DIR/util-linux-ng/setserial-$SETSERIALVERS.tar.gz ) fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # mkdir -p $PKG_DIR/usr/bin $PKG_DIR/usr/sbin $PKG_DIR/sbin $PKG_DIR/bin mkdir -p $MAN_DIR/man1 $MAN_DIR/man5 $MAN_DIR/man8 ( cd $PKG_DIR/usr/bin ; ln -sf ../sbin/fdformat . ) cp $SRC_DIR/sys-utils/rdev $PKG_DIR/sbin # These should be available before /usr might be mounted: ( cd $PKG_DIR/usr/bin mv getopt setterm $PKG_DIR/bin cd $PKG_DIR/usr/bin ln -s ../../bin/getopt . ln -s ../../bin/setterm . ) ( cd $PKG_DIR/sbin ln -s ../bin/mount . ln -s ../bin/umount . ln -s hwclock clock cd $PKG_DIR/usr/sbin ln -s ../../sbin/cfdisk . ln -s ../../sbin/ctrlaltdel . ln -s ../../sbin/sfdisk . cd $PKG_DIR/usr/bin ln -s ../sbin/readprofile . ln -s ../sbin/tunelp . ln -s ../../bin/more . ln -s ../../sbin/raw . ) # now build the extra utilities (cd $SRC_DIR # patch and build adjtimex ( cd adjtimex-$ADJTIMEXVERS zcat $PATCHES_DIR/util-linux-ng-patches/adjtimex_1.23-1.diff.gz | patch -p1 make cp adjtimex $PKG_DIR/sbin cp adjtimex.8 $MAN_DIR/man8 ( cd $MAN_DIR/man8 ; ln -s hwclock.8 clock.8 ) mkdir -p $PKG_DIR$docdir/adjtimex-$ADJTIMEXVERS cp -a COPYING COPYRIGHT README README.ru adjtimex.lsm \ $PKG_DIR$docdir/adjtimex-$ADJTIMEXVERS ) (cd bsdstrings make cp strings $PKG_DIR/usr/bin cp strings.1 $MAN_DIR/man1 ) ) 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)