#!/bin/bash ## src2pkg script for: net-tools ## Auto-generated by src2pkg-2.1 ## src2pkg - Copyright 2005-2009 Gilbert Ashley # based on the net-tools.SlackBuild # See the end of this file for Copyright info SOURCE_NAME='net-tools-1.60.tar.bz2' NAME='net-tools' # Use ALT_NAME to override guessed value VERSION='1.60' # Use ALT_VERSION to override guessed value # ARCH='' BUILD='2' # Put hostname back to replace minimal version form coreutils # PRE_FIX='usr' # Any extra options go here: # EXTRA_CONFIGS="" PATCHLIST='net-tools-patches/net-tools-1.57-bug22040.patch net-tools-patches/net-tools-1.60-miiioctl.patch net-tools-patches/net-tools-1.60-manydevs.patch net-tools-patches/net-tools-1.60-virtualname.patch net-tools-patches/net-tools-1.60-cycle.patch net-tools-patches/net-tools-1.60-nameif.patch net-tools-patches/net-tools-1.60-ipx.patch net-tools-patches/net-tools-1.60-inet6-lookup.patch net-tools-patches/net-tools-1.60-man.patch net-tools-patches/net-tools-1.60-gcc33.patch net-tools-patches/net-tools-1.60-trailingblank.patch net-tools-patches/net-tools-1.60-interface.patch net-tools-patches/net-tools-1.60-gcc34.patch net-tools-patches/net-tools-1.60-overflow.patch net-tools-patches/net-tools-1.60-siunits.patch net-tools-patches/net-tools-1.60-trunc.patch net-tools-patches/net-tools-1.60-return.patch net-tools-patches/net-tools-1.60-parse.patch net-tools-patches/net-tools-1.60-netmask.patch net-tools-patches/net-tools-1.60-ulong.patch net-tools-patches/net-tools-1.60-bcast.patch net-tools-patches/net-tools-1.60-mii-tool-obsolete.patch net-tools-patches/net-tools-1.60-netstat_ulong.patch net-tools-patches/net-tools-1.60-note.patch net-tools-patches/net-tools-1.60-num-ports.patch net-tools-patches/net-tools-1.60-duplicate-tcp.patch net-tools-patches/net-tools-1.60-statalias.patch net-tools-patches/net-tools-1.60-isofix.patch net-tools-patches/net-tools-1.60-ifconfig_ib.patch net-tools-patches/net-tools-1.60-de.patch net-tools-patches/net-tools-1.60-pie.patch net-tools-patches/net-tools-1.60-ifaceopt.patch net-tools-patches/net-tools-1.60-trim_iface.patch net-tools-patches/net-tools-1.60-stdo.patch net-tools-patches/net-tools-1.60-statistics.patch net-tools-patches/net-tools-1.60-ifconfig.patch net-tools-patches/net-tools-1.60-arp_overflow.patch net-tools-patches/net-tools-1.60-hostname_man.patch net-tools-patches/net-tools-1.60-interface_stack.patch net-tools-patches/net-tools-1.60-fgets.patch net-tools-patches/net-tools-1.60-ifconfig_man.patch net-tools-patches/net-tools-1.60-x25-proc.patch net-tools-patches/net-tools-1.60-arp_man.patch net-tools-patches/net-tools-1.60-ifconfig-long-iface-crasher.patch net-tools-patches/net-tools-1.60-netdevice.patch net-tools-patches/net-tools-1.60-skip.patch net-tools-patches/net-tools-1.60-netstat-I-fix.patch net-tools-patches/net-tools-1.60-nameif_strncpy.patch net-tools-patches/net-tools-1.60-arp-unaligned-access.patch net-tools-patches/net-tools-1.60-remove_node.patch net-tools-patches/net-tools-1.60-netstat-interfaces-crash.patch net-tools-patches/net-tools-1.60-ec_hw_null.patch net-tools-patches/net-tools-1.60-statistics_buffer.patch net-tools-patches/net-tools-1.60-i-option.patch net-tools-patches/net-tools-1.60-a-option.patch net-tools-patches/net-tools-1.60-clear-flag.patch net-tools-patches/net-tools-1.60-metric-tunnel-man.patch net-tools-patches/net-tools-1.60-netstat-probe.patch net-tools-patches/net-tools-1.60-avoid-name-resolution.patch net-tools-patches/net-tools-1.60-debug-fix.patch net-tools-patches/net-tools-1.60-ib-warning.patch net-tools-patches/net-tools-1.60-man-obsolete.patch net-tools-patches/net-tools-1.60-hostname-short.patch net-tools-patches/net-tools-1.60-mii-refactor.patch net-tools-patches/net-tools-config_h.diff net-tools-patches/net-tools-1.60-hostname-fixes.diff' #net-tools-patches/net-tools-1.60-scanf-format.patch #net-tools-patches/net-tools-1.60-continous-flush-stdout.patch #net-tools-patches/net-tools_1.60-19.diff.gz #net-tools-patches/net-tools.diff.gz # Optional function replaces configure_source, compile_source, fake_install # To use, uncomment and write/paste CODE between the {} brackets. build() { HAVE_IP_TOOLS=1 HAVE_MII=1 make # HAVE_IP_TOOLS=1 HAVE_MII=1 make hostname mkdir -p $PKG_DIR/sbin $PKG_DIR/bin $PKG_DIR/usr/sbin cat arp > $PKG_DIR/sbin/arp cat ifconfig > $PKG_DIR/sbin/ifconfig cat rarp > $PKG_DIR/sbin/rarp cat route > $PKG_DIR/sbin/route # leave hostname out as we are using the one from coreutils # no, install it -it may be better than the one from coreutils cat hostname > $PKG_DIR/bin/hostname cat mii-tool > $PKG_DIR/sbin/mii-tool cat nameif > $PKG_DIR/sbin/nameif cat netstat > $PKG_DIR/bin/netstat cat plipconfig > $PKG_DIR/sbin/plipconfig cat slattach > $PKG_DIR/usr/sbin/slattach cat ipmaddr > $PKG_DIR/sbin/ipmaddr cat iptunnel > $PKG_DIR/sbin/iptunnel #man pages conversion from the fedora rpm: #french iconv -f iso-8859-1 -t utf-8 -o arp.tmp man/fr_FR/arp.8 && mv arp.tmp man/fr_FR/arp.8 iconv -f iso-8859-1 -t utf-8 -o ethers.tmp man/fr_FR/ethers.5 && mv ethers.tmp man/fr_FR/ethers.5 iconv -f iso-8859-1 -t utf-8 -o hostname.tmp man/fr_FR/hostname.1 && mv hostname.tmp man/fr_FR/hostname.1 iconv -f iso-8859-1 -t utf-8 -o ifconfig.tmp man/fr_FR/ifconfig.8 && mv ifconfig.tmp man/fr_FR/ifconfig.8 iconv -f iso-8859-1 -t utf-8 -o netstat.tmp man/fr_FR/netstat.8 && mv netstat.tmp man/fr_FR/netstat.8 iconv -f iso-8859-1 -t utf-8 -o plipconfig.tmp man/fr_FR/plipconfig.8 && mv plipconfig.tmp man/fr_FR/plipconfig.8 iconv -f iso-8859-1 -t utf-8 -o rarp.tmp man/fr_FR/rarp.8 && mv rarp.tmp man/fr_FR/rarp.8 iconv -f iso-8859-1 -t utf-8 -o route.tmp man/fr_FR/route.8 && mv route.tmp man/fr_FR/route.8 iconv -f iso-8859-1 -t utf-8 -o slattach.tmp man/fr_FR/slattach.8 && mv slattach.tmp man/fr_FR/slattach.8 #portugal iconv -f iso-8859-1 -t utf-8 -o arp.tmp man/pt_BR/arp.8 && mv arp.tmp man/pt_BR/arp.8 iconv -f iso-8859-1 -t utf-8 -o hostname.tmp man/pt_BR/hostname.1 && mv hostname.tmp man/pt_BR/hostname.1 iconv -f iso-8859-1 -t utf-8 -o ifconfig.tmp man/pt_BR/ifconfig.8 && mv ifconfig.tmp man/pt_BR/ifconfig.8 iconv -f iso-8859-1 -t utf-8 -o netstat.tmp man/pt_BR/netstat.8 && mv netstat.tmp man/pt_BR/netstat.8 iconv -f iso-8859-1 -t utf-8 -o rarp.tmp man/pt_BR/rarp.8 && mv rarp.tmp man/pt_BR/rarp.8 iconv -f iso-8859-1 -t utf-8 -o route.tmp man/pt_BR/route.8 && mv route.tmp man/pt_BR/route.8 #german iconv -f iso-8859-1 -t utf-8 -o arp.tmp man/de_DE/arp.8 && mv arp.tmp man/de_DE/arp.8 iconv -f iso-8859-1 -t utf-8 -o ethers.tmp man/de_DE/ethers.5 && mv ethers.tmp man/de_DE/ethers.5 iconv -f iso-8859-1 -t utf-8 -o hostname.tmp man/de_DE/hostname.1 && mv hostname.tmp man/de_DE/hostname.1 iconv -f iso-8859-1 -t utf-8 -o ifconfig.tmp man/de_DE/ifconfig.8 && mv ifconfig.tmp man/de_DE/ifconfig.8 iconv -f iso-8859-1 -t utf-8 -o netstat.tmp man/de_DE/netstat.8 && mv netstat.tmp man/de_DE/netstat.8 iconv -f iso-8859-1 -t utf-8 -o plipconfig.tmp man/de_DE/plipconfig.8 && mv plipconfig.tmp man/de_DE/plipconfig.8 iconv -f iso-8859-1 -t utf-8 -o rarp.tmp man/de_DE/rarp.8 && mv rarp.tmp man/de_DE/rarp.8 iconv -f iso-8859-1 -t utf-8 -o route.tmp man/de_DE/route.8 && mv route.tmp man/de_DE/route.8 iconv -f iso-8859-1 -t utf-8 -o slattach.tmp man/de_DE/slattach.8 && mv slattach.tmp man/de_DE/slattach.8 cd man/en_US mkdir -p $MAN_DIR/man{1,5,8} for page in dnsdomainname.1 domainname.1 hostname.1 nisdomainname.1 \ ypdomainname.1 ; do cp $page $MAN_DIR/man1 done cp ethers.5 $MAN_DIR/man5 for page in arp.8 ifconfig.8 mii-tool.8 nameif.8 netstat.8 rarp.8 route.8 \ slattach.8 plipconfig.8 ; do cp $page $MAN_DIR/man8 done # add a couple of man-pages from fedora cp $PATCHES_DIR/net-tools-patches/ipmaddr.8 $MAN_DIR/man8 cp $PATCHES_DIR/net-tools-patches/iptunnel.8 $MAN_DIR/man8 ( cd $PKG_DIR/bin ln -sf hostname dnsdomainname ln -sf hostname nisdomainname ln -sf hostname ypdomainname ) # This is a little tool used in some of the network-related # scripts to calculate network and broadcast addresses: ( cd $PKG_DIR/bin cc -O2 -o ipmask $PATCHES_DIR/net-tools-patches/ipmask.c ) cp $PATCHES_DIR/net-tools-patches/ipmask.8 $MAN_DIR/man8 } # 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 cp $SRC_DIR/include/interface.h $SRC_DIR/lib configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process # Original Copyright: # Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.