compress() { if [ -d $P/usr/lib ] ; then ( cd $P/usr/lib ; strip -g *.so *.a ) fi if [ -d $P/usr/bin ]; then ( cd $P/usr/bin ; strip * ) fi if [ -d $P/bin ]; then ( cd $P/bin ; strip * ) fi if [ -d $P/sbin ]; then ( cd $P/sbin ; strip * ) fi if [ -d $P/usr/info ]; then ( cd $P/usr/info ; gzip -f *info*) fi for i in 1 2 3 4 5 6 7 8 ; do if [ -d $P/usr/man/man$i ]; then ( cd $P/usr/man/man$i ; for j in *.$i ; do if [ -h $j ] ; then LN_TARGET=`ls -l $j | awk '{print $11}'` rm $j ln -sf $LN_TARGET.gz $j.gz else gzip $j fi done ) fi done } ################### # URI=http://www.tazenda.demon.co.uk/phil/net-tools/net-tools-1.60.tar.bz2 src=net-tools-1.60 pkg=nettools.tgz ################### P=`pwd`/work rm -rf $P make clean rm -rf config.cache config.log cat > config.h << EOF /* * config.h Automatically generated configuration includefile * * NET-TOOLS A collection of programs that form the base set of the * NET-3 Networking Distribution for the LINUX operating * system. * * DO NOT EDIT DIRECTLY * */ /* * * Internationalization * * The net-tools package has currently been translated to French, * German and Brazilian Portugese. Other translations are, of * course, welcome. Answer \`n\' here if you have no support for * internationalization on your system. * */ #define I18N 1 /* * * Protocol Families. * */ #define HAVE_AFUNIX 1 #define HAVE_AFINET 1 #define HAVE_AFINET6 0 #define HAVE_AFIPX 1 #define HAVE_AFATALK 1 #define HAVE_AFAX25 1 #define HAVE_AFNETROM 1 #define HAVE_AFROSE 0 #define HAVE_AFX25 1 #define HAVE_AFECONET 0 #define HAVE_AFDECnet 0 #define HAVE_AFASH 0 /* * * Device Hardware types. * */ #define HAVE_HWETHER 1 #define HAVE_HWARC 1 #define HAVE_HWSLIP 1 #define HAVE_HWPPP 1 #define HAVE_HWTUNNEL 1 #define HAVE_HWSTRIP 1 #define HAVE_HWTR 1 #define HAVE_HWAX25 1 #define HAVE_HWROSE 0 #define HAVE_HWNETROM 1 #define HAVE_HWX25 1 #define HAVE_HWFR 1 #define HAVE_HWSIT 0 #define HAVE_HWFDDI 0 #define HAVE_HWHIPPI 0 #define HAVE_HWASH 0 #define HAVE_HWHDLCLAPB 0 #define HAVE_HWIRDA 1 #define HAVE_HWEC 0 /* * * Other Features. * */ #define HAVE_FW_MASQUERADE 1 #define HAVE_IP_TOOLS 1 #define HAVE_MII 1 EOF make install -m 0755 -d $P/sbin install -m 0755 -d $P/bin for i in arp ifconfig nameif plipconfig rarp route slattach ipmaddr iptunnel mii-tool ; do install -m 0755 $i $P/sbin done for i in hostname netstat; do install -m 0755 $i $P/bin done ( cd $P/bin/ ; ln -sf hostname dnsdomainname ) ( cd $P/bin/ ; ln -sf hostname ypdomainname ) ( cd $P/bin/ ; ln -sf hostname nisdomainname ) ( cd $P/bin/ ; ln -sf hostname domainname ) mkdir -p $P/usr/man/man1 mkdir -p $P/usr/man/man5 mkdir -p $P/usr/man/man8 for i in man/en_US/*.1 ; do install -m 644 $i $P/usr/man/man1 done for i in man/en_US/*.5 ; do install -m 644 $i $P/usr/man/man5 done for i in man/en_US/*.8 ; do install -m 644 $i $P/usr/man/man8 done mkdir -p $P/usr/doc/$src for i in COPYING INSTALLING README* TODO ; do cp $i $P/usr/doc/$src gzip -f $P/usr/doc/$src/$i done # cp -a docs $P/usr/doc/$src/ compress cd $P /sbin/makepkg $pkg << EOF y y EOF