Added ppp/README
[barry/pauldeden.git] / maintainer / make-release-tar.sh
blob6dfd7d8bd5844dcf11981edb1df80703be67f5da
1 #!/bin/sh
3 if [ -z "$CVSROOT" ] ; then
4 CVSROOT=":ext:ndprojects@barry.cvs.sourceforge.net:/cvsroot/barry"
5 fi
6 if [ -z "$CVSREP" ] ; then
7 CVSREP="barry"
8 fi
10 echo
11 echo "Pulling from: $CVSROOT"
12 echo "Using directory: $CVSREP"
14 if [ -z "$1" -o -z "$2" ] ; then
15 echo
16 echo "Usage: ./make-release-tar.sh MAJOR MINOR"
17 echo " or"
18 echo " ./make-release-tar.sh MAJOR MINOR HEAD"
19 echo
20 echo "MAJOR is the desired major version number"
21 echo "MINOR is the desired minor version number"
22 echo "HEAD is a literal string to override the default behaviour"
23 echo " of retrieving the CVS tagged major/minor revision, and"
24 echo " instead, just fetching the HEAD version, and packaging"
25 echo " it up as version MAJOR.MINOR."
26 echo
27 echo "Set the environment var CVSROOT to use a different repository."
28 echo "Set CVSREP to a different directory if needed."
29 echo
30 exit 1
33 # give user time to see the CVS info
34 sleep 3s
36 DIRNAME="barry-$1.$2"
37 TAGNAME="barry-$1_$2"
39 mkdir build
40 cd build || exit 1
42 set -e
44 if [ "$3" != "HEAD" ] ; then
45 cvs -z3 -d "$CVSROOT" export -d $DIRNAME -r $TAGNAME "$CVSREP"
46 echo "Fetched tag: $TAGNAME"
47 else
48 cvs -z3 -d "$CVSROOT" export -d $DIRNAME -r HEAD "$CVSREP"
49 echo "Fetched HEAD"
51 (cd $DIRNAME/doc/www && ./static.sh)
52 (cd $DIRNAME && ./buildgen.sh)
53 #(cd $DIRNAME/gui && ./buildgen.sh)
54 #(cd $DIRNAME/opensync-plugin && ./buildgen.sh)
55 rm -rf "$DIRNAME/autom4te.cache" "$DIRNAME/gui/autom4te.cache" "$DIRNAME/opensync-plugin/autom4te.cache"
56 tar -cvf - $DIRNAME | bzip2 -9c > barry-$1.$2.tar.bz2
58 # Create Debian source package, by creating a patched and "orig" set of trees.
60 # The following dance is to keep the .orig.tar.gz containing barry-0.12/
61 # as the directory, and not something like barry-0.12.orig/ which gets
62 # corrected by Debian tools. If there is a better way, please send a patch.
63 cp -a $DIRNAME $DIRNAME.patched
64 rm -rf $DIRNAME/debian
65 tar -cf - $DIRNAME | gzip -9c > barry_$1.$2.orig.tar.gz
66 rm -rf $DIRNAME
67 mv $DIRNAME.patched $DIRNAME
68 dpkg-source -b $DIRNAME barry_$1.$2.orig.tar.gz