| 1 |
id: net.displaycal.DisplayCAL |
| 2 |
runtime: org.freedesktop.Platform |
| 3 |
runtime-version: "25.08" |
| 4 |
sdk: org.freedesktop.Sdk |
| 5 |
rename-desktop-file: displaycal.desktop |
| 6 |
rename-icon: displaycal |
| 7 |
copy-icon: true |
| 8 |
command: displaycal |
| 9 |
|
| 10 |
# Argyll CMS is not bundled here: DisplayCAL already offers to download and |
| 11 |
# install matching Argyll binaries into its per-user config dir on first run |
| 12 |
# (see DisplayCAL/worker.py process_argyll_download), so `--share=network` |
| 13 |
# and a writable config dir (both granted by default under the app's own |
| 14 |
# `~/.var/app/net.displaycal.DisplayCAL` home) are enough to get there. |
| 15 |
finish-args: |
| 16 |
- --share=ipc |
| 17 |
- --share=network |
| 18 |
# X11 is required even under Wayland, not just as a fallback. |
| 19 |
- --socket=x11 |
| 20 |
- --socket=wayland |
| 21 |
- --device=all |
| 22 |
- --system-talk-name=org.freedesktop.ColorManager |
| 23 |
- --talk-name=org.freedesktop.PowerManagement |
| 24 |
- --talk-name=org.freedesktop.ScreenSaver |
| 25 |
- --talk-name=org.gnome.Mutter.DisplayConfig |
| 26 |
- --talk-name=org.gnome.SessionManager |
| 27 |
- --talk-name=org.gnome.SettingsDaemon.Power |
| 28 |
|
| 29 |
cleanup: |
| 30 |
- /share/man |
| 31 |
|
| 32 |
modules: |
| 33 |
- name: libjpeg8 |
| 34 |
sources: |
| 35 |
- type: file |
| 36 |
url: http://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb |
| 37 |
sha256: bb9538fa94f06bf6b7907105439f0a0a30e3ec27030832820a6c2cc2dc6578a8 |
| 38 |
buildsystem: simple |
| 39 |
build-commands: |
| 40 |
- | |
| 41 |
ar -x libjpeg-turbo8_2.1.2-0ubuntu1_amd64.deb |
| 42 |
tar -xf data.tar.* |
| 43 |
install -D usr/lib/x86_64-linux-gnu/libjpeg.so.8.2.2 /app/lib/libjpeg.so.8 |
| 44 |
|
| 45 |
- name: libtiff5 |
| 46 |
sources: |
| 47 |
- type: file |
| 48 |
url: http://archive.ubuntu.com/ubuntu/pool/main/t/tiff/libtiff5_4.3.0-6ubuntu0.13_amd64.deb |
| 49 |
sha256: 298a778a6a579a556f6bb4e32512cd76e0483b57b4a379ee85397f62fe21f225 |
| 50 |
buildsystem: simple |
| 51 |
build-commands: |
| 52 |
- | |
| 53 |
ar -x libtiff5_4.3.0-6ubuntu0.13_amd64.deb |
| 54 |
tar -xf data.tar.* |
| 55 |
install -D usr/lib/x86_64-linux-gnu/libtiff.so.5.7.0 /app/lib/libtiff.so.5 |
| 56 |
|
| 57 |
- name: libjbig0 |
| 58 |
sources: |
| 59 |
- type: file |
| 60 |
url: http://archive.ubuntu.com/ubuntu/pool/main/j/jbigkit/libjbig0_2.1-3.1ubuntu0.22.04.1_amd64.deb |
| 61 |
sha256: 4666c37d8620b6d17a2d4acf2cb1459f071e74881dc490a159e90244d7a98cc6 |
| 62 |
buildsystem: simple |
| 63 |
build-commands: |
| 64 |
- | |
| 65 |
ar -x libjbig0_2.1-3.1ubuntu0.22.04.1_amd64.deb |
| 66 |
tar -xf data.tar.* |
| 67 |
install -D usr/lib/x86_64-linux-gnu/libjbig.so.0 /app/lib/libjbig.so.0 |
| 68 |
|
| 69 |
# libtiff5 4.3.0 links against libdeflate for its DEFLATE compression |
| 70 |
# codec, which the freedesktop runtime doesn't ship, so wxPython fails to |
| 71 |
# import with "libdeflate.so.0: cannot open shared object file" otherwise. |
| 72 |
- name: libdeflate0 |
| 73 |
sources: |
| 74 |
- type: file |
| 75 |
url: http://archive.ubuntu.com/ubuntu/pool/main/libd/libdeflate/libdeflate0_1.10-2_amd64.deb |
| 76 |
sha256: a64f7f93a487e57e1a01404d378a8ef1428b1c6b0ecf24fc484c89b681a051c9 |
| 77 |
buildsystem: simple |
| 78 |
build-commands: |
| 79 |
- | |
| 80 |
ar -x libdeflate0_1.10-2_amd64.deb |
| 81 |
tar -xf data.tar.* |
| 82 |
install -D usr/lib/x86_64-linux-gnu/libdeflate.so.0 /app/lib/libdeflate.so.0 |
| 83 |
|
| 84 |
- name: python-wxPython |
| 85 |
buildsystem: simple |
| 86 |
build-options: |
| 87 |
build-args: |
| 88 |
- --share=network |
| 89 |
build-commands: |
| 90 |
# wxPython has no PyPI wheel for Linux, so a plain `pip install |
| 91 |
# wxPython` builds it from source, which is what made this module the |
| 92 |
# slowest part of the build by far (and outright fails on Python 3.13, |
| 93 |
# which is what org.freedesktop.Sdk 25.08 ships: wxPython 4.2.2's |
| 94 |
# bundled build.py monkey-patches distutils.copy_file() with a |
| 95 |
# signature that no longer matches modern setuptools). Point pip at |
| 96 |
# the same extras.wxpython.org index our pytest.yml CI uses instead, |
| 97 |
# letting it resolve the newest compatible version rather than pinning |
| 98 |
# one by hand. It's built against Ubuntu 22.04's GTK3/WebKit2GTK, not |
| 99 |
# the SDK's own, so if the resulting wxPython fails to import at |
| 100 |
# runtime, that ABI mismatch is the first thing to suspect and this |
| 101 |
# module should fall back to building from source. |
| 102 |
- pip3 install --prefix=/app --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/ wxPython |
| 103 |
|
| 104 |
- name: python-dbus |
| 105 |
buildsystem: simple |
| 106 |
build-options: |
| 107 |
build-args: |
| 108 |
- --share=network |
| 109 |
build-commands: |
| 110 |
- pip3 install --prefix=/app dbus-python |
| 111 |
|
| 112 |
- name: displaycal |
| 113 |
buildsystem: simple |
| 114 |
build-options: |
| 115 |
build-args: |
| 116 |
- --share=network |
| 117 |
build-commands: |
| 118 |
- pip3 install --prefix=/app -r requirements.txt |
| 119 |
# A direct `pip install .` invokes setup.py's bdist_wheel path only, but |
| 120 |
# setup.py's data_files logic (DisplayCAL/setup.py's doc/copyright/ |
| 121 |
# appdata entries) is only populated as a side effect of the `sdist` |
| 122 |
# command (see setup.py's `buildservice`/`create_appdata` flags), which |
| 123 |
# bdist_wheel alone never triggers. `python -m build`'s default |
| 124 |
# (sdist-then-wheel-from-sdist) two-phase build is what actually |
| 125 |
# generates and bundles dist/copyright and the appdata.xml first, same |
| 126 |
# as `uv build` does for the other CI jobs. |
| 127 |
- python3 -m build --no-isolation --outdir dist . |
| 128 |
- pip3 install --prefix=/app --no-build-isolation dist/displaycal-*.whl |
| 129 |
# displaycal-apply-profiles has no pip console-script entry point (it's |
| 130 |
# dispatched via argv[0] sniffing in DisplayCAL/main.py, wired up only |
| 131 |
# by the legacy setup.py packaging path), so it's skipped here rather |
| 132 |
# than shipping a desktop entry with a dangling Exec=. Likewise, |
| 133 |
# eeColor-to-madVR-converter has no misc/*.desktop file at all (setup.py |
| 134 |
# excludes it the same way, see its Zeroinstall entry-point generation), |
| 135 |
# so there's nothing under /app/share/applications to rename for it. |
| 136 |
- >- |
| 137 |
for pair in |
| 138 |
displaycal-vrml-to-x3d-converter:vrml-to-x3d-converter |
| 139 |
displaycal-synthprofile:synthprofile |
| 140 |
displaycal-profile-info:profile-info |
| 141 |
displaycal-curve-viewer:curve-viewer |
| 142 |
displaycal-scripting-client:scripting-client |
| 143 |
displaycal-testchart-editor:testchart-editor |
| 144 |
displaycal-3dlut-maker:3dlut-maker |
| 145 |
; |
| 146 |
do |
| 147 |
source="${pair%%:*}"; |
| 148 |
dest="${pair##*:}"; |
| 149 |
mv "/app/share/applications/${source}.desktop" "/app/share/applications/net.displaycal.DisplayCAL.${dest}.desktop"; |
| 150 |
for s in 16 22 24 32 48 64 128 256 512; do |
| 151 |
icon="/app/share/icons/hicolor/${s}x${s}/apps/${source}.png"; |
| 152 |
[ -f "${icon}" ] || continue; |
| 153 |
cp "${icon}" "/app/share/icons/hicolor/${s}x${s}/apps/net.displaycal.DisplayCAL.${dest}.png"; |
| 154 |
done; |
| 155 |
desktop-file-edit --set-icon="net.displaycal.DisplayCAL.${dest}" "/app/share/applications/net.displaycal.DisplayCAL.${dest}.desktop"; |
| 156 |
done |
| 157 |
# Install the generated copy, not misc/net.displaycal.DisplayCAL.appdata.xml: |
| 158 |
# the latter is the raw ${...} template, its placeholders (including |
| 159 |
# <id>) are only substituted into dist/ by the `python3 -m build` step |
| 160 |
# above. |
| 161 |
- install -Dm644 dist/net.displaycal.DisplayCAL.appdata.xml /app/share/metainfo/net.displaycal.DisplayCAL.appdata.xml |
| 162 |
sources: |
| 163 |
- type: dir |
| 164 |
path: ../.. |
| 165 |
skip: |
| 166 |
- .git |
| 167 |
- .venv |
| 168 |
- dist |
| 169 |
- build |