File: linux-make-appimage.sh

package info (click to toggle)
trustedqsl 2.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 38,156 kB
  • sloc: cpp: 36,377; xml: 7,984; javascript: 6,989; ansic: 634; sh: 149; makefile: 19; python: 18
file content (52 lines) | stat: -rwxr-xr-x 1,747 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
#
# Make a Linux AppImage for tqsl
# 
# Derived from a build script from Pavel, CO7WT
#
# we will extract to a temp dir to make build id
TEMPDIR=`mktemp -d` || exit 1
HERE=$(pwd)
cd $TEMPDIR

# download & set all needed tools
if [ -z `which linuxdeploy-x86_64.AppImage` ] ; then 
    wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
    chmod a+x linuxdeploy-x86_64.AppImage
    sudo cp linuxdeploy-x86_64.AppImage /usr/local/bin
    rm linuxdeploy-x86_64.AppImage
fi
if [ -z `which linuxdeploy-plugin-appimage-x86_64.AppImage` ] ; then 
    wget -c -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage"
    chmod a+x linuxdeploy-plugin-appimage-x86_64.AppImage
    sudo cp linuxdeploy-plugin-appimage-x86_64.AppImage /usr/local/bin
    rm linuxdeploy-plugin-appimage-x86_64.AppImage
fi

# 
# Get the code
#
git clone https://git.code.sf.net/p/trustedqsl/tqsl
cd tqsl
export VERSION=`cat apps/tqslversion.ver|sed -e 's/\.0$//'`
echo "Building AppImage for TQSL $VERSION"

mkdir build && 
cd build &&
    cmake .. -DCMAKE_INSTALL_PREFIX=/usr &&
	make && \
	make install DESTDIR=../AppDir && \
	cd .. && \
	cp ./build/apps/tqsl AppDir/usr/bin/ && \
	cp ./apps/icons/key48.png AppDir/TrustedQSL.png && \
	cp ./apps/tqsl.desktop AppDir &&
	ln -s usr/bin/tqsl AppDir/AppRun &&
	sed -i s/"TrustedQSL.png"/"TrustedQSL"/ AppDir/tqsl.desktop && \
	linuxdeploy-x86_64.AppImage -e AppDir/usr/bin/tqsl \
		-d AppDir/tqsl.desktop \
		-i AppDir/TrustedQSL.png \
		--output appimage \
		--appdir AppDir && \
	cp TQSL-*.AppImage $HERE/tqsl-${VERSION}_x86_64.AppImage && \
	cd $HERE && \
	rm -rf $TEMPDIR