Created
May 19, 2016 03:09
-
-
Save samtux/4e8813d116e92edf29e31f14d77ab8df to your computer and use it in GitHub Desktop.
PKGBUILD OSSIM 1.8.20-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Samuel Mesa <samuelmesa@linuxmail.org> | |
# Contributor: mbostwick <mbostwick89@gmail.com> | |
# Contributor: Christian Wygoda <accounts@wygoda.net> | |
pkgname=ossim | |
pkgver=1.8.20.3 | |
_pkgver=1.8.20-3 | |
pkgrel=1 | |
pkgdesc="OSSIM is a powerful suite of geospatial libraries and applications used to process imagery, maps, terrain, and vector data." | |
url="http://www.ossim.org" | |
license=('LGPL') | |
arch=('i686' 'x86_64') | |
depends=('freetype2' 'gdal' 'libgeotiff' 'libjpeg' 'libtiff' 'openscenegraph' 'openjpeg' 'doxygen' 'hdf5-cpp-fortran' | |
'minizip' 'expat' 'ffmpeg' 'qt4' 'podofo' 'liblas' 'bzip2' 'freetype2' 'opencv2' 'sqlite3') | |
makedepends=('cmake') | |
optdepends=( 'java-environment-common' 'openmpi' 'gpstk-bin' ) | |
source=(http://download.osgeo.org/ossim/source/latest/${pkgname}-${_pkgver}.tar.gz | |
ossim.sh | |
lib64bit_cmake_patch.patch | |
fix-ossim-trac-2354.diff) | |
install=ossim.install | |
md5sums=('eb2265db0d4d9201e255b92317121cfd' | |
'cb85c216a099b10f057cddeeae4a57fb' | |
'9531d170d973b85bcf8f0889d9415d99' | |
'79e1e01bc9b8de9e0c0f481ccb19a8f7') | |
prepare() { | |
cd ${srcdir}/${pkgname}-${_pkgver} | |
patch -p0 < ../lib64bit_cmake_patch.patch | |
patch -p0 < ../fix-ossim-trac-2354.diff | |
} | |
build() { | |
cd $srcdir | |
#Build | |
if [[ -d "$srcdir/build" ]]; then | |
(rm -rf $srcdir/build) | |
fi | |
mkdir $srcdir/build | |
cd $srcdir/build | |
OSSIM_DEV_HOME="$srcdir/${pkgname}-${_pkgver}"; | |
build_dir="$srcdir/${pkgname}-${_pkgver}"; | |
cmake -G "Unix Makefiles" \ | |
-DBUILD_CSMAPI=OFF \ | |
-DBUILD_LIBRARY_DIR=lib \ | |
-DBUILD_OMS=ON \ | |
-DBUILD_OSSIM=ON \ | |
-DBUILD_OSSIM_PLUGIN=ON \ | |
-DBUILD_OSSIMCONTRIB_PLUGIN=OFF \ | |
-DBUILD_OSSIMCSM_PLUGIN=OFF \ | |
-DBUILD_OSSIMGEOPDF_PLUGIN=ON \ | |
-DBUILD_OSSIMGDAL_PLUGIN=ON \ | |
-DBUILD_OSSIMLIBLAS_PLUGIN=ON \ | |
-DBUILD_OSSIMOPENCV_PLUGIN=OFF \ | |
-DBUILD_OSSIMSQLITE_PLUGIN=OFF \ | |
-DBUILD_OSSIMHDF_PLUGIN=OFF \ | |
-DBUILD_OSSIMKAKADU_PLUGIN=OFF \ | |
-DBUILD_OSSIMKMLSUPEROVERLAY_PLUGIN=ON \ | |
-DBUILD_OSSIMLAS_PLUGIN=ON \ | |
-DBUILD_OSSIMLIBLAS_PLUGIN=OFF \ | |
-DBUILD_OSSIMLIBRAW_PLUGIN=ON \ | |
-DBUILD_OSSIMMRSID_PLUGIN=OFF \ | |
-DBUILD_OSSIMNDF_PLUGIN=ON \ | |
-DBUILD_OSSIMOPENJPEG_PLUGIN=OFF \ | |
-DBUILD_OSSIMPNG_PLUGIN=ON \ | |
-DBUILD_OSSIMREGISTRATION_PLUGIN=ON \ | |
-DBUILD_OSSIMQT4=ON \ | |
-DBUILD_OSSIMGUI=ON \ | |
-DBUILD_OSSIM_MPI_SUPPORT=OFF \ | |
-DBUILD_OSSIMPLANET=OFF \ | |
-DBUILD_OSSIMPLANETQT=OFF \ | |
-DBUILD_OSSIMPREDATOR=OFF \ | |
-DBUILD_OSSIM_TEST_APPS=ON \ | |
-DBUILD_RUNTIME_DIR=bin \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DBUILD_WMS=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INCLUDE_PATH=/usr/include \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_LIBRARY_PATH=/usr/lib \ | |
-DCMAKE_MODULE_PATH=${build_dir}/ossim_package_support/cmake/CMakeModules \ | |
-DOSSIM_BUILD_ADDITIONAL_DIRECTORIES="${build_dir}/ossimjni" \ | |
-DOSSIM_COMPILE_WITH_FULL_WARNING=OFF \ | |
-DOSSIM_DEPENDENCIES=/usr \ | |
-DOSSIM_DEV_HOME=${build_dir} \ | |
-DOSSIM_INSTALL_PLUGINS_WITH_VERSION=OFF \ | |
-DOSSIM_LIBRARIES=${build_dir}/build/lib/libossim.so \ | |
-DOSSIM_PLUGIN_LINK_TYPE=MODULE \ | |
-DFREETYPE_INCLUDE_DIR_ft2build=/usr/include/freetype2 \ | |
${build_dir}/ossim_package_support/cmake/ | |
make -j4 | |
} | |
package() { | |
cd $srcdir/build | |
build_dir="$srcdir/${pkgname}-${_pkgver}"; | |
make DESTDIR=${pkgdir} install || return 1 | |
sed -i -e 's|epsg_database_file1: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_epsg_projections-v7_4.csv|epsg_database_file1: $(OSSIM_DATA)/projection/ossim_epsg_projections-v7_4.csv|g' \ | |
${build_dir}/ossim/etc/templates/ossim_preferences_template | |
sed -i -e 's|epsg_database_file2: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_harn_state_plane_epsg.csv|epsg_database_file2: $(OSSIM_DATA)/projection/ossim_harn_state_plane_epsg.csv|g' \ | |
${build_dir}/ossim/etc/templates/ossim_preferences_template | |
sed -i -e 's|epsg_database_file3: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_state_plane_spcs.csv|epsg_database_file3: $(OSSIM_DATA)/projection/ossim_state_plane_spcs.csv|g' \ | |
${build_dir}/ossim/etc/templates/ossim_preferences_template | |
sed -i -e 's|epsg_database_file4: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_harn_state_plane_esri.csv|epsg_database_file4: $(OSSIM_DATA)/projection/ossim_harn_state_plane_esri.csv|g' \ | |
${build_dir}/ossim/etc/templates/ossim_preferences_template | |
sed -i -e 's|wkt_database_file: $(OSSIM_DATA)/ossim/share/ossim/projection/ossim_wkt_pcs.csv|wkt_database_file: $(OSSIM_DATA)/projection/ossim_wkt_pcs.csv|g' \ | |
${build_dir}/ossim/etc/templates/ossim_preferences_template | |
sed -i -e 's|geoid_ngs_directory: $(OSSIM_DATA)/ear1/geoid/geoid99|geoid_ngs_directory: $(OSSIM_DATA)/geoids/geoid99|g' \ | |
${build_dir}/ossim/etc/templates/ossim_preferences_template | |
sed -i -e 's|geoid_egm_96_grid: $(OSSIM_DATA)/ele1/geoid/geoid96/egm96.grd|geoid_egm_96_grid: $(OSSIM_DATA)/geoids/geoid1996/egm96.grd|g' \ | |
${build_dir}/ossim/etc/templates/ossim_preferences_template | |
# Install the templates file | |
cp -r ${build_dir}/ossim/etc/templates ${pkgdir}/usr/share/ossim/ | |
# Install the configuration file | |
mkdir ${pkgdir}/etc | |
install -D -m644 ${build_dir}/ossim/etc/config_files/dbossim.cfg ${pkgdir}/etc/ossim/dbossim.cfg | |
# Install profile.d file | |
install -D ${srcdir}/ossim.sh \ | |
${pkgdir}/etc/profile.d/ossim.sh | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment