ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/mkdistro
Revision: 1.8
Committed: Fri Mar 18 01:53:05 2005 UTC (19 years, 1 month ago) by pcg
Branch: MAIN
CVS Tags: rel-1_9, rel-1_8, rel-2_01, rel-3_0, rel-2_2, rel-2_0, rel-2_21, rel-2_22, rel-2_25, HEAD
Changes since 1.7: +17 -17 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 pcg 1.8 CONFIGURE="--prefix=/opt/gvpe --sysconfdir=/etc --localstatedir=/var --enable-tcp --enable-http-proxy"
11 pcg 1.1
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 pcg 1.8 HOST=root@192.168.108.6
27 pcg 1.3 CONFIGURE="$CONFIGURE --enable-icmp"
28     MAKE=gmake
29 pcg 1.7 ARCH="$ARCH-x86"
30 pcg 1.3 ;;
31     openbsd )
32 pcg 1.8 HOST=root@192.168.108.7
33 pcg 1.3 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 pcg 1.8 make distdir="$TARGET/gvpe" distdir
58     rsync -avzPessh $TARGET/gvpe $HOST:$BASE/. --delete
59     rm -rf $TARGET/gvpe
60 pcg 1.1
61     echo "$CONFIGURE" >$TARGET/configure
62    
63     ssh $HOST "
64 pcg 1.7 set -x
65 pcg 1.8 cd $BASE/gvpe || exit 1;
66 pcg 1.1 ./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.8 strip $BASE/dist/sbin/gvpe $BASE/dist/bin/gvpectrl;
71     strip $BASE/dist/sbin/gvpe.exe $BASE/dist/bin/gvpectrl.exe;
72     echo gvpectrl;
73     ldd $BASE/dist/bin/gvpectrl;
74     echo gvpe;
75     ldd $BASE/dist/sbin/gvpe;
76 pcg 1.3 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 pcg 1.8 mkdir opt/doc/gvpe
86     mv buildlog opt/doc/gvpe/README.buildlog
87     mv configure opt/doc/gvpe/README.configure
88 pcg 1.1 chmod u=rwX,go=rX -R opt
89     )
90    
91     mkdir -p bindist
92 pcg 1.8 tar cCf $TARGET - . | gzip -9 >bindist/gvpe-$VERSION-$ARCH.tar.gz
93 pcg 1.7 rm -rf $TARGET
94 pcg 1.1