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, 3 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

# User Rev Content
1 pcg 1.1 #!/bin/bash
2    
3     TARGET="dist-$1"
4    
5 pcg 1.3 autoconf
6     autoheader
7     automake
8 pcg 1.1 #./configure
9    
10     CONFIGURE="--prefix=/opt/vpe --sysconfdir=/etc --localstatedir=/var --enable-tcp --enable-http-proxy"
11    
12 pcg 1.3 eval $(grep VERSION= configure)
13 pcg 1.1
14     mkdir -p $TARGET
15    
16 pcg 1.3 BASE=/tmp
17     MAKE=make
18 pcg 1.7 ARCH="$1"
19 pcg 1.3
20 pcg 1.7 case "$ARCH" in
21 pcg 1.2 gnu-linux )
22 pcg 1.1 HOST=root@localhost
23     CONFIGURE="$CONFIGURE --enable-icmp"
24     ;;
25 pcg 1.3 freebsd )
26     HOST=root@192.168.108.4
27     CONFIGURE="$CONFIGURE --enable-icmp"
28     MAKE=gmake
29 pcg 1.7 ARCH="$ARCH-x86"
30 pcg 1.3 ;;
31     openbsd )
32     HOST=root@192.168.108.6
33     CONFIGURE="$CONFIGURE --enable-icmp"
34 pcg 1.7 ARCH="$ARCH-x86"
35 pcg 1.3 ;;
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 pcg 1.7 ARCH="$ARCH-x86"
40 pcg 1.3 ;;
41 pcg 1.1 darwin )
42     HOST=root@imac.laendle
43     BASE=/Users/schmorp
44 pcg 1.6 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 pcg 1.7 ARCH="$ARCH-x86"
47 pcg 1.1 ;;
48 pcg 1.3 cygwin )
49     HOST=vm
50     CONFIGURE="$CONFIGURE --enable-icmp"
51     ;;
52 pcg 1.4 * )
53     exit 1
54     ;;
55 pcg 1.1 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 pcg 1.7 set -x
65 pcg 1.1 cd $BASE/vpe || exit 1;
66     ./configure $CONFIGURE || exit 2;
67     rm -rf $BASE/dist;
68 pcg 1.3 $MAKE all || exit 3;
69     $MAKE prefix=$BASE/dist install || exit 4;
70 pcg 1.1 strip $BASE/dist/sbin/vped $BASE/dist/bin/vpectrl;
71 pcg 1.3 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 pcg 1.1
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 pcg 1.7 tar cCf $TARGET - . | gzip -9 >bindist/vpe-$VERSION-$ARCH.tar.gz
93     rm -rf $TARGET
94 pcg 1.1