daily pastebin goal
12%
SHARE
TWEET

ossim pkgbuild 1.8.18-2

a guest Sep 5th, 2015 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Samuel Mesa <samuelmesa@linuxmail.org>
  2.  
  3. pkgname=ossim
  4. pkgver=1.8.18
  5. pkgrel=2
  6. pkgdesc="OSSIM is a powerful suite of geospatial libraries and applications used to process imagery, maps, terrain, and vector data."
  7. url="http://www.ossim.org"
  8. license=('LGPL')
  9. arch=('i686' 'x86_64')
  10. depends=('freetype2' 'gdal' 'libgeotiff' 'libjpeg' 'libtiff' 'openscenegraph' 'openjpeg'  'doxygen' 'hdf5-cpp-fortran'
  11.         'minizip' 'expat' 'ffmpeg' 'qt4' 'podofo' ,'liblas')
  12. makedepends=('cmake')
  13. optdepends=( 'java-environment-common' 'openmpi' 'gpstk-bin' )
  14. source=(http://download.osgeo.org/ossim/source/latest/${pkgname}-${pkgver}.tar.gz ossim.sh lib64bit_cmake_patch.patch)
  15. install=ossim.install
  16. md5sums=('7bb918d8e20715d794eef86ad26e1389'
  17.          'cb85c216a099b10f057cddeeae4a57fb'
  18.          '0b9843c8406ec3125f6ac0f7de91f98c'
  19.         )
  20. prepare() {
  21.  cd ${srcdir}
  22.  patch -Np1 -i ../lib64bit_cmake_patch.patch
  23. }
  24. build() {
  25.   cd $srcdir
  26.   #Build
  27.   if [[ -d "$srcdir/build" ]]; then
  28.     (rm -rf $srcdir/build)
  29.   fi
  30.  
  31.   mkdir $srcdir/build
  32.   cd $srcdir/build
  33.  
  34.   OSSIM_DEV_HOME="$srcdir/${pkgname}-${pkgver}";
  35.   buildir="$srcdir/${pkgname}-${pkgver}";
  36.  
  37.   cmake -G "Unix Makefiles" \
  38.   -DBUILD_CSMAPI=OFF \
  39.   -DBUILD_OMS=ON \
  40.   -DBUILD_OSSIM=ON \
  41.   -DBUILD_OSSIM_PACKAGES=ON \
  42.   -DBUILD_OSSIM_PLUGIN=ON  \
  43.   -DBUILD_OSSIMCONTRIB_PLUGIN=OFF \
  44.   -DBUILD_OSSIMCSM_PLUGIN=OFF \
  45.   -DBUILD_OSSIMGEOPDF_PLUGIN=ON \
  46.   -DBUILD_OSSIMGDAL_PLUGIN=ON \
  47.   -DBUILD_OSSIMHDF_PLUGIN=OFF \
  48.   -DBUILD_OSSIMKAKADU_PLUGIN=OFF \
  49.   -DBUILD_OSSIMKMLSUPEROVERLAY_PLUGIN=ON \
  50.   -DBUILD_OSSIMLAS_PLUGIN=ON \
  51.   -DBUILD_OSSIMLIBLAS_PLUGIN=OFF \
  52.   -DBUILD_OSSIMLIBRAW_PLUGIN=ON \
  53.   -DBUILD_OSSIMMRSID_PLUGIN=OFF \
  54.   -DBUILD_OSSIMNDF_PLUGIN=ON \
  55.   -DBUILD_OSSIMOPENJPEG_PLUGIN=OFF \
  56.   -DBUILD_OSSIMHDF5_PLUGIN=ON \
  57.   -DBUILD_OSSIMWORLDWIND_PLUGIN=ON \
  58.   -DBUILD_OSSIMLIBLAS_PLUGIN=ON \
  59.   -DBUILD_OSSIMOPENCV_PLUGIN=ON \
  60.   -DBUILD_OSSIMSQLITE_PLUGIN=ON \
  61.   -DBUILD_OSSIMWEB_PLUGIN=ON \
  62.   -DBUILD_OSSIMPNG_PLUGIN=ON \
  63.   -DBUILD_OSSIMREGISTRATION_PLUGIN=ON \
  64.   -DBUILD_OSSIMQT4=ON \
  65.   -DBUILD_OSSIMGUI=ON \
  66.   -DBUILD_OSSIM_MPI_SUPPORT=OFF \
  67.   -DBUILD_OSSIMPLANET=ON \
  68.   -DBUILD_OSSIMPLANETQT=ON \
  69.   -DBUILD_OSSIMPREDATOR=ON \
  70.   -DBUILD_OSSIM_TEST_APPS=ON \
  71.   -DBUILD_RUNTIME_DIR=bin \
  72.   -DBUILD_SHARED_LIBS=ON \
  73.   -DBUILD_WMS=ON \
  74.   -DWMS_INCLUDE_DIR=${buildir}/libwms/include \
  75.   -OSSIM_BUILD_DOXYGEN=ON \
  76.   -DCMAKE_BUILD_TYPE=Debug \
  77.   -DCMAKE_INSTALL_PREFIX=/usr \
  78.   -DCMAKE_INSTALL_LIBDIR=/usr/lib \
  79.   -DBUILD_LIBRARY_DIR=/usr/lib \
  80.   -DOSSIM_DEV_HOME=${buildir} \
  81.   -DCMAKE_MODULE_PATH=${buildir}/ossim_package_support/cmake/CMakeModules \
  82.   -DOSSIM_BUILD_ADDITIONAL_DIRECTORIES="${buildir}/ossimjni" \
  83.   -DOSSIM_COMPILE_WITH_FULL_WARNING=ON \
  84.   -DOSSIM_INSTALL_PLUGINS_WITH_VERSION=OFF \
  85.   -DOSSIM_LIBRARIES=${buildir}/build/lib/libossim.so \
  86.   -DOSSIM_PLUGIN_LINK_TYPE=MODULE \
  87.   -DOSSIMPLANET_ENABLE_EPHEMERIS=ON \
  88.   -DINSTALL_LIBRARY_DIR=/usr/lib \
  89.   ${buildir}/ossim_package_support/cmake
  90.  
  91.   #-DOSSIM_DEPENDENCIES=${buildir}/local \
  92.   #-DCMAKE_INCLUDE_PATH=${buildir}/local/include \
  93.   #-DCMAKE_LIBRARY_PATH=${buildir}/local/lib \
  94.   #-DMRSID_DIR=${buildir}/mrsid \
  95.  
  96.   make -j5
  97. }
  98.  
  99.  
  100. package() {
  101.  
  102.   cd $srcdir/build
  103.   buildir="$srcdir/${pkgname}-${pkgver}";
  104.   make DESTDIR=${pkgdir} install || return 1  
  105.  
  106.   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' \
  107.   ${buildir}/ossim/etc/templates/ossim_preferences_template
  108.   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' \
  109.   ${buildir}/ossim/etc/templates/ossim_preferences_template
  110.   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' \
  111.   ${buildir}/ossim/etc/templates/ossim_preferences_template
  112.   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' \
  113.   ${buildir}/ossim/etc/templates/ossim_preferences_template
  114.  
  115.   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' \
  116.   ${buildir}/ossim/etc/templates/ossim_preferences_template
  117.  
  118.   sed -i -e 's|geoid_ngs_directory: $(OSSIM_DATA)/ear1/geoid/geoid99|geoid_ngs_directory: $(OSSIM_DATA)/geoids/geoid99|g' \
  119.   ${buildir}/ossim/etc/templates/ossim_preferences_template
  120.  
  121.   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' \
  122.   ${buildir}/ossim/etc/templates/ossim_preferences_template
  123.  
  124.  
  125.   # Install the templates file
  126.   cp -r ${buildir}/ossim/etc/templates ${pkgdir}/usr/share/ossim/
  127.  
  128.   # Install the configuration file
  129.   mkdir ${pkgdir}/etc
  130.   install -D -m644 ${buildir}/ossim/etc/config_files/dbossim.cfg ${pkgdir}/etc/ossim/dbossim.cfg
  131.  
  132.   # Install profile.d file
  133.   install -D ${srcdir}/ossim.sh \
  134.         ${pkgdir}/etc/profile.d/ossim.sh
  135.  
  136. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top