Mercurial > trustbridge
view packaging/linux-createpackage.sh.in @ 887:accda55ae053
Use make -j`nproc` everywhere instead of fixed number
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 08 Aug 2014 11:07:49 +0200 |
parents | 02e357826417 |
children | 4087e489f569 |
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") ICON="@CMAKE_SOURCE_DIR@/ui/img/logo.png" L10N_DE_FILE="@CMAKE_BINARY_DIR@/packaging/linux-installer.l10n-de" # 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 -d "$TMPDIR/share/pixmaps/trustbridge" install "${EXEFILES[@]}" "$TMPDIR/bin" install "$ICON" "$TMPDIR/share/pixmaps/trustbridge/trustbridge.png" echo "Creating shar archive ..." cd "$TMPDIR" shar -z -B bin/* share/pixmaps/trustbridge/trustbridge.png | 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 "s/###ICONNAME###/trustbridge.png/" "$INSTALLER" sed -i "/###SHAR###/r $TMPSHAR" "$INSTALLER" sed -i "/###L10N_DE###/r $L10N_DE_FILE" "$INSTALLER" chmod +x "$INSTALLER" echo "Cleaning up..." rm -r "$TMPDIR" rm "$TMPSHAR"