Diff for /embedaddon/php/makedist between versions 1.1 and 1.1.1.2

version 1.1, 2012/02/21 23:47:52 version 1.1.1.2, 2012/05/29 12:34:34
Line 1 Line 1
 #!/bin/sh  #!/bin/sh
 #  #
# Distribution generator for SVN based packages.# Distribution generator for git
 #
 # Usage: makedist version
 # Example: makedist 5.4.1
 # Example: makedist 5.3.5-RC1
 #
 # To work, this script needs a consistent tagging of all releases.  # To work, this script needs a consistent tagging of all releases.
 # Each release of a package should have a tag of the form  # Each release of a package should have a tag of the form
 #  #
#  <package>_<version>#  PHP-X.Y.Z[-sub]
 #  #
 # where <package> is the package name and the SVN module  
 # and <version> s the version number with underscores instead of dots.  
 #  
 # For example: svn cp $PHPROOT/php/php-src/trunk $PHPROOT/php/php-src/tags/php_5_0_1  
 #  
 # The distribution ends up in a .tar.gz file that contains the distribution  # The distribution ends up in a .tar.gz file that contains the distribution
# in a directory called <package>-<version>.  The distribution contains all# in a directory called php-<version>.  
# directories from the SVN module except the one called "nodist", but only 
# the files INSTALL, README and config* are included. 
 # A .tar.bz2 file is also created.  # A .tar.bz2 file is also created.
#
# Usage: makedist <package> <version> 
# 
 # Written by Stig Bakken <ssb@guardian.no> 1997-05-28.  # Written by Stig Bakken <ssb@guardian.no> 1997-05-28.
## Adapted to git by Stanislav Malyshev <stas@php.net>
# $Id$ 
# 
   
if test "$#" != "2"; then
    echo "Usage: makedist <package> <version>" >&2if test "$#" != "1"; then
     echo "Usage: makedist <version>" >&2
     exit 1      exit 1
 fi  fi
   
 PKG=$1 ; shift  
 VER=$1 ; shift  VER=$1 ; shift
   
 old_IFS="$IFS"  old_IFS="$IFS"
Line 37  IFS=. Line 31  IFS=.
 eval set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`  eval set `bison --version| grep 'GNU Bison' | cut -d ' ' -f 4 | sed -e 's/\./ /'`
 if test "${1}" = "1" -a "${2}" -lt "28"; then  if test "${1}" = "1" -a "${2}" -lt "28"; then
   echo "You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)"    echo "You will need bison 1.28 if you want to regenerate the Zend parser (found ${1}.${2}).)"
  exit 10  exit 2
 fi  fi
 IFS="$old_IFS"  IFS="$old_IFS"
   
PHPROOT=http://svn.php.net/repositoryPHPROOT=git@git.php.net:php-src.git
PHPMOD=php/php-src 
 LT_TARGETS='ltconfig ltmain.sh config.guess config.sub'  LT_TARGETS='ltconfig ltmain.sh config.guess config.sub'
   
 if echo '\c' | grep -s c >/dev/null 2>&1  if echo '\c' | grep -s c >/dev/null 2>&1
Line 57  fi Line 50  fi
 MY_OLDPWD=`pwd`  MY_OLDPWD=`pwd`
   
 # the destination .tar.gz file  # the destination .tar.gz file
ARCHIVE=$MY_OLDPWD/$PKG-$VER.tarARCHIVE=$MY_OLDPWD/php-$VER.tar
   
 # temporary directory used to check out files from SVN  # temporary directory used to check out files from SVN
DIR=$PKG-$VERDIR=php-$VER
 DIRPATH=$MY_OLDPWD/$DIR  DIRPATH=$MY_OLDPWD/$DIR
   
 if test -d "$DIRPATH"; then  if test -d "$DIRPATH"; then
Line 69  if test -d "$DIRPATH"; then Line 62  if test -d "$DIRPATH"; then
     exit 1      exit 1
 fi  fi
   
 # version part of the SVN release tag  
 SVNVER=`echo $VER | sed -e 's/[\.\-]/_/g'`  
   
 # SVN release tag  
 if test "$VER" != "HEAD" -a "$VER" != "trunk"; then  
   SVNTAG=tags/${PKG}_$SVNVER  
 else  
   SVNTAG=trunk  
 fi  
   
 #if test ! -d $DIRPATH; then  
 #    mkdir -p $DIRPATH || exit 2  
 #fi  
   
 # Export PHP  # Export PHP
$ECHO_N "makedist: exporting tag '$SVNTAG' from '$PHPMOD'...$ECHO_C"$ECHO_N "makedist: exporting tag 'PHP-$VER' from '$PHPROOT'...$ECHO_C"
svn export $PHPROOT/$PHPMOD/$SVNTAG $DIRPATH || exit 4git archive --format=tar --remote=$PHPROOT refs/tags/PHP-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4
 echo ""  echo ""
   
 # remove SVN stuff...  
 cd $DIR || exit 5  cd $DIR || exit 5
 find . \( -name .svn -type d \) -exec rm -rf {} \;  
   
 # The full ChangeLog is available separately from lxr.php.net  # The full ChangeLog is available separately from lxr.php.net
 rm -f ChangeLog*  rm -f ChangeLog*
Line 119  for i in $LT_TARGETS; do Line 96  for i in $LT_TARGETS; do
   test -f "$i" && mv $i.bak $i    test -f "$i" && mv $i.bak $i
 done  done
   
   # removing junk files
   find . -name \*.orig -print0 | xargs -0 rm
   rm -fr autom4te.cache/
   
 # download pear   # download pear 
 $ECHO_N "makedist: Attempting to download PEAR's phar archive"  $ECHO_N "makedist: Attempting to download PEAR's phar archive"
 if test ! -x wget; then  if test ! -x wget; then
         wget http://pear.php.net/install-pear-nozlib.phar -nd -P pear/          wget http://pear.php.net/install-pear-nozlib.phar -nd -P pear/
 else  else
         $ECHO_N "Missing wget binary needed for pear download";          $ECHO_N "Missing wget binary needed for pear download";
        exit 0;        exit 7
 fi  fi
   
 cd $MY_OLDPWD  cd $MY_OLDPWD
 $ECHO_N "makedist: making gzipped tar archive...$ECHO_C"  $ECHO_N "makedist: making gzipped tar archive...$ECHO_C"
 rm -f $ARCHIVE.gz  rm -f $ARCHIVE.gz
tar cf $ARCHIVE $PKG-$VER || exit 8tar cf $ARCHIVE php-$VER || exit 8
 gzip -9 $ARCHIVE || exit 9  gzip -9 $ARCHIVE || exit 9
 echo ""  echo ""
   
 $ECHO_N "makedist: making bz2zipped tar archive...$ECHO_C"  $ECHO_N "makedist: making bz2zipped tar archive...$ECHO_C"
 rm -f $ARCHIVE.bz2  rm -f $ARCHIVE.bz2
tar cf $ARCHIVE $PKG-$VER || exit 10tar cf $ARCHIVE php-$VER || exit 10
 bzip2 -9 $ARCHIVE || exit 11  bzip2 -9 $ARCHIVE || exit 11
 echo ""  echo ""
   

Removed from v.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>