ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/mkdistro
Revision: 1.7
Committed: Sun Feb 8 07:24:25 2004 UTC (20 years, 10 months ago) by pcg
Branch: MAIN
CVS Tags: VPE_1_6, rel-1_7, VPE-1_6_1
Changes since 1.6: +9 -2 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/bin/bash
2
3 TARGET="dist-$1"
4
5 autoconf
6 autoheader
7 automake
8 #./configure
9
10 CONFIGURE="--prefix=/opt/vpe --sysconfdir=/etc --localstatedir=/var --enable-tcp --enable-http-proxy"
11
12 eval $(grep VERSION= configure)
13
14 mkdir -p $TARGET
15
16 BASE=/tmp
17 MAKE=make
18 ARCH="$1"
19
20 case "$ARCH" in
21 gnu-linux )
22 HOST=root@localhost
23 CONFIGURE="$CONFIGURE --enable-icmp"
24 ;;
25 freebsd )
26 HOST=root@192.168.108.4
27 CONFIGURE="$CONFIGURE --enable-icmp"
28 MAKE=gmake
29 ARCH="$ARCH-x86"
30 ;;
31 openbsd )
32 HOST=root@192.168.108.6
33 CONFIGURE="$CONFIGURE --enable-icmp"
34 ARCH="$ARCH-x86"
35 ;;
36 netbsd )
37 HOST=root@192.168.108.5
38 CONFIGURE="$CONFIGURE --enable-icmp --with-openssl-include=/usr/local/ssl/include --with-openssl-lib=/usr/local/ssl/lib"
39 ARCH="$ARCH-x86"
40 ;;
41 darwin )
42 HOST=root@imac.laendle
43 BASE=/Users/schmorp
44 CONFIGURE="$CONFIGURE --enable-icmp --with-openssl-include=$BASE/include --with-libintl-prefix=/sw"
45 MAKE="make LIBS='$BASE/lib/libcrypto.a -L/sw/lib -lintl'"
46 ARCH="$ARCH-x86"
47 ;;
48 cygwin )
49 HOST=vm
50 CONFIGURE="$CONFIGURE --enable-icmp"
51 ;;
52 * )
53 exit 1
54 ;;
55 esac
56
57 make distdir="$TARGET/vpe" distdir
58 rsync -avzPessh $TARGET/vpe $HOST:$BASE/. --delete
59 rm -rf $TARGET/vpe
60
61 echo "$CONFIGURE" >$TARGET/configure
62
63 ssh $HOST "
64 set -x
65 cd $BASE/vpe || exit 1;
66 ./configure $CONFIGURE || exit 2;
67 rm -rf $BASE/dist;
68 $MAKE all || exit 3;
69 $MAKE prefix=$BASE/dist install || exit 4;
70 strip $BASE/dist/sbin/vped $BASE/dist/bin/vpectrl;
71 strip $BASE/dist/sbin/vped.exe $BASE/dist/bin/vpectrl.exe;
72 echo vpectrl;
73 ldd $BASE/dist/bin/vpectrl;
74 echo vped;
75 ldd $BASE/dist/sbin/vped;
76 uname -a
77 true;
78 " 2>&1 | tee $TARGET/buildlog || exit 1
79
80 mkdir -p $TARGET/opt
81 rsync -avzPessh $HOST:$BASE/dist/. $TARGET/opt/. --delete
82 (
83 cd $TARGET || exit 99
84 mkdir opt/doc
85 mkdir opt/doc/vped
86 mv buildlog opt/doc/vped/README.buildlog
87 mv configure opt/doc/vped/README.configure
88 chmod u=rwX,go=rX -R opt
89 )
90
91 mkdir -p bindist
92 tar cCf $TARGET - . | gzip -9 >bindist/vpe-$VERSION-$ARCH.tar.gz
93 rm -rf $TARGET
94