#!/bin/bash ## src2pkg script for: src2pkg-helpers ## src2pkg Copyright 2005-2008 Gilbert Ashley SOURCE_NAME='src2pkg-helpers-0.5.tar.bz2' NAME='src2pkg-helpers' VERSION=0.5 # ARCH='i486' BUILD='1' PRE_FIX='usr' # Any extra options go here # EXTRA_CONFIGS='' # STD_FLAGS='-O2 -march=i486 -mtune=i686' TAR_VERSION=1.13 LIBSENTRY_VERSION=0.6.7.6 COREUTILS_VERSION=5.2.1 UNIONFS_FUSE_VERSION=0.23 # 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 # make the libs echo "Creating libsentry" mkdir -p $PKG_DIR/usr/libexec/src2pkg/lib cd $SRC_DIR/libsentry-$LIBSENTRY_VERSION ; make cp libsentry.so $PKG_DIR/usr/libexec/src2pkg/lib chmod 755 $PKG_DIR/usr/libexec/src2pkg/lib/libsentry.so # make tar echo "Creating tar-1.13" mkdir -p $PKG_DIR/usr/libexec/src2pkg/bin cd $SRC_DIR/tar-$TAR_VERSION ; # patch -p1 < ../tar-1.13-bzip2.diff # version 0.2: patch -p1 < ../01*.diff patch -p1 < ../02*.diff patch -p1 < ../03*.diff patch -p1 < ../04*.diff patch -p1 < ../05*.diff patch -p1 < ../06*.diff ./configure --disable-nls --with-ncursesw --enable-widec make cp src/tar $PKG_DIR/usr/libexec/src2pkg/bin/tar-1.13 chmod 755 $PKG_DIR/usr/libexec/src2pkg/bin/tar-1.13 # make the coreutils echo "Creating coreutils" cd $SRC_DIR/coreutils-$COREUTILS_VERSION ; patch -p1 < ../coreutils-mini.diff # prevent aclocal from running find . -name aclocal.m4 -exec touch {} \; # prevent Automake from running find . -name Makefile.in -exec touch {} \; # prevent Autoheader from running # find . -name 'stamp-h?.in' -exec touch {} \; # prevent Autoconf from running find . -name configure -exec touch {} \; ./configure make cd $SRC_DIR/coreutils-$COREUTILS_VERSION/src for prog in cat chmod chown cp ginstall groups link ln mkdir mknod mv readlink rm rmdir stat touch unlink; do cp $prog $PKG_DIR/usr/libexec/src2pkg/bin chmod 755 $PKG_DIR/usr/libexec/src2pkg/bin/$prog done ( cd $PKG_DIR/usr/libexec/src2pkg/bin ; ln -sf ginstall install ) # make unionfs-fuse if fuse is present and unionfs-fuse is not already present # No, make it anyway -it's just a few KB anyway #if [[ $(which unionfs &> /dev/null) ]] ; then # echo "Skipping creation of unionfs-fuse -you have it installed already." #else if [[ -f /usr/include/fuse.h ]] ; then if [[ -L /usr/lib/libfuse.so ]] || [[ -L /usr/lib/libfuse.so ]] ; then echo "Creating unionfs-fuse" ( cd $SRC_DIR/unionfs-fuse-$UNIONFS_FUSE_VERSION make cp $SRC_DIR/unionfs-fuse-$UNIONFS_FUSE_VERSION/src/unionfs $PKG_DIR/usr/libexec/src2pkg/bin chmod 755 $PKG_DIR/usr/libexec/src2pkg/bin/unionfs ) fi else echo "Skipping creation of unionfs-fuse -you don't have fuse installed." fi #fi 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)