ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/mkdistro
Revision: 1.6
Committed: Sat Jan 17 14:50:40 2004 UTC (20 years, 3 months ago) by pcg
Branch: MAIN
CVS Tags: VPE_1_4
Changes since 1.5: +2 -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    
19 pcg 1.1 case "$1" in
20 pcg 1.2 gnu-linux )
21 pcg 1.1 HOST=root@localhost
22     CONFIGURE="$CONFIGURE --enable-icmp"
23     ;;
24 pcg 1.3 freebsd )
25     HOST=root@192.168.108.4
26     CONFIGURE="$CONFIGURE --enable-icmp"
27     MAKE=gmake
28     ;;
29     openbsd )
30     HOST=root@192.168.108.6
31     CONFIGURE="$CONFIGURE --enable-icmp"
32     ;;
33     netbsd )
34     HOST=root@192.168.108.5
35     CONFIGURE="$CONFIGURE --enable-icmp --with-openssl-include=/usr/local/ssl/include --with-openssl-lib=/usr/local/ssl/lib"
36     ;;
37 pcg 1.1 darwin )
38     HOST=root@imac.laendle
39     BASE=/Users/schmorp
40 pcg 1.6 CONFIGURE="$CONFIGURE --enable-icmp --with-openssl-include=$BASE/include --with-libintl-prefix=/sw"
41     MAKE="make LIBS='$BASE/lib/libcrypto.a -L/sw/lib -lintl'"
42 pcg 1.1 ;;
43 pcg 1.3 cygwin )
44     HOST=vm
45     CONFIGURE="$CONFIGURE --enable-icmp"
46     ;;
47 pcg 1.4 * )
48     exit 1
49     ;;
50 pcg 1.1 esac
51    
52     make distdir="$TARGET/vpe" distdir
53     rsync -avzPessh $TARGET/vpe $HOST:$BASE/. --delete
54     rm -rf $TARGET/vpe
55    
56     echo "$CONFIGURE" >$TARGET/configure
57    
58     ssh $HOST "
59     cd $BASE/vpe || exit 1;
60     ./configure $CONFIGURE || exit 2;
61     rm -rf $BASE/dist;
62 pcg 1.3 $MAKE all || exit 3;
63     $MAKE prefix=$BASE/dist install || exit 4;
64 pcg 1.1 strip $BASE/dist/sbin/vped $BASE/dist/bin/vpectrl;
65 pcg 1.3 strip $BASE/dist/sbin/vped.exe $BASE/dist/bin/vpectrl.exe;
66     echo vpectrl;
67     ldd $BASE/dist/bin/vpectrl;
68     echo vped;
69     ldd $BASE/dist/sbin/vped;
70     uname -a
71     true;
72     " 2>&1 | tee $TARGET/buildlog || exit 1
73 pcg 1.1
74     mkdir -p $TARGET/opt
75     rsync -avzPessh $HOST:$BASE/dist/. $TARGET/opt/. --delete
76     (
77     cd $TARGET || exit 99
78     mkdir opt/doc
79     mkdir opt/doc/vped
80     mv buildlog opt/doc/vped/README.buildlog
81     mv configure opt/doc/vped/README.configure
82     chmod u=rwX,go=rX -R opt
83     )
84    
85     mkdir -p bindist
86     tar cCf $TARGET - . | gzip -9 >bindist/vpe-$VERSION-$1.tar.gz
87