source: npl/system/net-tools/net_tools.SlackBuild @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 3.6 KB
Line 
1#!/bin/bash
2#Gebruik deze file als voorbeeld. Plaats de source tar.gz file in de zelfde directory als deze slackbuild
3#Met de NEED en DEP opties is het mogelijk om build dependencies aan te geven.
4#Voor de meeste packages hoeft er verder niks aan de variabellen veranderd te worden.
5##################################### Build dependency info:
6
7#Strict build-dependencies
8#Our package will be automaticly rebuilded if there is a major change in a DEP package.
9#(this is recommended for most dependencys)
10##DEP:linux
11##DEP:linux_src
12##DEP:openldap
13
14#Loose build-dependencies
15#The package will be installed in the buildroot during buidling, but no automatic rebuild will occur.
16#(not recommended)
17##DEP:doxygen
18
19
20#######Essential package info.
21#Change these if autodetection fails.
22
23#Name of the Syn-3 package that we are going to create
24NAME=`basename $0|sed 's/.SlackBuild//'`
25
26#Archive of the sourcefiles to unpack
27SRC_ARC=`ls *.tar.* *.zip 2>/dev/null`
28
29#Version of the sourcefiles
30VER=`echo $SRC_ARC| sed 's/.*-//g' | sed 's/\.tar\..*$//g' | sed 's/\.zip$//g'`
31
32#Architecture that the created binaries run on.
33#Use noarch for scripts.
34ARCH=`uname -m`
35
36CWD=`pwd`
37
38mkdir /tmp/pkg
39PKG=/tmp/pkg
40#Unpack source
41#(uncomment if not needed)
42syn3_unpack $SRC_ARC || exit 1
43
44#Directory where the sourcefiles are unpacked.
45#(you might have to adjust this if autodetection fails)
46SRC_DIR=`ls -c|head -1`
47
48cd $SRC_DIR
49chown -R root:root .
50find . -perm 666 -exec chmod 644 {} \;
51find . -perm 664 -exec chmod 644 {} \;
52find . -perm 600 -exec chmod 644 {} \;
53find . -perm 444 -exec chmod 644 {} \;
54find . -perm 400 -exec chmod 644 {} \;
55find . -perm 440 -exec chmod 644 {} \;
56find . -perm 777 -exec chmod 755 {} \;
57find . -perm 775 -exec chmod 755 {} \;
58find . -perm 511 -exec chmod 755 {} \;
59find . -perm 711 -exec chmod 755 {} \;
60find . -perm 555 -exec chmod 755 {} \;
61
62zcat $CWD/net-tools_1.60-19.diff.gz | patch -p1 --backup --verbose || exit 1
63zcat $CWD/net-tools.diff.gz | patch -p1 --backup --verbose || exit 1
64
65mkdir -p $PKG/usr/doc/net-tools-1.60 || exit 1
66cp -a README README.ipv6 $PKG/usr/doc/net-tools-1.60 || exit 1
67chmod 644 $PKG/usr/doc/net-tools-1.60/* || exit 1
68chown root:root $PKG/usr/doc/net-tools-1.60/* || exit 1
69HAVE_IP_TOOLS=1 HAVE_MII=1 make || exit 1
70HAVE_IP_TOOLS=1 HAVE_MII=1 make hostname || exit 1
71strip --strip-unneeded ipmaddr iptunnel hostname arp ifconfig nameif rarp route netstat plipconfig slattach mii-tool || exit 1
72mkdir -p $PKG/sbin $PKG/bin $PKG/usr/sbin || exit 1
73cat arp > $PKG/sbin/arp || exit 1
74cat ifconfig > $PKG/sbin/ifconfig || exit 1
75cat rarp > $PKG/sbin/rarp || exit 1
76cat route > $PKG/sbin/route || exit 1
77cat hostname > $PKG/bin/hostname || exit 1
78cat mii-tool > $PKG/sbin/mii-tool || exit 1
79cat nameif > $PKG/sbin/nameif || exit 1
80cat netstat > $PKG/bin/netstat || exit 1
81cat plipconfig > $PKG/sbin/plipconfig || exit 1
82cat slattach > $PKG/usr/sbin/slattach || exit 1
83cat ipmaddr > $PKG/sbin/ipmaddr || exit 1
84cat iptunnel > $PKG/sbin/iptunnel || exit 1
85chmod 755 $PKG/sbin/* $PKG/bin/* $PKG/usr/sbin/* || exit 1
86cd man/en_US || exit 1
87mkdir -p $PKG/usr/man/man{1,5,8} || exit 1
88for page in dnsdomainname.1 domainname.1 hostname.1 nisdomainname.1 \
89  ypdomainname.1 ; do
90  cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
91done
92cat ethers.5 | gzip -9c > $PKG/usr/man/man5/ethers.5.gz || exit 1
93for page in arp.8 ifconfig.8 mii-tool.8 nameif.8 netstat.8 rarp.8 route.8 \
94  slattach.8 plipconfig.8 ; do
95  cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz || exit 1
96done
97( cd $PKG/bin
98  ln -sf hostname dnsdomainname
99  ln -sf hostname nisdomainname
100  ln -sf hostname ypdomainname
101)
102
103cd /tmp/build
104#make main package
105syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1
Note: See TracBrowser for help on using the repository browser.