Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 140 lines (113 sloc) 3.501 kb
aceaabce » zsuraski
1999-04-07 PHP 4.0
1 #!/bin/sh
2 #
3 # Distribution generator for CVS based packages.
4 # To work, this script needs a consistent tagging of all releases.
5 # Each release of a package should have a tag of the form
6 #
7 # <package>_<version>
8 #
9 # where <package> is the package name and the CVS module
10 # and <version> s the version number with underscores instead of dots.
11 #
12 # For example: cvs tag php_3_0a1
13 #
14 # The distribution ends up in a .tar.gz file that contains the distribution
15 # in a directory called <package>-<version>. The distribution contains all
16 # directories from the CVS module except the one called "nodist", but only
17 # the files INSTALL, README and config* are included.
18 #
19 # Since you can no longer set the CVS password via an env variable, you
20 # need to have previously done a cvs login for the server and user id
21 # this script uses so it will have an entry in your ~/.cvspasswd file.
22 #
23 # Usage: makedist <package> <version>
24 #
25 # Written by Stig Bakken <ssb@guardian.no> 1997-05-28.
26 #
27 # $Id$
28 #
29
30 CVSROOT=:pserver:cvsread@cvs.php.net:/repository
31 export CVSROOT
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
32 ZENDROOT=:pserver:cvsread@cvs.zend.com:/repository
33 export ZENDROOT
aceaabce » zsuraski
1999-04-07 PHP 4.0
34
35 if echo '\c' | grep -s c >/dev/null 2>&1
36 then
37 ECHO_N="echo -n"
38 ECHO_C=""
39 else
40 ECHO_N="echo"
41 ECHO_C='\c'
42 fi
43
44 if test "$#" != "2"; then
45 echo "Usage: makedist <package> <version>" >&2
46 exit 1
47 fi
48
49 PKG=$1 ; shift
50 VER=$1 ; shift
51
7af3ce63 » zsuraski
1999-07-17 Oki doki
52 MY_OLDPWD=`pwd`
aceaabce » zsuraski
1999-04-07 PHP 4.0
53
54 # the destination .tar.gz file
7af3ce63 » zsuraski
1999-07-17 Oki doki
55 ARCHIVE=$MY_OLDPWD/$PKG-$VER.tar.gz
aceaabce » zsuraski
1999-04-07 PHP 4.0
56
57 # temporary directory used to check out files from CVS
7af3ce63 » zsuraski
1999-07-17 Oki doki
58 TMPDIR=$MY_OLDPWD/cvstmp-$PKG-$VER
aceaabce » zsuraski
1999-04-07 PHP 4.0
59
60 # version part of the CVS release tag
61 CVSVER=`echo $VER | sed -e 's/\./_/g'`
62
63 # CVS release tag
64 CVSTAG=${PKG}_$CVSVER
65
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
66 # should become "php4"
aceaabce » zsuraski
1999-04-07 PHP 4.0
67 CVSMOD=`cat CVS/Repository | sed -e 's!^/[^/]*/!!'`
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
68 # should become "libzend"
69 ZENDMOD=`cat libzend/CVS/Repository | sed -e 's!^/[^/]*/!!'`
70 # should become "TSRM"
71 TSRMMOD=`cat TSRM/CVS/Repository | sed -e 's!^/[^/]*/!!'`
72
aceaabce » zsuraski
1999-04-07 PHP 4.0
73 if test ! -d $TMPDIR; then
74 mkdir -p $TMPDIR || exit 2
75 fi
76
77 cd $TMPDIR || exit 3
78
79 $ECHO_N "makedist: exporting tag '$CVSTAG' from '$CVSMOD'...$ECHO_C"
80 cvs -Q export -r $CVSTAG $CVSMOD || exit 4
81 echo ""
82
83 cd $CVSMOD || exit 5
84
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
85 # Check out Zend
86 $ECHO_N "makedist: exporting tag '$CVSTAG' from '$ZENDMOD'...$ECHO_C"
87 cvs -d $ZENDROOT -Q export -r $CVSTAG $ZENDMOD || exit 4
7af3ce63 » zsuraski
1999-07-17 Oki doki
88 echo ""
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
89
90 # Check out TSRM
91 $ECHO_N "makedist: exporting tag '$CVSTAG' from '$TSRMMOD'...$ECHO_C"
92 cvs -d $ZENDROOT -Q export -r $CVSTAG $TSRMMOD || exit 4
7af3ce63 » zsuraski
1999-07-17 Oki doki
93 echo ""
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
94
aceaabce » zsuraski
1999-04-07 PHP 4.0
95 INC=""
96
97 # remove CVS stuff...
98 find . \( \( -name CVS -type d \) -o -name .cvsignore \) -exec rm -rf {} \;
99
100 for file in *; do
101 case $file in
102 $PKG-$VER|web_update);; # ignore these
103 *) INC="$INC $file";; # include the rest
104 esac
105 done
106
107 # generate some files so people don't need bison, flex and autoconf
108 # to install
109 set -x
3736b9b7 » Sascha Schumann
1999-07-17 use optional copy
110 ./buildconf --copy
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
111 cd libzend
7af3ce63 » zsuraski
1999-07-17 Oki doki
112 bison -p zend -d zend-parser.y -o zend-parser.c
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
113 flex -Pzend -ozend-scanner.c -i zend-scanner.l
aceaabce » zsuraski
1999-04-07 PHP 4.0
114 cd ..
7af3ce63 » zsuraski
1999-07-17 Oki doki
115 bison -p cfg -d configuration-parser.y -o configuration-parser.c
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
116 flex -Pcfg -oconfiguration-scanner.c -i configuration-scanner.l
aceaabce » zsuraski
1999-04-07 PHP 4.0
117
118 #perl -i -p -e 's/\r\n/\n/' *.dsw *.dsp
119 set +x
120
121 INC="$INC \
122 configuration-scanner.c \
9bb36e9c » zsuraski
1999-07-17 Some work on makedist
123 configuration-parser.c configuration-parser.h \
7af3ce63 » zsuraski
1999-07-17 Oki doki
124 acconfig.h aclocal.m4 configure.in missing mkinstalldirs php_config.h.in \
aceaabce » zsuraski
1999-04-07 PHP 4.0
125 configure"
126
7af3ce63 » zsuraski
1999-07-17 Oki doki
127
aceaabce » zsuraski
1999-04-07 PHP 4.0
128 mkdir $PKG-$VER || exit 6
129 mv $INC $PKG-$VER || exit 7
130
131 $ECHO_N "makedist: making gzipped tar archive...$ECHO_C"
132 tar czf $ARCHIVE $PKG-$VER || exit 8
133 echo ""
134
135 $ECHO_N "makedist: cleaning up...$ECHO_C"
7af3ce63 » zsuraski
1999-07-17 Oki doki
136 cd $MY_OLDPWD
aceaabce » zsuraski
1999-04-07 PHP 4.0
137 rm -rf $TMPDIR || exit 9
138 echo ""
139
140 exit 0
Something went wrong with that request. Please try again.