[mapguide-commits] r7974 - trunk/Installer/scripts

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sat Feb 8 20:37:32 PST 2014


Author: jng
Date: 2014-02-08 20:37:32 -0800 (Sat, 08 Feb 2014)
New Revision: 7974

Modified:
   trunk/Installer/scripts/build_fdo.sh
Log:
Update trunk linux build script from 2.5

Modified: trunk/Installer/scripts/build_fdo.sh
===================================================================
--- trunk/Installer/scripts/build_fdo.sh	2014-02-08 17:42:45 UTC (rev 7973)
+++ trunk/Installer/scripts/build_fdo.sh	2014-02-09 04:37:32 UTC (rev 7974)
@@ -11,20 +11,23 @@
 
 # FDO version. Make sure this matches your FDO build source
 FDO_VER_MAJOR=3
-FDO_VER_MINOR=8
-FDO_VER_REV=1
+FDO_VER_MINOR=9
+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/mgbuild/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\/mgbuild\/fdo_rdbms_thirdparty\/mysql\/x86/g' ${FDO_BUILD_AREA}/setenvironment.sh
+	sed -i 's/export FDOPOSTGRESQL=$FDOTHIRDPARTY\/pgsql/export FDOPOSTGRESQL=\/home\/mgbuild\/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



More information about the mapguide-commits mailing list