Mercurial > dive4elements > river
diff contrib/make_flys_release/bin/make-importer-package.sh @ 5179:4355b4cecef8
Improve importer packaging by just expecting a tarball with
third party libs and no longer hack around with rpm2cpio.
It is now also possible to generate a "light" importer package
without third party libs by not providing that tarball.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 07 Mar 2013 10:21:46 +0100 |
parents | a51515056c45 |
children | 801866a89ee0 |
line wrap: on
line diff
--- a/contrib/make_flys_release/bin/make-importer-package.sh Wed Mar 06 16:44:42 2013 +0100 +++ b/contrib/make_flys_release/bin/make-importer-package.sh Thu Mar 07 10:21:46 2013 +0100 @@ -5,20 +5,29 @@ # The working directory. Resulting tarball will be placed in the directory above. PKG_DIR=/tmp/flys-importer -# Path to oracle zip archives and an oracle_cx rpm -ORACLE=/path/to/oracle/archives # Default conf CONF_DIR=/path/to/conf/dir # Path to the flys checkout FLYS_DIR=/path/to/flys/root -# Extra packages -EXTRAS=/path/to/gdal +# Tarball that will be extracted into flys-imprter/opt +EXTRAS=$1 rm -fr $PKG_DIR mkdir -p $PKG_DIR/hydr_morph mkdir -p $PKG_DIR/geodaesie mkdir -p $PKG_DIR/opt/lib64 mkdir -p $PKG_DIR/schema +mkdir -p $PKG_DIR/conf + +cat > "$PKG_DIR/conf/log4j.properties" << "EOF" +log4j.rootLogger=DEBUG, IMPORTER +log4j.appender.IMPORTER.layout=org.apache.log4j.PatternLayout +log4j.appender.IMPORTER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n +log4j.appender.IMPORTER=org.apache.log4j.RollingFileAppender +log4j.appender.IMPORTER.File=./import.log +log4j.appender.IMPORTER.MaxFileSize=100000KB +log4j.appender.IMPORTER.MaxBackupIndex=10 +EOF cd ${FLYS_DIR}/flys-backend mvn -f pom-oracle.xml clean compile assembly:single @@ -32,44 +41,19 @@ ${FLYS_DIR}/flys-backend/contrib/run_hydr_morph.sh \ ${FLYS_DIR}/flys-backend/contrib/import_river.sh \ $PKG_DIR -cp -r ${CONF_DIR} $PKG_DIR cp ${FLYS_DIR}/flys-backend/doc/annotation-types.xml $PKG_DIR/conf -ln -s /usr/lib64/libproj.so.0.6.6 $PKG_DIR/opt/lib64/libproj.so # workaround for bad packaging -rm -rf /tmp/other_rpms -mkdir /tmp/other_rpms -cd /tmp/other_rpms - -rpm2cpio ${EXTRAS}/libgdal1-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories -rpm2cpio ${EXTRAS}/gdal-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories -rpm2cpio ${EXTRAS}/python-gdal-1.9.0-intevation1.x86\_64.rpm | cpio -i --make-directories -rpm2cpio ${ORACLE}/cx\_Oracle-5.1.2-11g-py26-1.x86\_64.rpm | cpio -i --make-directories -cp -r /tmp/other_rpms/usr/* $PKG_DIR/opt -rm -rf /tmp/other_rpms +if [ -f $EXTRAS ]; + cd $PKG_DIR + tar -xzf $1 +fi cp ${FLYS_DIR}/flys-backend/doc/schema/*.sql $PKG_DIR/schema cp ${FLYS_DIR}/flys-backend/doc/documentation/de/importer-manual.pdf $PKG_DIR -# Oracle (Do not distribute) -unzip ${ORACLE}/instantclient-basic-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt -unzip ${ORACLE}/instantclient-sdk-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt -unzip ${ORACLE}/instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zip -d $PKG_DIR//opt - -mkdir $PKG_DIR//opt/instantclient_11_2/lib -cd $PKG_DIR//opt/instantclient_11_2/lib -ln -s ../libclntsh.so.11.1 . -ln -s ../libclntsh.so.11.1 libclntsh.so -ln -s ../libnnz11.so . -ln -s ../libocci.so.11.1 . -ln -s ../libocci.so.11.1 libocci.so -ln -s ../libociei.so . -ln -s ../libocijdbc11.so . -ln -s ../libsqlplusic.so . -ln -s ../libsqlplus.so . -# End Oracle - sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh cd $PKG_DIR/.. DATE=$(date +%Y%m%d%H%m) -tar -czf flys-importer${DATE}.tar.gz flys-importer -sha1sum flys-importer${DATE}.tar.gz > flys-importer${DATE}.tar.gz.sha1 +tar -czf flys-importer_${DATE}.tar.gz flys-importer +sha1sum flys-importer_${DATE}.tar.gz > flys-importer_${DATE}.tar.gz.sha1 +echo Package is at: `readlink -f flys-importer${DATE}.tar.gz`