Mercurial > dive4elements > river
annotate contrib/make_flys_release/bin/make-opt-package.sh @ 7866:0c74b5f8de17
Precision and scale have to be set to represent integers with NUMBER; DOUBLE PRECISION is preferable for floating point (see issue1304).
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Tue, 13 May 2014 10:30:00 +0200 |
parents | f3b2aeb27e4b |
children |
rev | line source |
---|---|
5180
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
1 # Required packages are the build essential stuff make gcc etc. |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
2 # and: |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
3 # postgresql-devel libexpat-devel python-devel |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
4 set -e |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 # This script is intended to be run on suse enterprise linux |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 # Path to the oracle zip archives |
7439
f3b2aeb27e4b
make-opt-package.sh: give path to internal 'repository'.
Tom Gottfried <tom@intevation.de>
parents:
5180
diff
changeset
|
8 ORACLE_LOC=/home/projects/Geospatial/dami/repo |
5180
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 # Path to the Source tarballs of gdal-1.9.2.tar.gz proj-4.8.0.tar.gz cx_Oracle-5.1.2.tar.gz |
7439
f3b2aeb27e4b
make-opt-package.sh: give path to internal 'repository'.
Tom Gottfried <tom@intevation.de>
parents:
5180
diff
changeset
|
10 SOURCES=/home/projects/Geospatial/dami/repo |
5180
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 #mkdir -p $SOURCES |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 #cd $SOURCES |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 #wget http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 #wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 #wget http://downloads.sourceforge.net/project/cx-oracle/5.1.2/cx_Oracle-5.1.2.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
17 DEVELDIR=/tmp/gdalbuild |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 INSTALL_PREFIX=$DEVELDIR/opt |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 export ORACLE_HOME=$DEVELDIR/opt/instantclient_11_2 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 rm -rf $DEVELDIR |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 mkdir -p $DEVELDIR |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 mkdir -p $SOURCES |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 cd $SOURCES |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 wget http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 wget http://downloads.sourceforge.net/project/cx-oracle/5.1.2/cx_Oracle-5.1.2.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 # Oracle |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
33 unzip $ORACLE_LOC/instantclient-basic-linux-x86-64-11.2.0.2.0.zip -d $DEVELDIR/opt |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
34 unzip $ORACLE_LOC/instantclient-sdk-linux-x86-64-11.2.0.2.0.zip -d $DEVELDIR/opt |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
35 unzip $ORACLE_LOC/instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zip -d $DEVELDIR/opt |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
36 mkdir $ORACLE_HOME/lib |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
37 cd $ORACLE_HOME/lib |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
38 ln -s ../libclntsh.so.11.1 . |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
39 ln -s ../libclntsh.so.11.1 libclntsh.so |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
40 ln -s ../libnnz11.so . |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
41 ln -s ../libocci.so.11.1 . |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
42 ln -s ../libocci.so.11.1 libocci.so |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
43 ln -s ../libociei.so . |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
44 ln -s ../libocijdbc11.so . |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
45 ln -s ../libsqlplusic.so . |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
46 ln -s ../libsqlplus.so . |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
47 cd $ORACLE_HOME |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
48 ln -s libclntsh.so.11.1 libclntsh.so |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
49 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
50 cd $DEVELDIR |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
51 tar -xf $SOURCES/proj-4.8.0.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
52 cd proj-4.8.0 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
53 ./configure --prefix=$INSTALL_PREFIX && make && make install |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
54 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
55 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
56 cd $DEVELDIR |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
57 tar -xf $SOURCES/gdal-1.9.2.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
58 cd gdal-1.9.2 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
59 patch -l -p0 << "EOF" |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
60 Index: ogr/ogrsf_frmts/oci/ogrocitablelayer.cpp |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
61 =================================================================== |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
62 --- ogr/ogrsf_frmts/oci/ogrocitablelayer.cpp (revision 25700) |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
63 +++ ogr/ogrsf_frmts/oci/ogrocitablelayer.cpp (working copy) |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
64 @@ -264,7 +264,7 @@ |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
65 char **papszResult; |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
66 int iDim = -1; |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
67 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
68 - oDimCmd.Append( "SELECT COUNT(*) FROM ALL_SDO_GEOM_METADATA u," ); |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
69 + oDimCmd.Append( "SELECT COUNT(*) FROM USER_SDO_GEOM_METADATA u," ); |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
70 oDimCmd.Append( " TABLE(u.diminfo) t" ); |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
71 oDimCmd.Append( " WHERE u.table_name = '" ); |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
72 oDimCmd.Append( osTableName ); |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
73 EOF |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
74 LDFLAGS="-Wl,--no-as-needed" ./configure --with-python --with-oci=$ORACLE_HOME \ |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
75 --prefix=$INSTALL_PREFIX && make && make install |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
76 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
77 cd $DEVELDIR |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
78 tar -xf $SOURCES/cx_Oracle-5.1.2.tar.gz |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
79 cd cx_Oracle-5.1.2 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
80 python setup.py build |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
81 python setup.py install --prefix=$INSTALL_PREFIX |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
82 |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
83 cd $DEVELDIR |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
84 tar -czf flys-importer-opt.tar.gz opt |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
85 echo "Package is:" |
520b4fea63bb
Add script to build third party libs for the flys-importer package
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
86 readlink -f flys-importer-opt.tar.gz |