This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
forked from kozec/sc-controller
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathAppImageBuilder.yml
131 lines (120 loc) · 5.06 KB
/
AppImageBuilder.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: 1
script:
- |
if [ "{{APPIMAGE_SOURCE}}" != "${TARGET_APPDIR}" ]; then
mv "{{APPIMAGE_SOURCE}}" "${TARGET_APPDIR}"
fi
# Manual installation of squashfs-tools is required
# until https://github.com/AppImageCrafters/build-appimage/issues/5 is fixed
if ! command -v mksquashfs >/dev/null; then
apt-get update && apt-get install -y --no-install-recommends squashfs-tools
fi
AppDir:
app_info:
id: org.ryochan7.sc-controller
name: sc-controller
version: "{{APPIMAGE_VERSION}}"
icon: sc-controller
exec: usr/bin/python3
exec_args: -c "import os, sys; os.execvp('$APPDIR/usr/bin/scc', ['$APPDIR/usr/bin/scc'] + (sys.argv[1:] if len(sys.argv) > 1 else ['gui']))" $@
after_bundle: |
set -eu
# appimage-builder expects .desktop file to start with appinfo-id
desktop="$(find "${TARGET_APPDIR}/usr" -name sc-controller.desktop)"
sed -i "s:Exec=.*:Exec=./usr/bin/scc gui:g" "${desktop}"
ln -sr "${desktop}" "${TARGET_APPDIR}/usr/share/applications/org.ryochan7.sc-controller.desktop"
# appimage-builder expects utf-8 encoding when patching shebangs,
# but pygettext3 has iso-8859-1 encoding
find "${TARGET_APPDIR}/usr/bin" -name 'pygettext*' | while read -r file; do
encoding="ISO-8859-1"
if file -bi "${file}" | grep -iq "${encoding}"; then
<"${file}" iconv -f "${encoding}" -t utf-8 -o "${file}"
sed -i -E '1,2 s|^(\s*#.*coding[=:]\s*)([[:alnum:].-]+)|\1utf-8|g' "${file}"
fi
done
apt:
arch:
- "{{APPIMAGE_APT_ARCH}}"
sources:
- sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}} main universe
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}}
- sourceline: deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}}-updates main universe
- sourceline: deb [arch=amd64] http://security.ubuntu.com/ubuntu/ {{APPIMAGE_APT_DISTRO}}-security main universe
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}} main universe
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}}-updates main universe
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ {{APPIMAGE_APT_DISTRO}}-security main universe
include:
- gir1.2-rsvg-2.0
- libbluetooth3
- librsvg2-common
- python3-evdev
- python3-gi-cairo
- python3-pylibacl
- python3-vdf
- binutils # required for detection of bluetooth library
- coreutils # provides /usr/bin/env
- shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing
exclude:
- gcc* # development
- libgcc* # development
- libstdc* # development
- libtirpc* # development
- libuuid* # development
- libattr* # filesystem
- libblkid* # filesystem
- libmount* # filesystem
- libbz* # codec
- libjpeg* # codec
- liblzma* # codec
- libtiff* # codec
- libxml* # codec
- libwebp* # codec
- media-types # codec
- libpixman* # X
- libxext* # X
- libxrender* # X
- libfontconfig* # fonts
- libfreetype* # fonts
- libfribidi* # i18n
- libicu* # i18n
- libgmp* # arithmetics
- libmpdec* # arithmetics
- libncurses* # terminal
- libreadline* # terminal
- readline* # terminal
- libssl* # security
- "*crypt*" # security
- "*krb*" # security
- libdb* # database
- "*sqlite*" # database
- libnsl* # network
files:
exclude:
- usr/bin/*gold* # alternative for ld
- usr/bin/*gp-display-html* # since Ubuntu Lunatic, requires perl
- usr/lib/*/gconv # unicode
- usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-[!s]*.so # only svg is required
- usr/lib/*/glib-2.0
- usr/lib/python*/cgi.py
- usr/lib/python*/email
- usr/lib/python*/test
- usr/lib/python*/unittest
- usr/share/doc
- usr/share/glib-2.0
- usr/share/gtk-doc
- usr/share/icu
- usr/share/locale
- usr/share/man
- usr/share/python3/runtime.d
- usr/share/thumbnailers
runtime:
env:
# `usr/lib/python3.*/site-packages` is required in $PYTHONPATH,
# but the python version and hence the actual location is unknown here.
# Fortunately the site-packages directory is on the $PATH, so we add $PATH instead.
# It must precede an existing $PYTHONPATH to work.
PYTHONPATH: "${APPDIR}/usr/lib/python3/dist-packages:${PATH}:${PYTHONPATH}"
SCC_SHARED: "${APPDIR}/usr/share/scc"
AppImage:
arch: "{{APPIMAGE_ARCH}}"
update-information: "gh-releases-zsync|Ryochan7|sc-controller|latest|sc-controller-*-{{APPIMAGE_APT_DISTRO}}-{{APPIMAGE_ARCH}}.AppImage.zsync"