| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | Add updated re repository for ubuntu 8.10 intrepid : |
| 8 | |
| 9 | {{{ |
| 10 | # add repository to sources.list (thanks to Jef) |
| 11 | echo "deb http://ppa.launchpad.net/jef-norbit/ubuntu intrepid main" >> /etc/apt/sources.list |
| 12 | echo "deb-src http://ppa.launchpad.net/jef-norbit/ubuntu intrepid main" >> /etc/apt/sources.list |
| 13 | |
| 14 | # Update : |
| 15 | |
| 16 | sudo apt-get update |
| 17 | sudo apt-get upgrade |
| 18 | }}} |
| 19 | |
| 20 | These repository give you an updated gdal version and a development version of qgis too (apt-get install qgis) |
| 21 | |
| 22 | Install some depenndecies: |
| 23 | |
| 24 | {{{ |
| 25 | |
| 26 | apt-get install libqt4-core libqt4-dev libqt4-gui libqt4-qt3support lsb-qt4 qt4-dev-tools qt4-doc qt4-qtconfig \ |
| 27 | uim-qt gdal-bin libgdal1-dev libgeos-dev proj libgdal-doc libtiff4-dev subversion make g++ g++-4.1 gcc libgeotiff1.2 \ |
| 28 | libgeotiff-dev libgeotiff-epsg cmake |
| 29 | |
| 30 | }}} |
| 31 | |
| 32 | Download and compile Openscenegraph from source : |
| 33 | |
| 34 | {{{ |
| 35 | svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.6.1 OpenSceneGraph |
| 36 | cd OpensceneGraph |
| 37 | mkdir build |
| 38 | cd build |
| 39 | ccmake .. # delete the not-find libraries from the cmake setting-lines |
| 40 | # press c to configure |
| 41 | # press g to generate makefile |
| 42 | make |
| 43 | sudo make install |
| 44 | }}} |
| 45 | |
| 46 | Download and install ffmpeg (maybe the repository version of ffmpeg can be used too ... i'll check it) : |
| 47 | |
| 48 | {{{ |
| 49 | cd /home/sasha/GIS |
| 50 | mkdir DEP |
| 51 | cd DEP |
| 52 | svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg |
| 53 | cd ffmpeg |
| 54 | ./configure --disable-vhook --disable-mmx --disable-static --enable-shared |
| 55 | make |
| 56 | cd libswscale |
| 57 | make |
| 58 | sudo make install |
| 59 | cd .. |
| 60 | sudo make install |
| 61 | |
| 62 | # Create simbolink link to put the include files all in a standard place (/usr/iclude/ffmpeg) |
| 63 | |
| 64 | mkdir '/usr/include/ffmpeg' |
| 65 | sudo ln -s '/usr/local/include/libavcodec/avcodec.h' '/usr/local/include/libavcodec/opt.h' '/usr/include/ffmpeg' |
| 66 | |
| 67 | sudo ln -s '/usr/local/include/libavdevice/avdevice.h' '/usr/include/ffmpeg' |
| 68 | |
| 69 | sudo ln -s '/usr/local/include/libavformat/avformat.h' '/usr/local/include/libavformat/avio.h' |
| 70 | '/usr/local/include/libavformat/rtsp.h' '/usr/local/include/libavformat/rtspcodes.h' '/usr/include/ffmpeg' |
| 71 | |
| 72 | sudo ln -s '/usr/local/include/libavutil/adler32.h' '/usr/local/include/libavutil/avstring.h' |
| 73 | '/usr/local/include/libavutil/avutil.h' '/usr/local/include/libavutil/base64.h' '/usr/local/include/libavutil/common.h' |
| 74 | '/usr/local/include/libavutil/crc.h' '/usr/local/include/libavutil/fifo.h' '/usr/local/include/libavutil/intfloat_readwrite.h' |
| 75 | '/usr/local/include/libavutil/log.h' '/usr/local/include/libavutil/lzo.h' '/usr/local/include/libavutil/mathematics.h' |
| 76 | '/usr/local/include/libavutil/md5.h' '/usr/local/include/libavutil/mem.h' '/usr/local/include/libavutil/random.h' |
| 77 | '/usr/local/include/libavutil/rational.h' '/usr/local/include/libavutil/sha1.h' '/usr/include/ffmpeg' |
| 78 | |
| 79 | sudo ln -s '/usr/local/include/libswscale/swscale.h' '/usr/include/ffmpeg' |
| 80 | }}} |
| 81 | |
| 82 | Download ossim from svn and compile it: |
| 83 | |
| 84 | {{{ |
| 85 | cd |
| 86 | mkdir -p GIS/ossim |
| 87 | cd /GIS/ossim |
| 88 | svn co https://svn.osgeo.org/ossim/trunk . |
| 89 | |
| 90 | # Set the ossim environment variables : |
| 91 | |
| 92 | echo "export OSSIM_DEV_HOME=/home/sasha/GIS/ossim" >> /home/sasha/.bashrc |
| 93 | echo "export OSSIM_HOME=/home/sasha/GIS/ossim/ossim" >> /home/sasha/.bashrc |
| 94 | echo "export OSSIM_QT_HOME=/home/sasha/GIS/ossim/ossim_qt" >> /home/sasha/.bashrc |
| 95 | echo "export OSSIM_LIB_DIR=/home/sasha/GIS/ossim/ossim/lib/ossim" >> /home/sasha/.bashrc |
| 96 | echo "export OSSIM_INC_DIR=/home/sasha/GIS/ossim/ossim/include" >> /home/sasha/.bashrc |
| 97 | }}} |
| 98 | |
| 99 | Add /usr/local/lib and /usr/local/lib64 (if you're on 64 bit machine) to you're /etc/ld.so.conf.d/: |
| 100 | |
| 101 | {{{ |
| 102 | sudo touch /etc/ld.so.conf.d/local.conf |
| 103 | sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/ossim.conf |
| 104 | sudo echo "/usr/local/lib64" >> /etc/ld.so.conf.d/ossim.conf |
| 105 | }}} |
| 106 | |
| 107 | Compile Ossim core libs: |
| 108 | |
| 109 | {{{ |
| 110 | cd /home/sasha/GIS/ossim/ossim |
| 111 | ./configure --with-geotiff=/usr/include/geotiff --prefix=/usr --with-jpeg=/usr --with-libtif |
| 112 | make |
| 113 | sudo make install |
| 114 | }}} |
| 115 | |
| 116 | To build libwms on ubuntu 8.10 download these patch : |
| 117 | |
| 118 | [http://www.geofemengineering.it/libwms.patch libwms_patch] |
| 119 | |
| 120 | save the patch as libwms.patch and run : |
| 121 | |
| 122 | {{{ |
| 123 | cd /home/sasha/GIS/ossim/libwms |
| 124 | patch -Np0 < /path/to/libwms.patch |
| 125 | make |
| 126 | sudo make install |
| 127 | }}} |
| 128 | |
| 129 | |
| 130 | To load the new libraries open a new terminal and type : |
| 131 | |
| 132 | {{{ |
| 133 | sudo ldconfig |
| 134 | cd /home/sasha/GIS/ossim/ossim_qt4 |
| 135 | qmake ossim_qt4.pro |
| 136 | make |
| 137 | sudo make install |
| 138 | }}} |
| 139 | |
| 140 | Build ossimPredator libs: |
| 141 | {{{ |
| 142 | cd /home/sasha/GIS/ossim/ossimPredator |
| 143 | mkdir lib |
| 144 | cd src |
| 145 | make |
| 146 | sudo -s |
| 147 | sudo OSSIM_DEV_HOME=$OSSIM_DEV_HOME OSSIM_HOME=$OSSIM_HOME make install |
| 148 | }}} |
| 149 | |
| 150 | |
| 151 | Now build ossimplanet, fon ubuntu 8.10 download these patch: |
| 152 | |
| 153 | [http://www.geofemengineering.it/ossim_planet.patch ossim_planet_patch] |
| 154 | |
| 155 | Save the patch as ossimPlanet.patch and run : |
| 156 | |
| 157 | {{{ |
| 158 | patch -Np0 < /path/to/ossim_planet.patch |
| 159 | OSSIMPREDATOR_LIB_DIR=/usr/local/lib make |
| 160 | sudo OSSIMPREDATOR_LIB_DIR=/usr/local/lib make install |
| 161 | cd /home/sasha/GIS/ossim/ossimPlanetQt/ |
| 162 | qmake ossimPlanetQt.pro |
| 163 | make |
| 164 | sudo make install |
| 165 | sudo ldconfig |
| 166 | }}} |
| 167 | |
| 168 | |
| 169 | To buid ossom_plugin, change the gdal setting in the file |
| 170 | |
| 171 | /home/sasha/GIS/ossim/ossim_plugins/make.opt.in |
| 172 | /home/sasha/GIS/ossim/ossim_plugins/make.opt |
| 173 | |
| 174 | To point where you have gdal's files (hhere i used gdal from the repository) |
| 175 | |
| 176 | {{{ |
| 177 | GDAL_HOME =/usr/ |
| 178 | ifeq ($(origin GDAL_HOME), undefined) |
| 179 | GDAL_INCLUDES =/usr/include/gdal/ |
| 180 | GDAL_LIBS =/usr/lib -lgdal |
| 181 | else |
| 182 | GDAL_INCLUDES = -I$(GDAL_HOME)/include/gdal/ |
| 183 | GDAL_LIBS = -L$(GDAL_HOME)/lib -lgdal |
| 184 | endif |
| 185 | }}} |
| 186 | |
| 187 | {{{ |
| 188 | cd /home/sasha/GIS/ossim/ossim_plugins/ |
| 189 | make |
| 190 | }}} |
| 191 | |
| 192 | Create a "data" directory readed from ossim at its sturtup and copy iside it the "ossim support data": |
| 193 | {{{ |
| 194 | mkdir /home/sasha/.ossim |
| 195 | cp -r /home/sasha/GIS/ossim/ossim_package_support/fonts /home/sasha/.ossim/fonts |
| 196 | cp -r /home/sasha/GIS/ossim/ossim_package_support/geoids /home/sasha/.ossim/geoids |
| 197 | cp -r /home/sasha/GIS/ossim/ossim_package_support/images /home/sasha/.ossim/images |
| 198 | }}} |
| 199 | |