修订版 | c97313a4205d3cd63a1f7e83283402e5a126541e (tree) |
---|---|
时间 | 2012-02-25 22:21:41 |
作者 | matsuand <matsuand@user...> |
Commiter | matsuand |
Added net-tools.
@@ -0,0 +1,53 @@ | ||
1 | +#!/bin/sh | |
2 | + | |
3 | +. ./_blfsset.sh | |
4 | + | |
5 | +VER=1.60 | |
6 | +TARGET=net-tools-$VER | |
7 | +TARGETBALL=$TARGET.tar.bz2 | |
8 | +TARGETDIR=$TARGET | |
9 | + | |
10 | +cd $SRC | |
11 | + | |
12 | +echo $TARGET | |
13 | + | |
14 | +echo \ \ Removing old directory... | |
15 | +rm -fr $TARGETDIR | |
16 | + | |
17 | +echo \ \ Extracting sources... | |
18 | +if ! test -f $DLD/$TARGETBALL; then | |
19 | + echo \ \ Tarball not found: $TARGETBALL && exit 1 | |
20 | +else | |
21 | + tar xf $DLD/$TARGETBALL | |
22 | +fi | |
23 | + | |
24 | +cd $TARGETDIR | |
25 | + | |
26 | +echo \ \ Patching... | |
27 | +patch -Np1 -i $DLD/net-tools-$VER-gcc34-3.patch \ | |
28 | + 1> $LOG/$TARGET.0_patch.log 2>&1 || exit 1 | |
29 | +patch -Np1 -i $DLD/net-tools-$VER-kernel_headers-2.patch \ | |
30 | + 1>> $LOG/$TARGET.0_patch.log 2>&1 || exit 1 | |
31 | +patch -Np1 -i $DLD/net-tools-$VER-mii_ioctl-1.patch \ | |
32 | + 1>> $LOG/$TARGET.0_patch.log 2>&1 || exit 1 | |
33 | +yes "" | make config \ | |
34 | + 1>$LOG/$TARGET.1_conf.log 2>&1 || exit 1 | |
35 | + | |
36 | +sed -i -e 's|HAVE_IP_TOOLS 0|HAVE_IP_TOOLS 1|g' \ | |
37 | + -e 's|HAVE_MII 0|HAVE_MII 1|g' config.h | |
38 | +sed -i -e 's|# HAVE_IP_TOOLS=0|HAVE_IP_TOOLS=1|g' \ | |
39 | + -e 's|# HAVE_MII=0|HAVE_MII=1|g' config.make | |
40 | + | |
41 | +echo \ \ Making... | |
42 | +make \ | |
43 | + 1> $LOG/$TARGET.2_make.log 2>&1 || exit 1 | |
44 | + | |
45 | +echo \ \ Installing... | |
46 | +paco -p $TARGET 'make update' \ | |
47 | + 1> $LOG/$TARGET.3_install.log 2>&1 || exit 1 | |
48 | + | |
49 | +echo -n \ \ Pacoing:\ && paco -a1 | grep $TARGET || echo none | |
50 | + | |
51 | +echo \ \ Removing directory... | |
52 | +cd .. && rm -fr $TARGETDIR | |
53 | + |