comparison packaging/linux-createpackage.sh.in @ 938:15f7b3ebf21b

(issue89) Add help packaging for Linux installer
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 22 Aug 2014 19:16:31 +0200
parents 419cf0560d45
children 8be2f510adbf
comparison
equal deleted inserted replaced
937:f6b52f60f643 938:15f7b3ebf21b
14 EXEFILES=("@CMAKE_BINARY_DIR@/cinst/cinst" 14 EXEFILES=("@CMAKE_BINARY_DIR@/cinst/cinst"
15 "@CMAKE_BINARY_DIR@/cinst/mozilla" 15 "@CMAKE_BINARY_DIR@/cinst/mozilla"
16 "@CMAKE_BINARY_DIR@/ui/trustbridge" 16 "@CMAKE_BINARY_DIR@/ui/trustbridge"
17 "@CMAKE_BINARY_DIR@/ui/trustbridge-tray-starter.sh") 17 "@CMAKE_BINARY_DIR@/ui/trustbridge-tray-starter.sh")
18 ICON="@CMAKE_SOURCE_DIR@/ui/img/logo-128.png" 18 ICON="@CMAKE_SOURCE_DIR@/ui/img/logo-128.png"
19 HELPFILES=$(find @CMAKE_BINARY_DIR@/manuals/help-manual/html \
20 -maxdepth 1 -type f -printf "%p \n")
21 HELPFILES_STATIC=$(find @CMAKE_BINARY_DIR@/manuals/help-manual/html/_static \
22 -maxdepth 1 -type f -printf "%p \n")
23 HELPFILES_IMG=$(find @CMAKE_BINARY_DIR@/manuals/help-manual/html/_images \
24 -maxdepth 1 -type f -printf "%p \n")
25 HELPFILES_SOURCES=$(find @CMAKE_BINARY_DIR@/manuals/help-manual/html/_sources \
26 -maxdepth 1 -type f -printf "%p \n")
19 27
20 L10N_DE_FILE="@CMAKE_BINARY_DIR@/packaging/linux-installer.l10n-de" 28 L10N_DE_FILE="@CMAKE_BINARY_DIR@/packaging/linux-installer.l10n-de"
21 29
22 # Make installation in TMPDIR, this is what we will put into the 30 # Make installation in TMPDIR, this is what we will put into the
23 # shar-archive. 31 # shar-archive.
24 echo "Using $TMPDIR for temporary installation to build installer..." 32 echo "Using $TMPDIR for temporary installation to build installer..."
25 install -d "$TMPDIR/bin" 33 install -d "$TMPDIR/bin"
26 install -d "$TMPDIR/share/pixmaps/trustbridge" 34 install -d "$TMPDIR/share/pixmaps/trustbridge"
35 install -d "$TMPDIR/share/doc/trustbridge"
36 install -d "$TMPDIR/share/doc/trustbridge/_static"
37 install -d "$TMPDIR/share/doc/trustbridge/_sources"
38 install -d "$TMPDIR/share/doc/trustbridge/_images"
27 install "${EXEFILES[@]}" "$TMPDIR/bin" 39 install "${EXEFILES[@]}" "$TMPDIR/bin"
28 install "$ICON" "$TMPDIR/share/pixmaps/trustbridge/trustbridge.png" 40 install "$ICON" "$TMPDIR/share/pixmaps/trustbridge/trustbridge.png"
29
30 echo "Creating shar archive ..."
31 cd "$TMPDIR"
32 shar -z -B bin/* share/pixmaps/trustbridge/trustbridge.png | sed 's/^exit 0//' >>"$TMPSHAR"
33 41
34 echo "Building $INSTALLER..." 42 echo "Building $INSTALLER..."
35 cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER" 43 cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER"
36 binnames="" 44 binnames=""
37 for file in "${EXEFILES[@]}" ; do 45 for file in "${EXEFILES[@]}" ; do
38 binnames="`basename $file` $binnames" 46 binnames="`basename $file` $binnames"
39 done 47 done
48 for file in ${HELPFILES} ; do
49 install "$file" "$TMPDIR/share/doc/trustbridge"
50 helpnames="`basename $file` $helpnames"
51 done
52 for file in ${HELPFILES_IMAGES} ; do
53 install "$file" "$TMPDIR/share/doc/trustbridge/_images"
54 helpnames_img="`basename $file` $helpnames_img"
55 done
56 for file in ${HELPFILES_STATIC} ; do
57 install "$file" "$TMPDIR/share/doc/trustbridge/_static"
58 helpnames_static="`basename $file` $helpnames_static"
59 done
60 for file in ${HELPFILES_SOURCES}; do
61 install "$file" "$TMPDIR/share/doc/trustbridge/_sources"
62 helpnames_sources="`basename $file` $helpnames_sources"
63 done
64
65 echo "Creating shar archive ..."
66 cd "$TMPDIR"
67 shar -z -B `find -type f` | sed 's/^exit 0//' >>"$TMPSHAR"
68
40 sed -i "s/###BINNAMES###/${binnames}/" "$INSTALLER" 69 sed -i "s/###BINNAMES###/${binnames}/" "$INSTALLER"
41 sed -i "s/###ICONNAME###/trustbridge.png/" "$INSTALLER" 70 sed -i "s/###ICONNAME###/trustbridge.png/" "$INSTALLER"
42 sed -i "/###SHAR###/r $TMPSHAR" "$INSTALLER" 71 sed -i "/###SHAR###/r $TMPSHAR" "$INSTALLER"
43 sed -i "/###L10N_DE###/r $L10N_DE_FILE" "$INSTALLER" 72 sed -i "/###L10N_DE###/r $L10N_DE_FILE" "$INSTALLER"
73 sed -i "s/###HELPNAMES###/${helpnames}/" "$INSTALLER"
74 sed -i "s/###HELPNAMES_SOURCES###/${helpnames_sources}/" "$INSTALLER"
75 sed -i "s/###HELPNAMES_STATIC###/${helpnames_static}/" "$INSTALLER"
76 sed -i "s/###HELPNAMES_IMG###/${helpnames_img}/" $INSTALLER
77
44 chmod +x "$INSTALLER" 78 chmod +x "$INSTALLER"
45 echo "Signing" 79 echo "Signing"
46 @CMAKE_SOURCE_DIR@/ui/tests/append-sig.sh @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.key \ 80 @CMAKE_SOURCE_DIR@/ui/tests/append-sig.sh @CMAKE_SOURCE_DIR@/ui/tests/data/codesign/codesigning.key \
47 $INSTALLER ${INSTALLER}_signed 81 $INSTALLER ${INSTALLER}_signed
48 mv ${INSTALLER}_signed $INSTALLER 82 mv ${INSTALLER}_signed $INSTALLER

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