mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-22 22:08:39 +01:00
updated build script
This commit is contained in:
parent
5ab156ee1a
commit
7fab1b3b64
@ -26,43 +26,43 @@
|
||||
# Script changed 2005 Apr 15 by Ralf Becker and Wim Bonis
|
||||
# 2005 Sep 20 Ralf Becker: disabled fedora 2 build
|
||||
|
||||
BRANCH="-r Version-1_2_0-branch"
|
||||
#BRANCH=-A
|
||||
SVNURL="http://svn.egroupware.org/egroupware/branches/1.4/"
|
||||
# 1.4 BETA 1
|
||||
#SVNREVISION="23355"
|
||||
# 1.4 BETA 2
|
||||
#SVNREVISION="23439"
|
||||
# 1.4 BETA 3
|
||||
#SVNREVISION="23465"
|
||||
# 1.4 BETA 5
|
||||
#SVNREVISION="23743"
|
||||
|
||||
SPECFILE=`(if test -f /etc/SuSE-release; then echo egroupware-suse-php5.spec; else echo egroupware-fedora.spec; fi)`
|
||||
SPECFILE=egroupware-suse-php5.spec
|
||||
SPECFILE="egroupware-1.4.spec"
|
||||
SOURCEFILES="egroupware_fedora.tar.bz2 egroupware_suse.tar.bz2 manageheader.php.patch class.uiasyncservice.inc.php.patch"
|
||||
|
||||
CONTRIB="backup browser comic chatty email egwical filescenter forum ftp fudforum headlines icalsrv jinn messenger phpldapadmin projects stocks switchuser tts skel soap xmlrpc"
|
||||
|
||||
for p in $CONTRIB
|
||||
#CONTRIB="jinn workflow messenger egwical icalsrv gallery"
|
||||
CONTRIB="egwical icalsrv gallery"
|
||||
EXTRAPACKAGES="egw-pear $CONTRIB"
|
||||
for p in $EXTRAPACKAGES
|
||||
do
|
||||
EXCLUDE_CONTRIB="$EXCLUDE_CONTRIB --exclude=egroupware/$p"
|
||||
ONLY_CONTRIB="$ONLY_CONTRIB egroupware/$p"
|
||||
done
|
||||
|
||||
####
|
||||
#
|
||||
# Some changes for bitrock missing and delete from fedora package is not needed
|
||||
#
|
||||
###
|
||||
PACKAGENAME=`grep "%define packagename" $SPECFILE | cut -f3 -d' '`
|
||||
VERSION=`grep "%define egwversion" $SPECFILE | cut -f3 -d' '`
|
||||
PACKAGING=`grep "%define packaging" $SPECFILE | cut -f3 -d' '`
|
||||
|
||||
HOMEBUILDDIR=`whoami`
|
||||
#which account to use for checkouts and updates, after that the tree is made anonymous anyway, to allow users to update
|
||||
#CVSACCOUNT=ext:lkneschke
|
||||
#CVSACCOUNT=pserver:anonymous
|
||||
ANONCVSDIR=/tmp/build_root/egroupware
|
||||
ANONCVSDIR=/tmp/build_root/egw_buildroot-svn
|
||||
NOSVNDIR=/tmp/build_root/egw_buildroot
|
||||
RHBASE=$HOME/rpm
|
||||
SRCDIR=$RHBASE/SOURCES
|
||||
SPECDIR=$RHBASE/SPECS
|
||||
LOGFILE=$RHBASE/LOG/build-$PACKAGENAME-$VERSION-$PACKAGING.log
|
||||
VIRUSSCAN=$SPECDIR/clamav_scan-$PACKAGENAME-$VERSION-$PACKAGING.log
|
||||
MD5SUM=$SRCDIR/md5sum-$PACKAGENAME-$VERSION-$PACKAGING.txt
|
||||
LOGFILE=$RHBASE/LOG/build-$PACKAGENAME-$VERSION.$PACKAGING.log
|
||||
VIRUSSCAN=$SPECDIR/clamav_scan-$PACKAGENAME-$VERSION.$PACKAGING.log
|
||||
MD5SUM=$SRCDIR/md5sum-$PACKAGENAME-$VERSION.$PACKAGING.txt
|
||||
|
||||
mkdir -p $RHBASE/SOURCES $RHBASE/SPECS $RHBASE/BUILD $RHBASE/SRPMS $RHBASE/RPMS $RHBASE/LOG $ANONCVSDIR
|
||||
mkdir -p $RHBASE/SOURCES $RHBASE/SPECS $RHBASE/BUILD $RHBASE/SRPMS $RHBASE/RPMS $RHBASE/LOG $ANONCVSDIR $NOSVNDIR
|
||||
|
||||
cp *.spec $RHBASE/SPECS/
|
||||
cp $SOURCEFILES $RHBASE/SOURCES/
|
||||
@ -75,41 +75,90 @@ cd $ANONCVSDIR
|
||||
|
||||
if [ ! -d egroupware/phpgwapi ] # new checkout
|
||||
then
|
||||
echo -n "Creating a new checkout ... " >> $LOGFILE 2>&1
|
||||
svn checkout http://svn.egroupware.org/egroupware/branches/1.2/aliases/all ./
|
||||
else # updating an existing checkout in the build-root
|
||||
echo -n "Updating existing checkout ... " >> $LOGFILE 2>&1
|
||||
svn update
|
||||
if [ -z "$SVNREVISION" ]; then
|
||||
echo -n "Creating a new checkout ... " >> $LOGFILE 2>&1
|
||||
svn checkout $SVNURL"aliases/default" ./
|
||||
else
|
||||
echo -n "Creating a new checkout for revision $SVNREVISION ... " >> $LOGFILE 2>&1
|
||||
svn checkout -r $SVNREVISION $SVNURL"aliases/default" ./
|
||||
fi
|
||||
|
||||
cd egroupware
|
||||
for CONTRIBMODULE in $CONTRIB egwical icalsrv; do
|
||||
if [ -z "$CONTRIB_SVNREVISION" ]; then
|
||||
svn checkout $SVNURL"$CONTRIBMODULE"
|
||||
else
|
||||
svn checkout -r $SVNREVISION $SVNURL"$CONTRIBMODULE"
|
||||
fi
|
||||
done
|
||||
else # updating an existing checkout in the build-root
|
||||
echo -n "Updating existing checkout ... " >> $LOGFILE 2>&1
|
||||
svn update -r HEAD
|
||||
fi
|
||||
|
||||
cd $ANONCVSDIR
|
||||
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo -n "Change the direcory rights back ... " >> $LOGFILE 2>&1
|
||||
echo -n "Change directory rights back ... " >> $LOGFILE 2>&1
|
||||
find . -type d -exec chmod 775 {} \;
|
||||
find . -type f -exec chmod 644 {} \;
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo -n "Starting anti virus scan ... " >> $LOGFILE 2>&1
|
||||
test -x /usr/bin/clamscan && /usr/bin/clamscan --quiet -r $ANONCVSDIR --log=$VIRUSSCAN
|
||||
#test -x /usr/bin/clamscan && /usr/bin/clamscan --quiet -r $ANONCVSDIR --log=$VIRUSSCAN
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
rm -rf $NOSVNDIR/egroupware
|
||||
cp -ra $ANONCVSDIR/egroupware $NOSVNDIR
|
||||
find $NOSVNDIR -name .svn | xargs rm -rf
|
||||
|
||||
cd $ANONCVSDIR
|
||||
echo -n "building tar.gz ... " >> $LOGFILE 2>&1
|
||||
tar czf $SRCDIR/$PACKAGENAME-$VERSION-$PACKAGING.tar.gz $EXCLUDE_CONTRIB egroupware 2>&1 | tee -a $LOGFILE
|
||||
tar czf $SRCDIR/$PACKAGENAME-contrib-$VERSION-$PACKAGING.tar.gz $ONLY_CONTRIB >> $LOGFILE 2>&1
|
||||
tar czf $SRCDIR/$PACKAGENAME-$VERSION.$PACKAGING-svn.tar.gz $EXCLUDE_CONTRIB egroupware 2>&1 | tee -a $LOGFILE
|
||||
for CONTRIBMODULE in $EXTRAPACKAGES; do
|
||||
tar czf $SRCDIR/$PACKAGENAME-$CONTRIBMODULE-$VERSION.$PACKAGING-svn.tar.gz egroupware/$CONTRIBMODULE >> $LOGFILE 2>&1
|
||||
done
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo -n "building tar.bz2 ... " >> $LOGFILE 2>&1
|
||||
tar cjf $SRCDIR/$PACKAGENAME-$VERSION-$PACKAGING.tar.bz2 $EXCLUDE_CONTRIB egroupware >> $LOGFILE 2>&1
|
||||
tar cjf $SRCDIR/$PACKAGENAME-contrib-$VERSION-$PACKAGING.tar.bz2 $ONLY_CONTRIB >> $LOGFILE 2>&1
|
||||
tar cjf $SRCDIR/$PACKAGENAME-$VERSION.$PACKAGING-svn.tar.bz2 $EXCLUDE_CONTRIB egroupware >> $LOGFILE 2>&1
|
||||
for CONTRIBMODULE in $EXTRAPACKAGES; do
|
||||
tar cjf $SRCDIR/$PACKAGENAME-$CONTRIBMODULE-$VERSION.$PACKAGING-svn.tar.bz2 egroupware/$CONTRIBMODULE >> $LOGFILE 2>&1
|
||||
done
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo -n "building zip ... " >> $LOGFILE 2>&1
|
||||
find $ONLY_CONTRIB > /tmp/exclude.list
|
||||
zip -q -r -9 $SRCDIR/$PACKAGENAME-$VERSION-$PACKAGING.zip egroupware -x@/tmp/exclude.list >> $LOGFILE 2>&1
|
||||
zip -q -r -9 $SRCDIR/$PACKAGENAME-contrib-$VERSION-$PACKAGING.zip $ONLY_CONTRIB >> $LOGFILE 2>&1
|
||||
zip -q -r -9 $SRCDIR/$PACKAGENAME-$VERSION.$PACKAGING-svn.zip egroupware -x@/tmp/exclude.list >> $LOGFILE 2>&1
|
||||
for CONTRIBMODULE in $EXTRAPACKAGES; do
|
||||
zip -q -r -9 $SRCDIR/$PACKAGENAME-$CONTRIBMODULE-$VERSION.$PACKAGING-svn.zip egroupware/$CONTRIBMODULE >> $LOGFILE 2>&1
|
||||
done
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo "Building tar.gz, tar.bz and zip archives with svn finnished" >> $LOGFILE 2>&1
|
||||
|
||||
cd $NOSVNDIR
|
||||
echo -n "building tar.gz ... " >> $LOGFILE 2>&1
|
||||
tar czf $SRCDIR/$PACKAGENAME-$VERSION.$PACKAGING.tar.gz $EXCLUDE_CONTRIB egroupware 2>&1 | tee -a $LOGFILE
|
||||
for CONTRIBMODULE in $EXTRAPACKAGES; do
|
||||
tar czf $SRCDIR/$PACKAGENAME-$CONTRIBMODULE-$VERSION.$PACKAGING.tar.gz egroupware/$CONTRIBMODULE >> $LOGFILE 2>&1
|
||||
done
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo -n "building tar.bz2 ... " >> $LOGFILE 2>&1
|
||||
tar cjf $SRCDIR/$PACKAGENAME-$VERSION.$PACKAGING.tar.bz2 $EXCLUDE_CONTRIB egroupware >> $LOGFILE 2>&1
|
||||
for CONTRIBMODULE in $EXTRAPACKAGES; do
|
||||
tar cjf $SRCDIR/$PACKAGENAME-$CONTRIBMODULE-$VERSION.$PACKAGING.tar.bz2 egroupware/$CONTRIBMODULE >> $LOGFILE 2>&1
|
||||
done
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo -n "building zip ... " >> $LOGFILE 2>&1
|
||||
find $ONLY_CONTRIB > /tmp/exclude.list
|
||||
zip -q -r -9 $SRCDIR/$PACKAGENAME-$VERSION.$PACKAGING.zip egroupware -x@/tmp/exclude.list >> $LOGFILE 2>&1
|
||||
for CONTRIBMODULE in $EXTRAPACKAGES; do
|
||||
zip -q -r -9 $SRCDIR/$PACKAGENAME-$CONTRIBMODULE-$VERSION.$PACKAGING.zip egroupware/$CONTRIBMODULE >> $LOGFILE 2>&1
|
||||
done
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
|
||||
echo "Building tar.gz, tar.bz and zip archives finnished" >> $LOGFILE 2>&1
|
||||
@ -118,16 +167,25 @@ echo "Create the md5sum file for tar.gz, tar.bz, zip ($MD5SUM)" >> $LOGFILE 2
|
||||
echo "Build signed source files" >> $LOGFILE 2>&1
|
||||
echo "---------------------------------------" >> $LOGFILE 2>&1
|
||||
|
||||
for f in $VERSION-$PACKAGING.tar.gz contrib-$VERSION-$PACKAGING.tar.gz $VERSION-$PACKAGING.tar.bz2 contrib-$VERSION-$PACKAGING.tar.bz2 $VERSION-$PACKAGING.zip contrib-$VERSION-$PACKAGING.zip
|
||||
do
|
||||
echo "md5sum from file $PACKAGENAME-$f is:" >> $MD5SUM
|
||||
md5sum $SRCDIR/$PACKAGENAME-$f | cut -f1 -d' ' >> $MD5SUM 2>&1
|
||||
echo "---------------------------------------" >> $MD5SUM 2>&1
|
||||
echo " " >> $MD5SUM 2>&1
|
||||
FILENAMES="eGroupWare"
|
||||
for FILENAME in $EXTRAPACKAGES; do
|
||||
FILENAMES="$FILENAMES eGroupWare-$FILENAME"
|
||||
done
|
||||
|
||||
echo "Build signed source files" >> $LOGFILE 2>&1
|
||||
rm -f $SRCDIR/$PACKAGENAME-$f.gpg >> $LOGFILE 2>&1
|
||||
gpg --local-user packager@egroupware.org -s $SRCDIR/$PACKAGENAME-$f >> $LOGFILE 2>&1
|
||||
echo "FILENAMES: $FILENAMES"
|
||||
|
||||
for EXTENSION in -svn.tar.bz2 -svn.tar.gz -svn.zip .tar.bz2 .tar.gz .zip; do
|
||||
for f in $FILENAMES; do
|
||||
PACKAGENAME=$f-$VERSION.$PACKAGING$EXTENSION
|
||||
echo "md5sum from file $PACKAGENAME is:" >> $MD5SUM
|
||||
md5sum $SRCDIR/$PACKAGENAME | cut -f1 -d' ' >> $MD5SUM 2>&1
|
||||
echo "---------------------------------------" >> $MD5SUM 2>&1
|
||||
echo " " >> $MD5SUM 2>&1
|
||||
|
||||
echo "Build signed source files" >> $LOGFILE 2>&1
|
||||
rm -f $SRCDIR/$PACKAGENAME.gpg >> $LOGFILE 2>&1
|
||||
gpg --local-user packager@egroupware.org -s $SRCDIR/$PACKAGENAME >> $LOGFILE 2>&1
|
||||
done
|
||||
done
|
||||
echo "------------------------------------------" >> $LOGFILE 2>&1
|
||||
echo "End Build md5sum of tar.gz, tar.bz, zip" >> $LOGFILE 2>&1
|
||||
@ -143,17 +201,4 @@ echo "delete the original md5sum file" >> $LOGFILE 2>&1
|
||||
rm -rf $MD5SUM >> $LOGFILE 2>&1
|
||||
echo "---------------------------------------" >> $LOGFILE 2>&1
|
||||
|
||||
cd $SPECDIR
|
||||
if test -f /etc/SuSE-release; then
|
||||
echo -n "Building SUSE10.0 PHP4 RPM's ... " >> $LOGFILE 2>&1
|
||||
rpmbuild -ba --sign egroupware-suse-php4.spec 2>&1 | tee $RHBASE/LOG/egroupware-suse-php4.log
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
echo -n "Building SUSE10.0 PHP5 RPM's ... " >> $LOGFILE 2>&1
|
||||
rpmbuild -ba --sign egroupware-suse-php5.spec 2>&1 | tee $RHBASE/LOG/egroupware-suse-php5.log
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
else
|
||||
echo -n "Building Fedora Core4 RPM's ... " >> $LOGFILE 2>&1
|
||||
rpmbuild -ba --sign egroupware-fedora4.spec 2>&1 | tee $RHBASE/LOG/egroupware-fedora4.log
|
||||
echo "done" >> $LOGFILE 2>&1
|
||||
fi
|
||||
echo "Building of $PACKAGENAME $VERSION finnished" >> $LOGFILE 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user