comparison packaging/linux-createpackage.sh.in @ 1249:014586ef8a84

(issue68) Package licenses
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 25 Sep 2014 12:43:56 +0200
parents 3de099c8129e
children e7a8ec3185f2
comparison
equal deleted inserted replaced
1248:9f5893faa60b 1249:014586ef8a84
54 -maxdepth 1 -type f -printf "%p \n") 54 -maxdepth 1 -type f -printf "%p \n")
55 HELPFILES_IMG=$(find @CMAKE_BINARY_DIR@/doc/help/client/html/_images \ 55 HELPFILES_IMG=$(find @CMAKE_BINARY_DIR@/doc/help/client/html/_images \
56 -maxdepth 1 -type f -printf "%p \n") 56 -maxdepth 1 -type f -printf "%p \n")
57 HELPFILES_SOURCES=$(find @CMAKE_BINARY_DIR@/doc/help/client/html/_sources \ 57 HELPFILES_SOURCES=$(find @CMAKE_BINARY_DIR@/doc/help/client/html/_sources \
58 -maxdepth 1 -type f -printf "%p \n") 58 -maxdepth 1 -type f -printf "%p \n")
59 LICENSES=$(find @CMAKE_SOURCE_DIR@/licenses \
60 -maxdepth 1 -type f -printf "%p \n")
59 61
60 # Make installation in TMPDIR, this is what we will put into the 62 # Make installation in TMPDIR, this is what we will put into the
61 # shar-archive. 63 # shar-archive.
62 echo "Using $TMPDIR for temporary installation to build installer..." 64 echo "Using $TMPDIR for temporary installation to build installer..."
63 install -d "$TMPDIR/bin" 65 install -d "$TMPDIR/bin"
64 install -d "$TMPDIR/share/pixmaps/trustbridge" 66 install -d "$TMPDIR/share/pixmaps/trustbridge"
65 install -d "$TMPDIR/share/doc/trustbridge" 67 install -d "$TMPDIR/share/doc/trustbridge"
66 install -d "$TMPDIR/share/doc/trustbridge/_static" 68 install -d "$TMPDIR/share/doc/trustbridge/_static"
67 install -d "$TMPDIR/share/doc/trustbridge/_sources" 69 install -d "$TMPDIR/share/doc/trustbridge/_sources"
68 install -d "$TMPDIR/share/doc/trustbridge/_images" 70 install -d "$TMPDIR/share/doc/trustbridge/_images"
71 install -d "$TMPDIR/share/doc/trustbridge/licenses"
69 install "${EXEFILES[@]}" "$TMPDIR/bin" 72 install "${EXEFILES[@]}" "$TMPDIR/bin"
70 install "$ICON" "$TMPDIR/share/pixmaps/trustbridge/trustbridge.png" 73 install "$ICON" "$TMPDIR/share/pixmaps/trustbridge/trustbridge.png"
71 74
72 binnames="" 75 binnames=""
73 for file in "${EXEFILES[@]}" ; do 76 for file in "${EXEFILES[@]}" ; do
87 done 90 done
88 for file in ${HELPFILES_SOURCES}; do 91 for file in ${HELPFILES_SOURCES}; do
89 install "$file" "$TMPDIR/share/doc/trustbridge/_sources" 92 install "$file" "$TMPDIR/share/doc/trustbridge/_sources"
90 helpnames_sources="`basename $file` $helpnames_sources" 93 helpnames_sources="`basename $file` $helpnames_sources"
91 done 94 done
95 for file in ${LICENSES}; do
96 install "$file" "$TMPDIR/share/doc/trustbridge/licenses"
97 licensenames="`basename $file` $licensenames"
98 done
92 99
93 echo "Building $INSTALLER and $UNINSTALLER ..." 100 echo "Building $INSTALLER and $UNINSTALLER ..."
94 101
95 cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER" 102 cp "@CMAKE_BINARY_DIR@/packaging/linux-installer.inc" "$INSTALLER"
96 cp "@CMAKE_BINARY_DIR@/packaging/linux-uninstaller.inc" "$UNINSTALLER" 103 cp "@CMAKE_BINARY_DIR@/packaging/linux-uninstaller.inc" "$UNINSTALLER"
105 sed -i "s/###HELPNAMES###/${helpnames}/" "$script" 112 sed -i "s/###HELPNAMES###/${helpnames}/" "$script"
106 sed -i "s/###HELPNAMES_SOURCES###/${helpnames_sources}/" "$script" 113 sed -i "s/###HELPNAMES_SOURCES###/${helpnames_sources}/" "$script"
107 sed -i "s/###HELPNAMES_STATIC###/${helpnames_static}/" "$script" 114 sed -i "s/###HELPNAMES_STATIC###/${helpnames_static}/" "$script"
108 sed -i "s/###HELPNAMES_IMG###/${helpnames_img}/" "$script" 115 sed -i "s/###HELPNAMES_IMG###/${helpnames_img}/" "$script"
109 sed -i "s/###ARCH###/${ARCH}/" "$script" 116 sed -i "s/###ARCH###/${ARCH}/" "$script"
117 sed -i "s/###LICENSES###/${licensenames}/" "$script"
110 chmod +x "$script" 118 chmod +x "$script"
111 done 119 done
112 120
113 echo "Creating shar archive ..." 121 echo "Creating shar archive ..."
114 cd "$TMPDIR" 122 cd "$TMPDIR"

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