annotate contrib/make_flys_release/bin/make-importer-package.sh @ 5165:aa5b1e3c5af2

Added tag 2.9.10 for changeset 8c65acf01adc
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 04 Mar 2013 11:56:28 +0100
parents 9474e27e319a
children a51515056c45
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
5163
9474e27e319a Use annotation-types.xml from flys-backend sources
Andre Heinecke <aheinecke@intevation.de>
parents: 5097
diff changeset
32 cp ${FLYS_DIR}/flys-backend/doc/annotation-types.xml $PKG_DIR/conf
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
33 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
34 rm -rf /tmp/other_rpms
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 mkdir /tmp/other_rpms
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36 cd /tmp/other_rpms
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38 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
39 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
40 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
41 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
42 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
43 rm -rf /tmp/other_rpms
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44
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/schema/*.sql $PKG_DIR/schema
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
46 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
47
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48 # Oracle (Do not distribute)
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49 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
50 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
51 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
52
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
53 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
54 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
55 ln -s ../libclntsh.so.11.1 .
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
56 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
57 ln -s ../libnnz11.so .
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 .
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
59 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
60 ln -s ../libociei.so .
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
61 ln -s ../libocijdbc11.so .
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
62 ln -s ../libsqlplusic.so .
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
63 ln -s ../libsqlplus.so .
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
64 # End Oracle
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
65
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
66 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
67
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
68 cd $PKG_DIR/..
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
69 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
70 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
71 sha1sum flys-importer${DATE}.tar.gz > flys-importer${DATE}.tar.gz.sha1

http://dive4elements.wald.intevation.org