comparison contrib/make_flys_release/bin/make-importer-package.sh @ 5128:a020100ee6a1

SCHEME CHANGE: Merge branch dami into default. A summary on the scheme changes: HWS and Lines tables are dropped and will be replaced by HWS_Lines and HWS_Points. The catchment table removed and will be replaced by a WMS Service. Hydr_boundaries has an added reference to boundary_kind sectie_kind and sobek_kind objects. Dem has a new column srid.
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 28 Feb 2013 11:48:17 +0100
parents 415ac9bc5a56
children 9474e27e319a
comparison
equal deleted inserted replaced
5126:e37b25628dd4 5128:a020100ee6a1
1 #!/bin/bash
2 set -e
3
4 # See README for more information
5
6 # The working directory. Resulting tarball will be placed in the directory above.
7 PKG_DIR=/tmp/flys-importer
8 # Path to oracle zip archives and an oracle_cx rpm
9 ORACLE=/path/to/oracle/archives
10 # Default conf
11 CONF_DIR=/path/to/conf/dir
12 # Path to the flys checkout
13 FLYS_DIR=/path/to/flys/root
14 # Extra packages
15 EXTRAS=/path/to/gdal
16
17 rm -fr $PKG_DIR
18 mkdir -p $PKG_DIR/hydr_morph
19 mkdir -p $PKG_DIR/geodaesie
20 mkdir -p $PKG_DIR/opt/lib64
21 mkdir -p $PKG_DIR/schema
22
23 cd ${FLYS_DIR}/flys-backend
24 mvn -f pom-oracle.xml clean compile assembly:single
25 cp target/flys-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \
26 $PKG_DIR/hydr_morph/importer.jar
27 cp ${FLYS_DIR}/flys-backend/contrib/shpimporter/*.py $PKG_DIR/geodaesie
28 cp ${FLYS_DIR}/flys-backend/contrib/run_geo.sh \
29 ${FLYS_DIR}/flys-backend/contrib/run_hydr_morph.sh \
30 $PKG_DIR
31 cp -r ${CONF_DIR} $PKG_DIR
32 ln -s /usr/lib64/libproj.so.0.6.6 $PKG_DIR/opt/lib64/libproj.so # workaround for bad packaging
33 rm -rf /tmp/other_rpms
34 mkdir /tmp/other_rpms
35 cd /tmp/other_rpms
36
37 rpm2cpio ${EXTRAS}/libgdal1-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories
38 rpm2cpio ${EXTRAS}/gdal-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories
39 rpm2cpio ${EXTRAS}/python-gdal-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories
40 rpm2cpio ${ORACLE}/cx\_Oracle-5.1.2-11g-py26-1.x86\_64.rpm | cpio -i --make-directories
41 cp -r /tmp/other_rpms/usr/* $PKG_DIR/opt
42 rm -rf /tmp/other_rpms
43
44 cp ${FLYS_DIR}/flys-backend/doc/schema/*.sql $PKG_DIR/schema
45 cp ${FLYS_DIR}/flys-backend/doc/documentation/de/importer-manual.pdf $PKG_DIR
46
47 # Oracle (Do not distribute)
48 unzip ${ORACLE}/instantclient-basic-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt
49 unzip ${ORACLE}/instantclient-sdk-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt
50 unzip ${ORACLE}/instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt
51
52 mkdir $PKG_DIR//opt/instantclient_11_2/lib
53 cd $PKG_DIR//opt/instantclient_11_2/lib
54 ln -s ../libclntsh.so.11.1 .
55 ln -s ../libclntsh.so.11.1 libclntsh.so
56 ln -s ../libnnz11.so .
57 ln -s ../libocci.so.11.1 .
58 ln -s ../libocci.so.11.1 libocci.so
59 ln -s ../libociei.so .
60 ln -s ../libocijdbc11.so .
61 ln -s ../libsqlplusic.so .
62 ln -s ../libsqlplus.so .
63 # End Oracle
64
65 sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh
66
67 cd $PKG_DIR/..
68 DATE=$(date +%Y%m%d%H%m)
69 tar -czf flys-importer${DATE}.tar.gz flys-importer
70 sha1sum flys-importer${DATE}.tar.gz > flys-importer${DATE}.tar.gz.sha1

http://dive4elements.wald.intevation.org