[mapguide-commits] r4725 - trunk/Installer/scripts
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Mar 31 00:42:18 EDT 2010
Author: trevorwekel
Date: 2010-03-31 00:42:17 -0400 (Wed, 31 Mar 2010)
New Revision: 4725
Modified:
trunk/Installer/scripts/build.sh
Log:
Ticket #1302 Modify Linux builds to support per-release install directories and per-release shared libs
- Switch installdir to /usr/local/mapguideopensource-2.2.0
- Strip symbols from binaries and remove uneeded files post build
- Create tarball with full version -2.2.0.[changeset].tgz
Modified: trunk/Installer/scripts/build.sh
===================================================================
--- trunk/Installer/scripts/build.sh 2010-03-31 04:33:14 UTC (rev 4724)
+++ trunk/Installer/scripts/build.sh 2010-03-31 04:42:17 UTC (rev 4725)
@@ -1,22 +1,27 @@
#!/bin/bash
+BUILDNUM=2.2.0
BUILDROOT=`pwd`
-INSTALLROOT=/usr/local/mapguideopensource
+INSTALLROOT=/usr/local/mapguideopensource-${BUILDNUM}
MGSOURCE=${BUILDROOT}/mgdev
+SVNROOT="svn://svn.bld.mgproto.net"
+#SVNROOT="http://svn.osgeo.org"
rm -rf ${MGSOURCE}
rm -rf ${INSTALLROOT}
-svn export svn://svn.bld.mgproto.net/mapguide/trunk/MgDev ${MGSOURCE}
-svn export svn://svn.bld.mgproto.net/metacrs/csmap/trunk/CsMapDev ${MGSOURCE}/Oem/CsMap
-svn export svn://svn.bld.mgproto.net/fusion/trunk ${MGSOURCE}/Oem/fusion
+REVISION=`svn info ${SVNROOT}/mapguide/trunk/MgDev | perl revnum.pl`
+echo "Building Revision ${BUILDNUM}.${REVISION}"
+svn export -r ${REVISION} ${SVNROOT}/mapguide/trunk/MgDev ${MGSOURCE}
+svn export ${SVNROOT}/metacrs/csmap/trunk/CsMapDev ${MGSOURCE}/Oem/CsMap
+svn export ${SVNROOT}/fusion/trunk ${MGSOURCE}/Oem/fusion
cd ${MGSOURCE}
pushd ${MGSOURCE}/Oem/LinuxApt
-./build_apt.sh
+./build_apt.sh --prefix ${INSTALLROOT} --with-tomcat
popd
-./build_oem.sh
+./build_oem.sh --prefix=${INSTALLROOT}
pushd ${MGSOURCE}/Oem/fusion
ant prepare
@@ -27,6 +32,33 @@
libtoolize --force
automake --add-missing --copy
autoconf
-./configure --enable-optimized
+./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}
+popd
More information about the mapguide-commits
mailing list