ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/mkdistro
Revision: 1.2
Committed: Thu Oct 16 21:59:57 2003 UTC (20 years, 6 months ago) by pcg
Branch: MAIN
Changes since 1.1: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 pcg 1.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= distdir/configure)
13    
14     mkdir -p $TARGET
15    
16     case "$1" in
17 pcg 1.2 gnu-linux )
18 pcg 1.1 HOST=root@localhost
19     BASE=/tmp
20     CONFIGURE="$CONFIGURE --enable-icmp"
21     ;;
22     darwin )
23     HOST=root@imac.laendle
24     BASE=/Users/schmorp
25     CONFIGURE="$CONFIGURE --enable-icmp --with-openssl-include=$BASE/include"
26     MAKE="LIBS='$BASE/lib/libcrypto.a -lintl'"
27     ;;
28     esac
29    
30     make distdir="$TARGET/vpe" distdir
31     rsync -avzPessh $TARGET/vpe $HOST:$BASE/. --delete
32     rm -rf $TARGET/vpe
33    
34     echo "$CONFIGURE" >$TARGET/configure
35    
36     ssh $HOST "
37     cd $BASE/vpe || exit 1;
38     ./configure $CONFIGURE || exit 2;
39     rm -rf $BASE/dist;
40     make $MAKE all || exit 3;
41     make $MAKE prefix=$BASE/dist install || exit 4;
42     strip $BASE/dist/sbin/vped $BASE/dist/bin/vpectrl;
43     " 2>&1 | tee $TARGET/buildlog
44    
45     mkdir -p $TARGET/opt
46     rsync -avzPessh $HOST:$BASE/dist/. $TARGET/opt/. --delete
47     (
48     cd $TARGET || exit 99
49     mkdir opt/doc
50     mkdir opt/doc/vped
51     mv buildlog opt/doc/vped/README.buildlog
52     mv configure opt/doc/vped/README.configure
53     chmod u=rwX,go=rX -R opt
54     )
55    
56     mkdir -p bindist
57     tar cCf $TARGET - . | gzip -9 >bindist/vpe-$VERSION-$1.tar.gz
58