[mapguide-commits] r7954 - branches/2.5/Installer/scripts

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Dec 11 01:54:04 PST 2013


Author: jng
Date: 2013-12-11 01:54:03 -0800 (Wed, 11 Dec 2013)
New Revision: 7954

Modified:
   branches/2.5/Installer/scripts/build.sh
   branches/2.5/Installer/scripts/build_fdo.sh
   branches/2.5/Installer/scripts/dpkgmapguide.sh
Log:
Update Ubuntu build scripts

Modified: branches/2.5/Installer/scripts/build.sh
===================================================================
--- branches/2.5/Installer/scripts/build.sh	2013-12-05 12:00:46 UTC (rev 7953)
+++ branches/2.5/Installer/scripts/build.sh	2013-12-11 09:54:03 UTC (rev 7954)
@@ -2,7 +2,7 @@
 
 # Global vars for this script. Modify as necessary
 APIVERSION=2.5
-BUILDNUM=${APIVERSION}.0
+BUILDNUM=${APIVERSION}.2
 BUILDROOT=`pwd`
 INSTALLROOT=/usr/local/mapguideopensource-${BUILDNUM}
 #INSTALLROOT=/usr/local/mapguideopensource-trunk
@@ -17,7 +17,7 @@
 #SVNROOT="svn://svn.bld.mgproto.net"
 #SVNROOT="http://svn.osgeo.org"
 SVNRELPATH=/mapguide/branches/2.5/MgDev
-MY_MAKE_OPTS="-j 4"
+#MY_MAKE_OPTS="-j 4"
 UBUNTU=1
 PRESERVE_BUILD_ROOT=1
 

Modified: branches/2.5/Installer/scripts/build_fdo.sh
===================================================================
--- branches/2.5/Installer/scripts/build_fdo.sh	2013-12-05 12:00:46 UTC (rev 7953)
+++ branches/2.5/Installer/scripts/build_fdo.sh	2013-12-11 09:54:03 UTC (rev 7954)
@@ -12,19 +12,22 @@
 # FDO version. Make sure this matches your FDO build source
 FDO_VER_MAJOR=3
 FDO_VER_MINOR=8
-FDO_VER_REV=1
+FDO_VER_REV=0
 
+UBUNTU=1
+FDO_BUILD_CPU=i386
+
 # FDO install directory
 FDO_VER_FULL=${FDO_VER_MAJOR}.${FDO_VER_MINOR}.${FDO_VER_REV}
 FDO_INST=/usr/local/fdo-${FDO_VER_FULL}
 
 check_build()
 {
-    error=$?
-    if [ $error -ne 0 ]; then
-        echo "[error]: ${FDO_BUILD_COMPONENT} - Error build failed ($error)"
-        exit $error
-    fi
+	error=$?
+	if [ $error -ne 0 ]; then
+		echo "[error]: ${FDO_BUILD_COMPONENT} - Error build failed ($error)"
+		exit $error
+	fi
 }
 
 check_fdo_lib()
@@ -37,22 +40,67 @@
 	fi
 }
 
+save_current_file_list()
+{
+	echo "[info]: Saving current FDO dir file list"
+	pushd $FDO_INST
+	# For lazy folks who build from svn working copies instead of svn exports, we need to weed out any .svn dirs before compiling the file-list
+	find . -name .svn -exec rm -rf {} \;
+	find . -type f -print > ${FDO_FILELIST}/temp.lst
+	find . -type l -print >> ${FDO_FILELIST}/temp.lst
+	sort ${FDO_FILELIST}/temp.lst > ${FDO_FILELIST}/orig.lst
+	find . -type d -print | sort > ${FDO_FILELIST}/origdir.lst
+	popd
+}
+
+update_fdocore_file_list()
+{
+	echo "[info]: Updating FDO core file list for deb packaging"
+	pushd $FDO_INST
+	# For lazy folks who build from svn working copies instead of svn exports, we need to weed out any .svn dirs before compiling the file-list
+	find . -name .svn -exec rm -rf {} \;
+	find . -type f -print > ${FDO_FILELIST}/temp.lst
+	find . -type l -print >> ${FDO_FILELIST}/temp.lst
+	sort ${FDO_FILELIST}/temp.lst > ${FDO_FILELIST}/fdocore.lst
+	find . -type d -print | sort > ${FDO_FILELIST}/fdocoredir.lst
+	popd
+}
+
+update_provider_file_list()
+{
+	PROVIDER=$1
+	echo "[info]: Updating $PROVIDER file list for deb packaging"
+	pushd $FDO_INST
+	# For lazy folks who build from svn working copies instead of svn exports, we need to weed out any .svn dirs before compiling the file-list
+	find . -name .svn -exec rm -rf {} \;
+	#mkdir -p $BUILDLIST
+	find . -type f -print > ${FDO_FILELIST}/temp.lst
+	find . -type l -print >> ${FDO_FILELIST}/temp.lst
+	cat ${FDO_FILELIST}/orig.lst >> ${FDO_FILELIST}/temp.lst
+	sort ${FDO_FILELIST}/temp.lst | uniq -u > ${FDO_FILELIST}/${PROVIDER}.lst
+	find . -type d -print | sort > ${FDO_FILELIST}/temp.lst
+	cat ${FDO_FILELIST}/origdir.lst >> ${FDO_FILELIST}/temp.lst
+	sort ${FDO_FILELIST}/temp.lst | uniq -u > ${FDO_FILELIST}/${PROVIDER}dir.lst
+	popd
+}
+
 BUILDROOT=`pwd`
 
 LOCALSVN=1
 PRESERVE_BUILD_ROOT=1
 CMAKE=0
 
