view packaging/linux-createpackage.sh.in @ 754:27043d74dc90

(Issue25) Align header contents in their own column. We now also stretch column 3 so that the contents are aligned with the descriptive labels without a space in between. Sadly this causes the quit button to be resized to it's minimum instead of sharing the space with the installation button as the installation button is so large that it squeezes the push button.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 07 Jul 2014 12:38:33 +0200
parents ea8d13590cbd
children 3a9b0c75f5a6
line wrap: on
line source
#!/bin/bash
# Copyright (C) 2014 by Bundesamt f�r Sicherheit in der Informationstechnik
# Software engineering by Intevation GmbH
#
# This file is Free Software under the GNU GPL (v>=2)
# and comes with ABSOLUTELY NO WARRANTY!
# See LICENSE.txt for details.

TMPDIR=$(mktemp -d)
TMPSHAR=$(mktemp "@CMAKE_BINARY_DIR@/shar.XXXXXXXXXX")

INSTALLER="@CMAKE_BINARY_DIR@/TrustBridge-@PROJECT_VERSION@.sh"

EXEFILES=("@CMAKE_BINARY_DIR@/cinst/cinst"
          "@CMAKE_BINARY_DIR@/cinst/mozilla"
          "@CMAKE_BINARY_DIR@/ui/trustbridge"
          "@CMAKE_BINARY_DIR@/ui/trustbridge-tray-starter.sh")

# Make installation in TMPDIR, this is what we will put into the
# shar-archive.
echo "Using $TMPDIR for temporary installation to build installer..."
install -d "$TMPDIR/bin"
install "${EXEFILES[@]}" "$TMPDIR/bin"

echo "Creating shar archive ..."
cd "$TMPDIR"
shar -z -B bin/* | sed 's/^exit 0//' >>"$TMPSHAR"

echo "Building $INSTALLER..."
cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER"
binnames=""
for file in "${EXEFILES[@]}" ; do
  binnames="`basename $file` $binnames"
done
sed -i "s/###BINNAMES###/${binnames}/" "$INSTALLER"
sed -i "/###SHAR###/r $TMPSHAR" "$INSTALLER"
chmod +x "$INSTALLER"

echo "Cleaning up..."
rm -r "$TMPDIR"
rm  "$TMPSHAR"

http://wald.intevation.org/projects/trustbridge/