#!/bin/bash ## src2pkg script for: e2fsprogs-e2c ## Auto-generated by src2pkg-2.0 ## src2pkg - Copyright 2005-2009 Gilbert Ashley SOURCE_NAME='e2fsprogs-1.41.14.tar.bz2' NAME='e2fsprogs' VERSION='1.41.14' # ARCH='' BUILD='2' # use -UNION to avoid missing headers PRE_FIX='/' # Any extra options go here: EXTRA_CONFIGS="--sysconfdir=/etc --localstatedir=/var \ --libdir=/lib${LIBDIRSUFFIX} --bindir=/sbin \ --includedir=/usr/include --datadir=/usr/share \ --mandir=$mandir --infodir=$infodir \ --docdir=/usr/share/doc/e2fsprogs-$VERSION \ --enable-elf-shlibs --disable-libblkid \ --disable-libuuid --disable-uuidd --enable-fsck \ --enable-e2initrd-helper=no --enable-compression" INSTALL_LINE='make install install-libs' # use UNION so we get a complete package (avoid missing headers) INSTALL_FAIL=JAIL,DESTDIR # You should use dietlibc if you enable this. If not, # remove --with-diet-libc from the configure options below. # uncomment and set to 1 to build a static version of e2fsck # BUILD_STATIC=1 # I don't see the need for it right now... # 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 fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # #( cd $SRC_DIR # make install-libs DESTDIR=$PKG_DIR &> /dev/null #) if [[ "$BUILD_STATIC" = "1" ]] ; then if [[ $(which diet &> /dev/null) ]] ; then DIETLIBC='-with-diet-libc' else echo $YELLOW"Notice! "$NORMAL"No dietlibc found. Falling back to (much larger) glibc." DIETLIBC= fi ( cd $SRC_DIR make clean &> /dev/null ./configure --prefix=/usr $EXTRA_CONFIGS --disable-nls --disable-imager \ --disable-uuidd --disable-tls --disable-e2initrd-helper \ $DIETLIBC CFLAGS="${CFLAGS}" make libs make -C e2fsck all e2fsck.static if [[ -f e2fsck/e2fsck.static ]] ; then cat e2fsck/e2fsck.static > $PKG_DIR/sbin/e2fsck.static fi ) fi # Hmmm, sometimes this gets installed and sometimes no... if [[ -f $PKG_DIR/etc/mke2fs.conf ]] ; then mv $PKG_DIR/etc/mke2fs.conf $PKG_DIR/etc/mke2fs.conf.new else mkdir -p $PKG_DIR/etc cp $SRC_DIR/misc/mke2fs.conf $PKG_DIR/etc/mke2fs.conf.new fi rm -f $PKG_DIR/etc/mke2fs.conf.e2fsprogs-new # remove extra bins and link to the main ones ( cd $PKG_DIR/sbin && { rm -f *.ext4dev fsck.ext2 fsck.ext3 fsck.ext4 # create the fsck.ext2 wrapper cat << EOF > fsck.ext2 #!/bin/sh exec /sbin/e2fsck -C 0 \$* EOF chmod 755 fsck.ext2 } ) ( cd $PKG_DIR/sbin && ln -sf fsck.ext2 fsck.ext3) ( cd $PKG_DIR/sbin && ln -sf fsck.ext2 fsck.ext4) # more cruft rm -f $PKG_DIR/lib/e2initrd_helper # rm -f $PKG_DIR/sbin/compile_et $PKG_DIR/sbin/mk_cmds # rm -rf $PKG_DIR/usr/share/et $PKG_DIR/usr/share/ss mkdir -p $PKG_DIR/usr/lib${LIBDIRSUFFIX} ( cd $PKG_DIR/usr/lib${LIBDIRSUFFIX} for LIB in ../../lib/*.so* ; do ln -sf ../../lib/${LIB##*/} . done ) mkdir -p $PKG_DIR/usr/sbin ( cd $PKG_DIR/usr/sbin for PROG in ../../sbin/* ; do ln -sf ../../sbin/${PROG##*/} . done ) # fix man-pages rm -f $MAN_DIR/man8/*.ext4dev* fix_pkg_perms strip_bins create_docs compress_man_pages cd $MAN_DIR/man8 && ln -sf e2fsck.8.$MAN_COMPRESS_EXT e2fsck.static.$MAN_COMPRESS_EXT # fix up links for the man-pages ( cd $MAN_DIR/man3 && { ln -sf uuid_generate.3.$MAN_COMPRESS_EXT uuid_generate_random.3.$MAN_COMPRESS_EXT ln -sf uuid_generate.3.$MAN_COMPRESS_EXT uuid_generate_time.3.$MAN_COMPRESS_EXT } ) 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)