-FDO_SRC=/home/mgbuild/fdo/trunk
-#FDO_SRC=http://svn.osgeo.org/fdo/trunk
+FDO_SRC=/home/user/fdo/branches/3.8
+#FDO_SRC=http://svn.osgeo.org/fdo/branches/3.8
 FDO_BUILD_AREA=${BUILDROOT}/fdo_build_area
+FDO_FILELIST=${FDO_BUILD_AREA}/install/filelist
 
 modify_sdk_paths()
 {
 	echo "[info]: Updating setenvironment.sh"
 	# Note: Change your paths here if they're different
-	sed -i 's/export FDOMYSQL=$FDOTHIRDPARTY\/mysql\/rhlinux/export FDOMYSQL=\/usr/g' ${FDO_BUILD_AREA}/setenvironment.sh
-	sed -i 's/export FDOPOSTGRESQL=$FDOTHIRDPARTY\/pgsql/export FDOPOSTGRESQL=\/usr/g' ${FDO_BUILD_AREA}/setenvironment.sh
+	sed -i 's/export FDOMYSQL=$FDOTHIRDPARTY\/mysql\/rhlinux/export FDOMYSQL=\/home\/user\/fdo_rdbms_thirdparty\/mysql\/x86/g' ${FDO_BUILD_AREA}/setenvironment.sh
+	sed -i 's/export FDOPOSTGRESQL=$FDOTHIRDPARTY\/pgsql/export FDOPOSTGRESQL=\/home\/user\/fdo_rdbms_thirdparty\/pgsql/g' ${FDO_BUILD_AREA}/setenvironment.sh
 	echo "export FDOORACLE=/home/mgbuild/fdo_rdbms_thirdparty/oracle/x86/instantclient_11_2/sdk" >> ${FDO_BUILD_AREA}/setenvironment.sh
 }
 
@@ -67,12 +115,21 @@
 echo " FDO Build Area: ${FDO_BUILD_AREA}"
 echo " FDO Install dir: ${FDO_INST}"
 echo " CMake build: ${CMAKE}"
+echo " Is Ubuntu?: ${UBUNTU}"
 echo " Export from local SVN checkout: ${LOCALSVN}"
 echo " Re-use previous build area: ${PRESERVE_BUILD_ROOT}"
 echo "***********************************************************"
 start_time=`date +%s`
 REVISION=`svn info ${FDO_SRC} | perl revnum.pl`
 
+if [ -d ${FDO_INST} ];
+then
+	echo "[info]: Deleting directory ${FDO_INST} before build"
+	rm -rf ${FDO_INST}
+else
+	echo "[info]: ${FDO_INST} doesn't exist. Continuing build"
+fi
+
 if [ ${CMAKE} -eq 1 ];
 then
 	echo "[error]: CMake build of FDO not supported yet"
@@ -95,7 +152,7 @@
 				echo "[info]: Performing fresh SVN export of ${FDO_SRC} (r${REVISION}) to ${FDO_BUILD_AREA}"
 				svn export -q -r ${REVISION} ${FDO_SRC} ${FDO_BUILD_AREA}
 				modify_sdk_paths
-			fi			
+			fi
 		fi
 	else
 		echo "[info]: FDO build area ${FDO_BUILD_AREA} does not exist. Doing svn export"
@@ -131,12 +188,21 @@
 	exit 1;
 else
 	#NOTE: We never build ArcSDE provider because we haven't paid the ESRI tax for their ArcSDE SDK
-	for comp in fdocore fdo utilities shp sqlite gdal ogr wfs wms rdbms kingoracle sdf
+	for comp in fdocore fdo utilities
 	do
 		FDO_BUILD_COMPONENT="$comp (automake)"
 		./build_linux.sh --w $comp --p ${FDO_INST}
+		update_fdocore_file_list
 		check_build
 	done
+	for comp in shp sqlite gdal ogr wfs wms rdbms kingoracle sdf
+	do
+		save_current_file_list
+		FDO_BUILD_COMPONENT="$comp (automake)"
+		./build_linux.sh --w $comp --p ${FDO_INST}
+		update_provider_file_list $comp
+		check_build
+	done
 fi
 check_fdo_lib libFDO
 check_fdo_lib libExpressionEngine
@@ -180,8 +246,15 @@
 cd $BUILDROOT
 FDO_BUILD_COMPONENT="Make tarball"
 # Create a binary tar ball for FDO
-tar -zcf fdosdk-centos5-${FDO_VER_FULL}_${REVISION}.tar.gz ${FDO_INST}
+tar -zcf fdosdk-centos6-${FDO_VER_FULL}_${REVISION}.tar.gz ${FDO_INST}
 check_build
 
+if [ ${UBUNTU} -eq 1 ];
+then
+cd ${FDO_BUILD_AREA}/install
+dos2unix *
+./dpkgall.sh ${FDO_BUILD_CPU} ${REVISION}
+fi
+
 echo "[info]: FDO build complete!"
 echo Main build execution time: `expr $end_time - $start_time` s

Modified: branches/2.5/Installer/scripts/dpkgmapguide.sh
===================================================================
--- branches/2.5/Installer/scripts/dpkgmapguide.sh	2013-12-05 12:00:46 UTC (rev 7953)
+++ branches/2.5/Installer/scripts/dpkgmapguide.sh	2013-12-11 09:54:03 UTC (rev 7954)
@@ -33,7 +33,7 @@
 # Make sure setvars.sh is called first before running this script
 
 BUILDROOT=`pwd`
-MGBUILD=2.4.0
+MGBUILD=2.5.2
 MGINST=usr/local/mapguideopensource-${MGBUILD}
 ROOT=${BUILDROOT}/debian/mapguidecommon
 TREE=${BUILDROOT}/debian



More information about the mapguide-commits mailing list