Mercurial > dive4elements > river
annotate contrib/make_flys_release/bin/make-importer-package.sh @ 5140:18ef819a7c92
Changed river axis from LineString to MultiLineString.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 28 Feb 2013 14:04:41 +0100 |
parents | 415ac9bc5a56 |
children | 9474e27e319a |
rev | line source |
---|---|
5097
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
1 #!/bin/bash |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
2 set -e |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
3 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
4 # See README for more information |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 # The working directory. Resulting tarball will be placed in the directory above. |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 PKG_DIR=/tmp/flys-importer |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 # Path to oracle zip archives and an oracle_cx rpm |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 ORACLE=/path/to/oracle/archives |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 # Default conf |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 CONF_DIR=/path/to/conf/dir |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 # Path to the flys checkout |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 FLYS_DIR=/path/to/flys/root |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 # Extra packages |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 EXTRAS=/path/to/gdal |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
17 rm -fr $PKG_DIR |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 mkdir -p $PKG_DIR/hydr_morph |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 mkdir -p $PKG_DIR/geodaesie |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 mkdir -p $PKG_DIR/opt/lib64 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 mkdir -p $PKG_DIR/schema |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 cd ${FLYS_DIR}/flys-backend |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 mvn -f pom-oracle.xml clean compile assembly:single |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 cp target/flys-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \ |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 $PKG_DIR/hydr_morph/importer.jar |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 cp ${FLYS_DIR}/flys-backend/contrib/shpimporter/*.py $PKG_DIR/geodaesie |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 cp ${FLYS_DIR}/flys-backend/contrib/run_geo.sh \ |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 ${FLYS_DIR}/flys-backend/contrib/run_hydr_morph.sh \ |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 $PKG_DIR |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 cp -r ${CONF_DIR} $PKG_DIR |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 ln -s /usr/lib64/libproj.so.0.6.6 $PKG_DIR/opt/lib64/libproj.so # workaround for bad packaging |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
33 rm -rf /tmp/other_rpms |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
34 mkdir /tmp/other_rpms |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
35 cd /tmp/other_rpms |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
36 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
37 rpm2cpio ${EXTRAS}/libgdal1-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
38 rpm2cpio ${EXTRAS}/gdal-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
39 rpm2cpio ${EXTRAS}/python-gdal-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
40 rpm2cpio ${ORACLE}/cx\_Oracle-5.1.2-11g-py26-1.x86\_64.rpm | cpio -i --make-directories |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
41 cp -r /tmp/other_rpms/usr/* $PKG_DIR/opt |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
42 rm -rf /tmp/other_rpms |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
43 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
44 cp ${FLYS_DIR}/flys-backend/doc/schema/*.sql $PKG_DIR/schema |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
45 cp ${FLYS_DIR}/flys-backend/doc/documentation/de/importer-manual.pdf $PKG_DIR |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
46 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
47 # Oracle (Do not distribute) |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
48 unzip ${ORACLE}/instantclient-basic-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
49 unzip ${ORACLE}/instantclient-sdk-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
50 unzip ${ORACLE}/instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
51 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
52 mkdir $PKG_DIR//opt/instantclient_11_2/lib |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
53 cd $PKG_DIR//opt/instantclient_11_2/lib |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
54 ln -s ../libclntsh.so.11.1 . |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
55 ln -s ../libclntsh.so.11.1 libclntsh.so |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
56 ln -s ../libnnz11.so . |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
57 ln -s ../libocci.so.11.1 . |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
58 ln -s ../libocci.so.11.1 libocci.so |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
59 ln -s ../libociei.so . |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
60 ln -s ../libocijdbc11.so . |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
61 ln -s ../libsqlplusic.so . |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
62 ln -s ../libsqlplus.so . |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
63 # End Oracle |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
64 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
65 sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
66 |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
67 cd $PKG_DIR/.. |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
68 DATE=$(date +%Y%m%d%H%m) |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
69 tar -czf flys-importer${DATE}.tar.gz flys-importer |
415ac9bc5a56
Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
70 sha1sum flys-importer${DATE}.tar.gz > flys-importer${DATE}.tar.gz.sha1 |