Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: php-4.0b3_RC4
Fetching contributors…

Cannot retrieve contributors at this time

executable file 129 lines (103 sloc) 3.162 kb
#!/bin/sh
#
# Distribution generator for CVS based packages.
# To work, this script needs a consistent tagging of all releases.
# Each release of a package should have a tag of the form
#
# <package>_<version>
#
# where <package> is the package name and the CVS module
# and <version> s the version number with underscores instead of dots.
#
# For example: cvs tag php_3_0a1
#
# The distribution ends up in a .tar.gz file that contains the distribution
# in a directory called <package>-<version>. The distribution contains all
# directories from the CVS module except the one called "nodist", but only
# the files INSTALL, README and config* are included.
#
# Since you can no longer set the CVS password via an env variable, you
# need to have previously done a cvs login for the server and user id
# this script uses so it will have an entry in your ~/.cvspasswd file.
#
# Usage: makedist <package> <version>
#
# Written by Stig Bakken <ssb@guardian.no> 1997-05-28.
#
# $Id$
#
PHPROOT=:pserver:cvsread@cvs.php.net:/repository
ZENDROOT=:pserver:cvsread@cvs.zend.com:/repository
PHPMOD=php4
ZENDMOD=libzend
TSRMMOD=TSRM
if echo '\c' | grep -s c >/dev/null 2>&1
then
ECHO_N="echo -n"
ECHO_C=""
else
ECHO_N="echo"
ECHO_C='\c'
fi
if test "$#" != "2"; then
echo "Usage: makedist <package> <version>" >&2
exit 1
fi
PKG=$1 ; shift
VER=$1 ; shift
MY_OLDPWD=`pwd`
# the destination .tar.gz file
ARCHIVE=$MY_OLDPWD/$PKG-$VER.tar.gz
# temporary directory used to check out files from CVS
DIR=$PKG-$VER
DIRPATH=$MY_OLDPWD/$DIR
if test -d "$DIRPATH"; then
echo "The directory $DIR"
echo "already exists, rename or remove it and run makedist again."
exit 1
fi
# version part of the CVS release tag
CVSVER=`echo $VER | sed -e 's/[\.\-]/_/g'`
# CVS release tag
CVSTAG=${PKG}_$CVSVER
if test ! -d $DIRPATH; then
mkdir -p $DIRPATH || exit 2
fi
#cd $DIRPATH || exit 3
# Export PHP
$ECHO_N "makedist: exporting tag '$CVSTAG' from '$PHPMOD'...$ECHO_C"
cvs -d $PHPROOT -Q export -d $DIR -r $CVSTAG $PHPMOD || exit 4
echo ""
# Export the other modules inside the PHP directory
cd $DIR || exit 5
# Export Zend
$ECHO_N "makedist: exporting tag '$CVSTAG' from '$ZENDMOD'...$ECHO_C"
cvs -d $ZENDROOT -Q export -r $CVSTAG $ZENDMOD || exit 4
echo ""
# Export TSRM
$ECHO_N "makedist: exporting tag '$CVSTAG' from '$TSRMMOD'...$ECHO_C"
cvs -d $ZENDROOT -Q export -r $CVSTAG $TSRMMOD || exit 4
echo ""
# remove CVS stuff...
find . \( \( -name CVS -type d \) -o -name .cvsignore \) -exec rm -rf {} \;
# hide away our own ltconfig/ltmain so they won't be overwritten
mv ltconfig ltconfig.php
mv ltmain.sh ltmain.sh.php
# generate some files so people don't need bison, flex and autoconf
# to install
set -x
./buildconf --copy
./genfiles
echo "/* Dummy File */" > ext/bcmath/number.c
echo "/* Dummy File */" > ext/bcmath/number.h
# now restore our own ltconfig/ltmain.sh files
mv ltconfig.php ltconfig
mv ltmain.sh.php ltmain.sh
cd $MY_OLDPWD
$ECHO_N "makedist: making gzipped tar archive...$ECHO_C"
tar czf $ARCHIVE $PKG-$VER || exit 8
echo ""
$ECHO_N "makedist: cleaning up...$ECHO_C"
rm -rf $DIRPATH || exit 9
echo ""
exit 0
Jump to Line
Something went wrong with that request. Please try again.