Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 129 lines (105 sloc) 3.023 kb
aceaabce » zsuraski
1999-04-07 PHP 4.0
1 #!/bin/sh
2 #
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
3 # Distribution generator for git
aceaabce » zsuraski
1999-04-07 PHP 4.0
4 #
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
5 # Usage: makedist version
6 # Example: makedist 5.4.1
7 # Example: makedist 5.3.5-RC1
aceaabce » zsuraski
1999-04-07 PHP 4.0
8 #
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
9 # To work, this script needs a consistent tagging of all releases.
10 # Each release of a package should have a tag of the form
aceaabce » zsuraski
1999-04-07 PHP 4.0
11 #
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
12 # PHP-X.Y.Z[-sub]
aceaabce » zsuraski
1999-04-07 PHP 4.0
13 #
14 # The distribution ends up in a .tar.gz file that contains the distribution
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
15 # in a directory called php-<version>.
1020d900 » Gwynne Raskind
2009-07-14 MFH: CVS->SVN
16 # A .tar.bz2 file is also created.
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
17 #
aceaabce » zsuraski
1999-04-07 PHP 4.0
18 # Written by Stig Bakken <ssb@guardian.no> 1997-05-28.
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
19 # Adapted to git by Stanislav Malyshev <stas@php.net>
aceaabce » zsuraski
1999-04-07 PHP 4.0
20
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
21
22 if test "$#" != "1"; then
23 echo "Usage: makedist <version>" >&2
2573a504 » Sascha Schumann
2000-06-25 Fix Bison version check
24 exit 1
25 fi
26
27 VER=$1 ; shift
28
29 old_IFS="$IFS"
30 IFS=.
85682d56 » Derick Rethans
2002-03-20 - Fix makedist
31 eval set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
32 if test "${1}" = "1" -a "${2}" -lt "28"; then
33 echo "You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)"
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
34 exit 2
2573a504 » Sascha Schumann
2000-06-25 Fix Bison version check
35 fi
36 IFS="$old_IFS"
773e306d » Sascha Schumann
2000-05-23 Add check for Bison. A recent version is required when in ZTS mode.
37
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
38 PHPROOT=git@git.php.net:php-src.git
6e4114da » Stig Bakken
1999-11-10 "import" libtool file preservation code from build.mk
39 LT_TARGETS='ltconfig ltmain.sh config.guess config.sub'
aceaabce » zsuraski
1999-04-07 PHP 4.0
40
41 if echo '\c' | grep -s c >/dev/null 2>&1
42 then
43 ECHO_N="echo -n"
44 ECHO_C=""
45 else
46 ECHO_N="echo"
47 ECHO_C='\c'
48 fi
49
7af3ce63 » zsuraski
1999-07-17 Oki doki
50 MY_OLDPWD=`pwd`
aceaabce » zsuraski
1999-04-07 PHP 4.0
51
52 # the destination .tar.gz file
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
53 ARCHIVE=$MY_OLDPWD/php-$VER.tar
aceaabce » zsuraski
1999-04-07 PHP 4.0
54
1020d900 » Gwynne Raskind
2009-07-14 MFH: CVS->SVN
55 # temporary directory used to check out files from SVN
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
56 DIR=php-$VER
ecf83739 » Stig Bakken
1999-11-08 Cleaned up makedist a bit more.
57 DIRPATH=$MY_OLDPWD/$DIR
aceaabce » zsuraski
1999-04-07 PHP 4.0
58
ecf83739 » Stig Bakken
1999-11-08 Cleaned up makedist a bit more.
59 if test -d "$DIRPATH"; then
60 echo "The directory $DIR"
aa3123e8 » Stig Bakken
1999-11-04 # Updated to work with the new build system.
61 echo "already exists, rename or remove it and run makedist again."
62 exit 1
63 fi
64
60766eff » Stig Bakken
1999-11-09 Makedist can now be run from outside the CVS tree.
65 # Export PHP
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
66 $ECHO_N "makedist: exporting tag 'PHP-$VER' from '$PHPROOT'...$ECHO_C"
67 git archive --format=tar --remote=$PHPROOT refs/tags/PHP-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4
aceaabce » zsuraski
1999-04-07 PHP 4.0
68 echo ""
69
9a0f9886 » foobar
2003-01-28 - Removed unnecessary makedist.ZendEngine2
70 cd $DIR || exit 5
aceaabce » zsuraski
1999-04-07 PHP 4.0
71
ec6c171f » Andrei Zmievski
2000-05-04 Typo.
72 # The full ChangeLog is available separately from lxr.php.net
9a0f9886 » foobar
2003-01-28 - Removed unnecessary makedist.ZendEngine2
73 rm -f ChangeLog*
61b88ae8 » Sascha Schumann
2000-05-04 Don't distribute ChangeLog. You can download it from lxr.php.net
74
6e4114da » Stig Bakken
1999-11-10 "import" libtool file preservation code from build.mk
75 # hide away our own versions of libtool-generated files
76 for i in $LT_TARGETS; do
77 if test -f "$i"; then
78 mv $i $i.bak
79 cp $i.bak $i
80 fi
81 done
2204607b » Stig Bakken
1999-11-09 Preserve the CVS versions of ltconfig/ltmain.sh during makedist.
82
aceaabce » zsuraski
1999-04-07 PHP 4.0
83 # generate some files so people don't need bison, flex and autoconf
84 # to install
85 set -x
8338bea0 » wez
2003-05-22 --force here too for release packages
86 ./buildconf --copy --force
693207a8 » Sascha Schumann
1999-10-05 Generate files for distribution (also adds parsedate.c)
87
b224dd96 » Sascha Schumann
2000-08-24 Don't distribute buildmk.stamp to the end user. Otherwise, buildcheck.sh
88 # remove buildmk.stamp. Otherwise, buildcheck.sh might not be run,
89 # when a user runs buildconf in the distribution.
90 rm -f buildmk.stamp
91
693207a8 » Sascha Schumann
1999-10-05 Generate files for distribution (also adds parsedate.c)
92 ./genfiles
93
6e4114da » Stig Bakken
1999-11-10 "import" libtool file preservation code from build.mk
94 # now restore our versions of libtool-generated files
95 for i in $LT_TARGETS; do
96 test -f "$i" && mv $i.bak $i
97 done
2204607b » Stig Bakken
1999-11-09 Preserve the CVS versions of ltconfig/ltmain.sh during makedist.
98
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
99 # removing junk files
100 find . -name \*.orig -print0 | xargs -0 rm
101 rm -fr autom4te.cache/
102
aa19f65f » Ilia Alshanetsky
2006-05-12 Download pear phar file when making a distribution package
103 # download pear
104 $ECHO_N "makedist: Attempting to download PEAR's phar archive"
105 if test ! -x wget; then
106 wget http://pear.php.net/install-pear-nozlib.phar -nd -P pear/
107 else
108 $ECHO_N "Missing wget binary needed for pear download";
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
109 exit 7
aa19f65f » Ilia Alshanetsky
2006-05-12 Download pear phar file when making a distribution package
110 fi
111
ecf83739 » Stig Bakken
1999-11-08 Cleaned up makedist a bit more.
112 cd $MY_OLDPWD
aceaabce » zsuraski
1999-04-07 PHP 4.0
113 $ECHO_N "makedist: making gzipped tar archive...$ECHO_C"
38b52fd3 » Derick Rethans
2002-10-10 - Argh... test before commit
114 rm -f $ARCHIVE.gz
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
115 tar cf $ARCHIVE php-$VER || exit 8
679bcde6 » Sascha Schumann
2000-05-07 Avoid relying on non-standard tar `z' option.
116 gzip -9 $ARCHIVE || exit 9
aceaabce » zsuraski
1999-04-07 PHP 4.0
117 echo ""
118
4d283352 » Derick Rethans
2002-08-24 - Also make bz2 archives
119 $ECHO_N "makedist: making bz2zipped tar archive...$ECHO_C"
38b52fd3 » Derick Rethans
2002-10-10 - Argh... test before commit
120 rm -f $ARCHIVE.bz2
cb4e82a1 » smalyshev
2012-03-19 adapt makedist to git
121 tar cf $ARCHIVE php-$VER || exit 10
4d283352 » Derick Rethans
2002-08-24 - Also make bz2 archives
122 bzip2 -9 $ARCHIVE || exit 11
123 echo ""
124
aceaabce » zsuraski
1999-04-07 PHP 4.0
125 $ECHO_N "makedist: cleaning up...$ECHO_C"
4d283352 » Derick Rethans
2002-08-24 - Also make bz2 archives
126 rm -rf $DIRPATH || exit 12
aceaabce » zsuraski
1999-04-07 PHP 4.0
127 echo ""
128
129 exit 0
Something went wrong with that request. Please try again.