[mapguide-commits] r4887 - in branches/2.1/Installer: . scripts
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sat May 15 23:49:33 EDT 2010
Author: trevorwekel
Date: 2010-05-15 23:49:32 -0400 (Sat, 15 May 2010)
New Revision: 4887
Added:
branches/2.1/Installer/scripts/
branches/2.1/Installer/scripts/build.sh
branches/2.1/Installer/scripts/revnum.pl
Log:
Ticket #1295 Improve build scripts for 2.2 release cycle
Backport build script to 2.1 stream since Linux binaries were not released
Added: branches/2.1/Installer/scripts/build.sh
===================================================================
--- branches/2.1/Installer/scripts/build.sh (rev 0)
+++ branches/2.1/Installer/scripts/build.sh 2010-05-16 03:49:32 UTC (rev 4887)
@@ -0,0 +1,65 @@
+#!/bin/bash
+BUILDNUM=2.1.0
+BUILDROOT=`pwd`
+INSTALLROOT=/usr/local/mapguideopensource
+LOCKFILEDIR=/var/lock/mgserver
+MGSOURCE=${BUILDROOT}/mgdev
+SVNROOT="svn://svn.bld.mgproto.net"
+#SVNROOT="http://svn.osgeo.org"
+
+rm -rf ${MGSOURCE}
+rm -rf ${INSTALLROOT}
+
+REVISION=`svn info ${SVNROOT}/mapguide/branches/2.1/MgDev | perl revnum.pl`
+echo "Building Revision ${BUILDNUM}.${REVISION}"
+svn export -r ${REVISION} ${SVNROOT}/mapguide/branches/2.1/MgDev ${MGSOURCE}
+svn export ${SVNROOT}/metacrs/csmap/branches/12.01/CsMapDev ${MGSOURCE}/Oem/CsMap
+svn export ${SVNROOT}/fusion/branches/fusion-2.0 ${MGSOURCE}/Oem/fusion
+
+cd ${MGSOURCE}
+
+pushd ${MGSOURCE}/Oem/LinuxApt
+./build_apt.sh --prefix ${INSTALLROOT} --with-tomcat
+popd
+
+./build_oem.sh --prefix=${INSTALLROOT}
+
+pushd ${MGSOURCE}/Oem/fusion
+ant prepare
+ant compress
+popd
+
+aclocal
+libtoolize --force
+automake --add-missing --copy
+autoconf
+./configure --enable-optimized --prefix=${INSTALLROOT}
+make
+make install
+
+# Prepare binaries for packaging by removing unnecessary
+# .la and .a files and stripping unneeded symbols from the binaries
+pushd ${INSTALLROOT}
+LIBDIRS="lib server/lib webserverextensions/lib"
+for libdir in ${LIBDIRS}
+do
+ # Remove any .la and .a files in lib directories
+ rm -f ${libdir}/*.la
+ rm -f ${libdir}/*.a
+
+ # Remove unneeded symbols from files in the lib directories
+ for file in `find ${libdir}/lib*.so* -type f -print`
+ do
+ strip --strip-unneeded ${file}
+ chmod a-x ${file}
+ done
+done
+popd
+
+# Tarball the whole works and put it in a bin directory
+pushd ${BUILDROOT}
+if [ ! -d bin ]; then
+ mkdir -p bin
+fi
+tar -zcf bin/mapguideopensource-${BUILDNUM}.${REVISION}.tgz ${INSTALLROOT} ${LOCKFILEDIR}
+popd
Property changes on: branches/2.1/Installer/scripts/build.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: branches/2.1/Installer/scripts/revnum.pl
===================================================================
--- branches/2.1/Installer/scripts/revnum.pl (rev 0)
+++ branches/2.1/Installer/scripts/revnum.pl 2010-05-16 03:49:32 UTC (rev 4887)
@@ -0,0 +1,8 @@
+while (defined($line = <STDIN>))
+{
+ ($key,$value) = split(/: /,$line);
+ if ($key eq "Last Changed Rev")
+ {
+ print $value;
+ }
+}
\ No newline at end of file
More information about the mapguide-commits
mailing list