|
| 1 | +version: 1 |
| 2 | + |
| 3 | +script: |
| 4 | +- | |
| 5 | + set -eu |
| 6 | +
|
| 7 | + if [ "{{APPIMAGE_SOURCE}}" != "${TARGET_APPDIR}" ]; then |
| 8 | + mv "{{APPIMAGE_SOURCE}}" "${TARGET_APPDIR}" |
| 9 | + fi |
| 10 | +
|
| 11 | + # Manual installation of squashfs-tools is required |
| 12 | + # until https://github.com/AppImageCrafters/build-appimage/issues/5 is fixed |
| 13 | + if ! command -v mksquashfs >/dev/null; then |
| 14 | + apt-get update && apt-get install -y --no-install-recommends squashfs-tools |
| 15 | + fi |
| 16 | +
|
| 17 | +AppDir: |
| 18 | + app_info: |
| 19 | + id: org.c0rn3j.sc-controller |
| 20 | + name: sc-controller |
| 21 | + version: "{{APPIMAGE_VERSION}}" |
| 22 | + icon: sc-controller |
| 23 | + exec: usr/bin/python3 |
| 24 | + 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']))" $@ |
| 25 | + |
| 26 | + after_bundle: | |
| 27 | + set -eu |
| 28 | +
|
| 29 | + # appimage-builder expects .desktop file to start with appinfo-id |
| 30 | + desktop="$(find "${TARGET_APPDIR}/usr" -name sc-controller.desktop)" |
| 31 | + sed -i "s:Exec=.*:Exec=./usr/bin/scc gui:g" "${desktop}" |
| 32 | + ln -sr "${desktop}" "${TARGET_APPDIR}/usr/share/applications/org.c0rn3j.sc-controller.desktop" |
| 33 | +
|
| 34 | + # appimage-builder expects utf-8 encoding when patching shebangs, |
| 35 | + # but pygettext3 has iso-8859-1 encoding |
| 36 | + find "${TARGET_APPDIR}/usr/bin" -name 'pygettext*' | while read -r file; do |
| 37 | + encoding="ISO-8859-1" |
| 38 | + if file -bi "${file}" | grep -iq "${encoding}"; then |
| 39 | + <"${file}" iconv -f "${encoding}" -t utf-8 -o "${file}" |
| 40 | + sed -i -E '1,2 s|^(\s*#.*coding[=:]\s*)([[:alnum:].-]+)|\1utf-8|g' "${file}" |
| 41 | + fi |
| 42 | + done |
| 43 | +
|
| 44 | + # install python3-vdf manually if not available as package |
| 45 | + if ! apt-cache search --names-only python3-vdf | grep -q .; then |
| 46 | + pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf |
| 47 | + fi |
| 48 | +
|
| 49 | + after_runtime: | |
| 50 | + set -eu |
| 51 | +
|
| 52 | + # python3 is linked against 'lib64/ld-linux-x86-64.so.2' |
| 53 | + # but 'compat/lib64' is missing for Ubuntu Noble |
| 54 | + compat="${TARGET_APPDIR}/runtime/compat" |
| 55 | + if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then |
| 56 | + ln -s "usr/lib64" "${compat}/" |
| 57 | + fi |
| 58 | +
|
| 59 | + apt: |
| 60 | + arch: |
| 61 | + - "{{APPIMAGE_APT_ARCH}}" |
| 62 | + sources: |
| 63 | + - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}} main |
| 64 | + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY}} |
| 65 | + - sourceline: deb http://deb.debian.org/debian {{APPIMAGE_APT_DISTRO}}-updates main |
| 66 | + - sourceline: deb http://deb.debian.org/debian-security/ {{APPIMAGE_APT_DISTRO}}-security main |
| 67 | + key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x{{APPIMAGE_APT_PUBKEY_SECURITY}} |
| 68 | + |
| 69 | + include: |
| 70 | + - gir1.2-gtk-3.0 |
| 71 | + - gir1.2-rsvg-2.0 |
| 72 | + - libbluetooth3 |
| 73 | + - libgtk-3-0 |
| 74 | + - librsvg2-common |
| 75 | + - libx11-6 |
| 76 | + - libxcb1 |
| 77 | + - libxext6 |
| 78 | + - libxfixes3 |
| 79 | + - python3-evdev |
| 80 | + - python3-gi-cairo |
| 81 | + - python3-pylibacl |
| 82 | + - binutils # required for detection of bluetooth library |
| 83 | + - coreutils # provides /usr/bin/env |
| 84 | + - shared-mime-info # required for gui if host provides no MIME info, e.g. when XDG_DATA_DIRS is missing |
| 85 | + |
| 86 | + exclude: |
| 87 | + # coreutils |
| 88 | + - libacl* # filesystem |
| 89 | + - libattr* # filesystem |
| 90 | + - libgmp* # arithmetics |
| 91 | + |
| 92 | + # gir1.2-rsvg-2.0 |
| 93 | + - libicu* # i18n |
| 94 | + - libstdc* # development |
| 95 | + - libxml* # codec |
| 96 | + |
| 97 | + # libgtk3-0 |
| 98 | + - "*-icon-theme" # gui |
| 99 | + - "*crypt*" # security |
| 100 | + - "*dconf*" # gui configuration |
| 101 | + - "*dbus*" # process communication |
| 102 | + - "*gcc*" # development |
| 103 | + - "*systemd*" # linux core |
| 104 | + - libblk* # filesystem |
| 105 | + - libcolord* # gui |
| 106 | + - libcups* # printing |
| 107 | + - libepoxy* # gui |
| 108 | + - libfontconfig* # fonts |
| 109 | + - libfreetype* # fonts |
| 110 | + - libfribidi* # i18n |
| 111 | + - libgtk-3-common # gui |
| 112 | + - liblz* # codec |
| 113 | + - libmount* # filesystem |
| 114 | + - libtiff* # codec |
| 115 | + - libwebp* # codec |
| 116 | + |
| 117 | + # python3 |
| 118 | + - "*krb*" # security |
| 119 | + - "*readline*" # terminal |
| 120 | + - "*sqlite*" # database |
| 121 | + - libbz* # codec |
| 122 | + - libdb* # database |
| 123 | + - libmpdec* # arithmetics |
| 124 | + - libncurses* # terminal |
| 125 | + - libnsl* # network |
| 126 | + - libssl* # security |
| 127 | + - libtirpc* # development |
| 128 | + - libuuid* # development |
| 129 | + - media-types # codec |
| 130 | + |
| 131 | + # Debian Trixie |
| 132 | + - libgprofng* # development |
| 133 | + - libjansson* # codec |
| 134 | + - libsframe* # development |
| 135 | + - libcloudproviders* # networking |
| 136 | + - netbase # network |
| 137 | + - tzdata # date/time |
| 138 | + |
| 139 | + # Debian Bullseye |
| 140 | + - glib-networking* # network |
| 141 | + - gsettings* # gui configuration |
| 142 | + - libidn2* # codec |
| 143 | + - libjson* # codec |
| 144 | + - libpsl* # networking |
| 145 | + - librest-* # networking |
| 146 | + - libsoup* # networking |
| 147 | + - libunistring* # unicode |
| 148 | + |
| 149 | + files: |
| 150 | + exclude: |
| 151 | + - usr/bin/*gold* # alternative for ld |
| 152 | + - usr/bin/*gp-display-html* # requires perl |
| 153 | + - usr/lib/*/gconv # unicode |
| 154 | + - usr/lib/*/gdk-pixbuf-2.0/*/loaders/libpixbufloader-??[!g].so # only png & svg are required |
| 155 | + - usr/lib/*/glib-2.0 |
| 156 | + - usr/lib/python*/cgi.py |
| 157 | + - usr/lib/python*/email |
| 158 | + - usr/lib/python*/test |
| 159 | + - usr/lib/python*/unittest |
| 160 | + - usr/share/doc |
| 161 | + - usr/share/glib-2.0 |
| 162 | + - usr/share/gtk-doc |
| 163 | + - usr/share/icu |
| 164 | + - usr/share/locale |
| 165 | + - usr/share/man |
| 166 | + - usr/share/python3/runtime.d |
| 167 | + - usr/share/thumbnailers |
| 168 | + |
| 169 | + runtime: |
| 170 | + env: |
| 171 | + # `usr/lib/python3.*/site-packages` is required in $PYTHONPATH, |
| 172 | + # but the python version and hence the actual location is unknown here. |
| 173 | + # Fortunately the site-packages directory is on the $PATH, so we add $PATH instead. |
| 174 | + # It must precede an existing $PYTHONPATH to work. |
| 175 | + PYTHONPATH: "${APPDIR}/usr/lib/python3/dist-packages:${PATH}:${PYTHONPATH}" |
| 176 | + SCC_SHARED: "${APPDIR}/usr/share/scc" |
| 177 | + |
| 178 | +AppImage: |
| 179 | + arch: "{{APPIMAGE_ARCH}}" |
| 180 | + update-information: "gh-releases-zsync|C0rn3j|sc-controller|latest|sc-controller-*-{{APPIMAGE_APT_DISTRO}}-{{APPIMAGE_ARCH}}.AppImage.zsync" |
0 commit comments