PATCH_LIST=" 0001-mii-disable-building-of-tulip-diag-and-starfire-diag.patch 0002-signfs-fix-signedness-warnings-when-calling-MD5_Upda.patch 0003-init-fix-a-major-bug-in-interactive-mode.patch 0004-init-remove-static-in-front-of-two-local-stack-strin.patch 0005-scripts-pcidev-don-t-try-to-enumerate-devices-when-t.patch 0006-scripts-pcidev-support-modules.alias-as-well.patch " SRC_FETCH_PATH="http://git.formilux.org/?p=dist/src/flxutils.git;a=snapshot;h=v${PKGVER};sf=tgz" SRC_FETCH_METHOD="http" SUBDIRS="findcdrom init mktmp remount uname wd mii ifenslave lcd grub-mbr-default" function do_compile { for dir in $SUBDIRS; do $FLXMAKE -C $dir COPTS="$GCC_ARCH_SMALL $GCC_CPU_SMALL $GCC_OPT_SMALL" STRIP=$STRIP SSTRIP=$SSTRIP OBJDUMP=$OBJDUMP CC="$CC" || exit 1 done # we still need a *fast* flx ans signfs $FLXMAKE -C flx COPTS="$GCC_ARCH_COMMON $GCC_CPU_COMMON $GCC_OPT_FAST -fno-strict-aliasing" STRIP=$STRIP SSTRIP=$SSTRIP OBJDUMP=$OBJDUMP CC="uclibc $CC" || exit 1 $FLXMAKE -C signfs COPTS="$GCC_ARCH_COMMON $GCC_CPU_COMMON $GCC_OPT_FAST -fno-strict-aliasing" STRIP=$STRIP SSTRIP=$SSTRIP OBJDUMP=$OBJDUMP CC="uclibc $CC" || exit 1 } function do_distclean { for dir in $SUBDIRS; do $FLXMAKE -C $dir clean $FLXMAKE -C $dir distclean $FLXMAKE -C $dir mrproper done $FLXMAKE -C signfs clean $FLXMAKE -C flx clean ( do_delpack ) } function do_clean { for dir in $SUBDIRS; do $FLXPMAKE -C $dir clean done $FLXPMAKE -C flx clean $FLXPMAKE -C signfs clean #$FLXPMAKE -C ifenslave clean #$FLXPMAKE -C mii clean ( do_delpack ) } function do_prepack { #mkdir -p $ROOTDIR/usr/include $ROOTDIR/sbin $ROOTDIR/bin $ROOTDIR/usr/bin $ROOTDIR/usr/man/man8 $ROOTDIR/usr/man/man5 $ROOTDIR/usr/man/man1 mkdir -p $ROOTDIR/sbin $ROOTDIR/bin $ROOTDIR/usr/bin $ROOTDIR/usr/share/examples/flxutils/init $ROOTDIR/usr/sbin $ROOTDIR/usr/man/man8 cp findcdrom/findcdrom $ROOTDIR/sbin/ cp grub-mbr-default/grub-mbr-default $ROOTDIR/sbin/ cp flx/flx signfs/signfs mktmp/mktmp remount/remountr lcd/lcd{tee,write} $ROOTDIR/bin/ ln -s flx $ROOTDIR/bin/flxcheck ln -s flx $ROOTDIR/bin/flxsign ln -s remountr $ROOTDIR/bin/remountw cp -R ifenslave/ifenslave-1.0.1[12] init/init init/mkdev wd/wdd mii/mii-diag scripts/{pci-listall,pcidev,noctrlaltdel,mkinstall.old,mkinstall,hotplug} $ROOTDIR/sbin/ cp -R ifenslave/ifenslave-1.1.0 $ROOTDIR/sbin/ifenslave cp scripts/{pkg,reset,flxsearch,flxextract,flxrescan} $ROOTDIR/usr/bin/ cp wd/wdd.8 $ROOTDIR/usr/man/man8/ cp scripts/{flxadd,flxfix} $ROOTDIR/usr/sbin cp init/examples/* $ROOTDIR/usr/share/examples/flxutils/init/ #chown -R root:root $ROOTDIR #chmod -R og-w $ROOTDIR #chown root:adm $ROOTDIR/bin/* $ROOTDIR/sbin/* $ROOTDIR/usr/sbin/* $ROOTDIR/usr/bin/* #chmod 740 $ROOTDIR/sbin/* $ROOTDIR/usr/sbin/* #chmod 755 $ROOTDIR/usr/bin/* #chmod 751 $ROOTDIR/bin/* set_default_perm $ROOTDIR chmod 640 $ROOTDIR/usr/share/examples/flxutils/init/* # flxfix is useful for normal users too. chmod 755 $ROOTDIR/usr/sbin/flxfix # just in case it would not exist mkdir -p $PKGDIR/compiled } function do_strip { # avoids a double strip on flx, which destroys it after sstrip if ! $OBJDUMP -h $ROOTDIR/bin/flx | grep -q '\.text'; then return; fi $STRIP --strip-unneeded -x -R .comment -R .note $ROOTDIR/bin/flx $ROOTDIR/bin/signfs $ROOTDIR/sbin/ifenslave $SSTRIP $ROOTDIR/bin/flx $ROOTDIR/bin/signfs || : #$ROOTDIR/sbin/ifenslave } function do_tar_src { git config tar.umask 022 git archive --format=tar --prefix=$PKGRADIX-$PKGVER/ HEAD | gzip -c9 > $PKGRADIX-$PKGVER.tgz }