2004-08-20 07:11:55 +02:00
|
|
|
#/bin/sh
|
|
|
|
#
|
2007-04-02 14:52:51 +02:00
|
|
|
# The contents of this file are subject to the Initial
|
|
|
|
# Developer's Public License Version 1.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
|
|
|
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed AS IS,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing rights
|
|
|
|
# and limitations under the License.
|
|
|
|
#
|
2007-04-02 15:11:13 +02:00
|
|
|
# The Original Code was created by Alexander Peshkov on 2-Apr-2007
|
2007-04-02 14:52:51 +02:00
|
|
|
# for the Firebird Open Source RDBMS project.
|
|
|
|
#
|
2007-04-02 15:11:13 +02:00
|
|
|
# Copyright (c) 2007 Alexander Peshkov
|
2007-04-02 14:52:51 +02:00
|
|
|
# and all contributors signed below.
|
|
|
|
#
|
|
|
|
# All Rights Reserved.
|
|
|
|
# Contributor(s): ______________________________________.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Script to prepare an "official source distribution"
|
|
|
|
# User is responsible to have clean tree with no foreign files.
|
|
|
|
# Using such tarball does not require presence of auto-tools.
|
2004-08-20 07:11:55 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
# Determine root of local checkout
|
|
|
|
SRCROOT=`dirname $0`/../..
|
2007-04-02 14:52:51 +02:00
|
|
|
MODULE=$SRCROOT/temp/src
|
2009-07-30 11:19:14 +02:00
|
|
|
MEMBERS=''
|
|
|
|
for m in `cat $SRCROOT/CVS/Entries* | awk -F / '{print $2;}' | sort | uniq`; do
|
|
|
|
[ -e $SRCROOT/$m ] && MEMBERS="$MEMBERS $m"
|
|
|
|
done
|
2004-08-20 07:11:55 +02:00
|
|
|
|
2007-04-02 14:52:51 +02:00
|
|
|
# Cleanup
|
2004-08-20 07:11:55 +02:00
|
|
|
rm -rf $MODULE
|
|
|
|
|
2007-04-02 14:52:51 +02:00
|
|
|
echo "Copying to new tree"
|
|
|
|
mkdir $MODULE
|
|
|
|
pushd $SRCROOT >/dev/null 2>&1
|
|
|
|
MAKEFILES=`echo gen/[Mm]ake*`
|
|
|
|
popd >/dev/null 2>&1
|
|
|
|
tar -C $SRCROOT -cf - $MEMBERS $MAKEFILES | tar -C $MODULE -xf -
|
2004-08-20 07:11:55 +02:00
|
|
|
|
2007-04-02 14:52:51 +02:00
|
|
|
# Load version information from the tree
|
2004-08-20 07:11:55 +02:00
|
|
|
source $MODULE/src/misc/writeBuildNum.sh
|
2007-04-02 14:52:51 +02:00
|
|
|
PACKNAME="Firebird-$PRODUCT_VER_STRING-$FIREBIRD_PACKAGE_VERSION"
|
|
|
|
DIRNAME="$SRCROOT/temp/$PACKNAME"
|
2004-08-20 07:11:55 +02:00
|
|
|
|
2007-04-02 14:52:51 +02:00
|
|
|
echo "Cleaning up"
|
2004-08-20 07:11:55 +02:00
|
|
|
rm -rf $DIRNAME
|
|
|
|
mv $MODULE $DIRNAME
|
2007-04-02 14:52:51 +02:00
|
|
|
pushd $DIRNAME >/dev/null 2>&1
|
|
|
|
|
|
|
|
# Remove CVS information
|
|
|
|
rm -rf `find . -name CVS -print`
|
2004-08-20 07:11:55 +02:00
|
|
|
|
2007-04-02 14:52:51 +02:00
|
|
|
# Clean gpre-generated files and extern
|
|
|
|
cd gen
|
2007-04-03 14:31:26 +02:00
|
|
|
make clean_all
|
2004-08-20 07:11:55 +02:00
|
|
|
cd ..
|
2007-04-02 14:52:51 +02:00
|
|
|
rm -rf gen
|
|
|
|
|
|
|
|
# Copy configure script
|
|
|
|
cp $SRCROOT/configure .
|
2004-08-20 07:11:55 +02:00
|
|
|
|
2007-04-02 14:52:51 +02:00
|
|
|
echo "Creating tarball for $PACKNAME"
|
|
|
|
cd ..
|
|
|
|
tar cjf ../gen/$PACKNAME.tar.bz2 $PACKNAME
|
|
|
|
popd >/dev/null 2>&1
|