PATCH_LIST="init-need-gnu-source-w-uclibc.diff use-uclibc.patch force_macro.diff type-correctly-defined.diff set-dev-size-to-4k.diff no_header_depends.patch" SRC_FETCH_PATH="http://git.formilux.org/?p=dist/src/flxutils.git;a=snapshot;h=41dbee8f5da100d652899ad403c0e2ac43b16f04;sf=tgz" SRC_FETCH_METHOD="http" SUBDIRS="findcdrom init mktmp remount uname wd mii ifenslave lcd" 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" KERNDIR=$KERNDIR done # we still need a *fast* flx ans signfs $FLXMAKE -C flx COPTS="$GCC_ARCH_COMMON $GCC_CPU_COMMON $GCC_OPT_FAST" STRIP=$STRIP SSTRIP=$SSTRIP OBJDUMP=$OBJDUMP CC="uclibc $CC" KERNDIR=$KERNDIR $FLXMAKE -C signfs COPTS="$GCC_ARCH_COMMON $GCC_CPU_COMMON $GCC_OPT_FAST" STRIP=$STRIP SSTRIP=$SSTRIP OBJDUMP=$OBJDUMP CC="uclibc $CC" KERNDIR=$KERNDIR } 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 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 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-repo-config tar.umask 022 git-tar-tree HEAD $PKGRADIX-$PKGVER | gzip -c9 > $PKGRADIX-$PKGVER.tgz }