Version 30 (modified by 15 years ago) ( diff ) | ,
---|
# add thes line to /etc/apt/sources.list
echo "deb http://ppa.launchpad.net/jef-norbit/ubuntu intrepid main" >> /etc/apt/sources.list echo "deb-src http://ppa.launchpad.net/jef-norbit/ubuntu intrepid main" >> /etc/apt/sources.list
# do an Update :
sudo apt-get update sudo apt-get upgrade
# it give you an updated gdal version # with it you can install a development version of qgis too # apt-get install qgis
# Install some libraries :
apt-get install libqt4-core libqt4-dev libqt4-gui libqt4-qt3support lsb-qt4 qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gdal-bin libgdal1-dev libgeos-dev proj libgdal-doc libtiff4-dev subversion make g++ g++-4.1 gcc libgeotiff1.2 libgeotiff-dev libgeotiff-epsg cmake
# download Openscenegraph from source :
svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.6.1 OpenSceneGraph
cd Op mkdir build cd build ccmake .. # delete the not-find libraries from the cmake setting-lines press c press g make sudo make install
# download and install ffmpeg :
cd /home/sasha/GIS
mkdir DEP
cd DEP
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --disable-vhook --disable-mmx --disable-static --enable-shared
make
cd libswscale
make
sudo make install
cd ..
sudo make install
# create simbolink link to put the include files all in a standard place (/usr/iclude/ffmpeg)
mkdir '/usr/include/ffmpeg'
sudo ln -s '/usr/local/include/libavcodec/avcodec.h' '/usr/local/include/libavcodec/opt.h' '/usr/include/ffmpeg'
sudo ln -s '/usr/local/include/libavdevice/avdevice.h' '/usr/include/ffmpeg'
sudo ln -s '/usr/local/include/libavformat/avformat.h' '/usr/local/include/libavformat/avio.h' '/usr/local/include/libavformat/rtsp.h' '/usr/local/include/libavformat/rtspcodes.h' '/usr/include/ffmpeg'
sudo ln -s '/usr/local/include/libavutil/adler32.h' '/usr/local/include/libavutil/avstring.h' '/usr/local/include/libavutil/avutil.h' '/usr/local/include/libavutil/base64.h' '/usr/local/include/libavutil/common.h' '/usr/local/include/libavutil/crc.h' '/usr/local/include/libavutil/fifo.h' '/usr/local/include/libavutil/intfloat_readwrite.h' '/usr/local/include/libavutil/log.h' '/usr/local/include/libavutil/lzo.h' '/usr/local/include/libavutil/mathematics.h' '/usr/local/include/libavutil/md5.h' '/usr/local/include/libavutil/mem.h' '/usr/local/include/libavutil/random.h' '/usr/local/include/libavutil/rational.h' '/usr/local/include/libavutil/sha1.h' '/usr/include/ffmpeg'
sudo ln -s '/usr/local/include/libswscale/swscale.h' '/usr/include/ffmpeg'
# download ossim
cd ..
mkdir -p GIS/ossim
cd /GIS/ossim
svn co https://svn.osgeo.org/ossim/trunk .
# set the ossim environment variables :
echo "export OSSIM_DEV_HOME=/home/sasha/GIS/ossim" >> /home/sasha/.bashrc
echo "export OSSIM_HOME=/home/sasha/GIS/ossim/ossim" >> /home/sasha/.bashrc
echo "export OSSIM_QT_HOME=/home/sasha/GIS/ossim/ossim_qt" >> /home/sasha/.bashrc
echo "export OSSIM_LIB_DIR=/home/sasha/GIS/ossim/ossim/lib/ossim" >> /home/sasha/.bashrc
echo "export OSSIM_INC_DIR=/home/sasha/GIS/ossim/ossim/include" >> /home/sasha/.bashrc
# build : # ossim # libwms # ossim_qt4 (to do) ## ossimplanet ## ossimplanet_qt ## ossim_plugins
cd /home/sasha/GIS/ossim/ossim
./configure --with-geotiff=/usr/include/geotiff --prefix=/usr --with-jpeg=/usr --with-libtif
make
sudo make install
# save the patch as libwms.patch # and run :
cd /home/sasha/GIS/ossim/libwms
patch < /path/to/libwms.patch
make
sudo make install
cd ..
# add the compiled libraries to your system :
sudo touch /etc/ld.so.conf.d/ossim.conf
sudo echo "/usr/lib" >> /etc/ld.so.conf.d/ossim.conf
sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/ossim.conf
sudo echo "/home/sasha/GIS/ossim/ossim/lib" >> /etc/ld.so.conf.d/ossim.conf
# open a new terminal and type :
sudo ldconfig
cd /home/sasha/GIS/ossim/ossim_qt4
qmake ossim_qt4.pro
make
sudo make install
################# needs a revision ##########
cd /home/sasha/GIS/ossim/ossimPlanet
make
sudo make install
cd /home/sasha/GIS/ossim/ossimPlanetQt/
qmake ossimPlanetQt.pro
make
sudo make install
sudo ldconfig
# to buid ossoim_plugin, change the gdal setting in the file
# /home/sasha/GIS/ossim/ossim_plugins/make.opt.in
# to point where you have gdal's files # (here i used gdal from the repository)
GDAL_HOME =/usr/
ifeq ($(origin GDAL_HOME), undefined)
GDAL_INCLUDES =/usr/include/gdal/
GDAL_LIBS =/usr/lib
else
GDAL_INCLUDES = -I$(GDAL_HOME)/include/gdal/
GDAL_LIBS = -L$(GDAL_HOME)/lib
endif
make
sudo make install
sudo ldconfig
# create a "data" directory readed from ossim at its sturtup :
mkdir /home/sasha/.ossim
# copy the "ossim support data" :
cp -r /home/sasha/GIS/ossim/ossim_package_support/fonts /home/sasha/.ossim/fonts
cp -r /home/sasha/GIS/ossim/ossim_package_support/geoids /home/sasha/.ossim/geoids
cp -r /home/sasha/GIS/ossim/ossim_package_support/images /home/sasha/.ossim/images