From 0b8ef53cdd165796b482fc14aed86a266c6dbd9c Mon Sep 17 00:00:00 2001 From: Ivan Mazhukin Date: Tue, 26 May 2026 18:27:08 +0300 Subject: [PATCH] ci: build Debian package --- .gitea/workflows/build-nightlly.yml | 34 +++++++++++++- .gitea/workflows/build.yml | 32 ++++++++++++- .gitea/workflows/code-build.yml | 43 +++++++++++++++++- .gitignore | 1 + debian/changelog | 5 +++ debian/clean | 1 + debian/control | 69 +++++++++++++++++++++++++++++ debian/copyright | 20 +++++++++ debian/portprotonqt.install | 14 ++++++ debian/rules | 21 +++++++++ debian/source/format | 1 + 11 files changed, 238 insertions(+), 3 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/clean create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/portprotonqt.install create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/.gitea/workflows/build-nightlly.yml b/.gitea/workflows/build-nightlly.yml index e2ce9970..5ca69c0d 100644 --- a/.gitea/workflows/build-nightlly.yml +++ b/.gitea/workflows/build-nightlly.yml @@ -1,4 +1,4 @@ -name: Nightly Build - AppImage, Arch, Fedora +name: Nightly Build - AppImage, Arch, Fedora, Debian on: workflow_dispatch: @@ -140,3 +140,35 @@ jobs: with: name: PortProtonQt-Arch path: ${{ env.PKGDEST }}/* + + build-debian: + name: Build Debian Package + runs-on: ubuntu-latest + container: + image: debian:13 + options: --privileged + + steps: + - name: Install build dependencies + run: | + apt-get update + apt-get install -y build-essential debhelper dpkg-dev gettext git \ + libvulkan-dev meson ninja-build nodejs npm \ + pkgconf python3 + + - name: Checkout + uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + ref: ${{ env.BUILD_BRANCH }} + + - name: Build Debian package + run: | + dpkg-buildpackage -us -uc -b + mkdir -p dist/deb + mv ../*.deb ../*.buildinfo ../*.changes dist/deb/ + + - name: Upload Debian package + uses: https://gitea.com/actions/gitea-upload-artifact@v4 + with: + name: PortProtonQt-DEB-Debian-13 + path: dist/deb/* diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 8650d07c..aec1485f 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build AppImage, Arch and Fedora Packages +name: Build AppImage, Arch, Fedora and Debian Packages on: workflow_dispatch: @@ -138,6 +138,36 @@ jobs: name: PortProtonQt-RPM-Fedora-${{ matrix.fedora_version }} path: /home/rpmbuild/RPMS/**/*.rpm + build-debian: + name: Build Debian Package + runs-on: ubuntu-latest + container: + image: debian:13 + options: --privileged + + steps: + - name: Install build dependencies + run: | + apt-get update + apt-get install -y build-essential debhelper dpkg-dev gettext git \ + libvulkan-dev meson ninja-build nodejs npm \ + pkgconf python3 + + - name: Checkout + uses: https://gitea.com/actions/checkout@v4 + + - name: Build Debian package + run: | + dpkg-buildpackage -us -uc -b + mkdir -p dist/deb + mv ../*.deb ../*.buildinfo ../*.changes dist/deb/ + + - name: Upload Debian package + uses: https://gitea.com/actions/gitea-upload-artifact@v4 + with: + name: PortProtonQt-DEB-Debian-13 + path: dist/deb/* + release: name: Create and Publish Release runs-on: ubuntu-latest diff --git a/.gitea/workflows/code-build.yml b/.gitea/workflows/code-build.yml index d5a83292..ce156fe2 100644 --- a/.gitea/workflows/code-build.yml +++ b/.gitea/workflows/code-build.yml @@ -1,4 +1,4 @@ -name: Build Check - AppImage, Arch, Fedora +name: Build Check - AppImage, Arch, Fedora, Debian on: workflow_dispatch: @@ -7,6 +7,7 @@ on: - 'build-aux/AppImage/**' - 'build-aux/fedora-git.spec' - 'build-aux/PKGBUILD-git' + - 'debian/**' - '.gitea/workflows/code-build.yml' env: @@ -22,6 +23,7 @@ jobs: appimage: ${{ steps.check.outputs.appimage }} fedora: ${{ steps.check.outputs.fedora }} arch: ${{ steps.check.outputs.arch }} + debian: ${{ steps.check.outputs.debian }} steps: - uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: @@ -62,6 +64,13 @@ jobs: echo "arch=false" >> $GITHUB_OUTPUT fi + # Check Debian packaging files + if grep -q "debian/" changed_files.txt; then + echo "debian=true" >> $GITHUB_OUTPUT + else + echo "debian=false" >> $GITHUB_OUTPUT + fi + build-appimage: name: Build AppImage runs-on: ubuntu-22.04 @@ -193,3 +202,35 @@ jobs: with: name: PortProtonQt-Arch path: ${{ env.PKGDEST }}/* + + build-debian: + name: Build Debian Package + runs-on: ubuntu-latest + needs: changes + if: needs.changes.outputs.debian == 'true' || github.event_name == 'workflow_dispatch' + container: + image: debian:13 + options: --privileged + + steps: + - name: Install build dependencies + run: | + apt-get update + apt-get install -y build-essential debhelper dpkg-dev gettext git \ + libvulkan-dev meson ninja-build nodejs npm \ + pkgconf python3 + + - name: Checkout + uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + + - name: Build Debian package + run: | + dpkg-buildpackage -us -uc -b + mkdir -p dist/deb + mv ../*.deb ../*.buildinfo ../*.changes dist/deb/ + + - name: Upload Debian package + uses: https://gitea.com/actions/gitea-upload-artifact@v4 + with: + name: PortProtonQt-DEB-Debian-13 + path: dist/deb/* diff --git a/.gitignore b/.gitignore index 8ecf92fe..68e31d7e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ wheels/ # Meson builddir/ +build-deb/ # Virtual environments .venv diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..06e5b0ea --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +portprotonqt (1.0) unstable; urgency=medium + + * Add Debian packaging. + + -- Ivan Mazhukin Sat, 23 May 2026 13:32:57 +0300 diff --git a/debian/clean b/debian/clean new file mode 100644 index 00000000..cdbb5ca1 --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +completions/ diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..361ba670 --- /dev/null +++ b/debian/control @@ -0,0 +1,69 @@ +Source: portprotonqt +Section: utils +Priority: optional +Maintainer: Ivan Mazhukin +Build-Depends: + debhelper-compat (= 13), + gettext, + libvulkan-dev, + meson, + ninja-build, + pkgconf, + python3, +Standards-Version: 4.7.0 +Homepage: https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt +Rules-Requires-Root: no + +Package: portprotonqt +Architecture: linux-any +Depends: + 7zip, + cabextract, + curl, + file, + gawk, + jq, + libimage-exiftool-perl, + mesa-utils, + pciutils, + procps, + psmisc, + python3, + python3-babel, + python3-dbus-fast, + python3-evdev, + python3-libarchive-c, + python3-orjson, + python3-pefile, + python3-pil, + python3-psutil, + python3-pygame, + python3-pyside6.qtcore, + python3-pyside6.qtgui, + python3-pyside6.qtnetwork, + python3-pyside6.qtsvg, + python3-pyside6.qtwidgets, + python3-qrcode, + python3-rapidfuzz, + python3-requests, + python3-tqdm, + python3-vdf, + python3-websocket, + qt6-image-formats-plugins, + qt6-svg-plugins, + unrar-free, + unzip, + xz-utils, + zstd, + ${misc:Depends}, + ${shlibs:Depends}, +Recommends: + bluez, + network-manager, + pulseaudio-utils, + squashfs-tools, + udisks2, + upower, +Description: GUI for managing PortProton and Steam games + PortProtonQt provides a graphical interface for managing and launching + games from PortProton and Steam. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..5142d332 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,20 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: PortProtonQt +Source: https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt + +Files: * +Copyright: + 2026 PortProtonQt contributors +License: GPL-3.0 + +Files: debian/* +Copyright: + 2026 PortProtonQt contributors +License: GPL-3.0 + +License: GPL-3.0 + This package is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3. + . + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in /usr/share/common-licenses/GPL-3. diff --git a/debian/portprotonqt.install b/debian/portprotonqt.install new file mode 100644 index 00000000..137259fe --- /dev/null +++ b/debian/portprotonqt.install @@ -0,0 +1,14 @@ +usr/bin/portprotonqt +usr/bin/vk_gpu_info +usr/lib/python3/dist-packages/portprotonqt/ +usr/lib/udev/rules.d/60-portprotonqt.rules +usr/share/applications/ru.linux_gaming.PortProtonQt.desktop +usr/share/bash-completion/completions/portprotonqt +usr/share/fish/vendor_completions.d/portprotonqt.fish +usr/share/icons/hicolor/scalable/apps/ru.linux_gaming.PortProtonQt.svg +usr/share/locale/ +usr/share/metainfo/ru.linux_gaming.PortProtonQt.metainfo.xml +usr/share/mime/packages/ru.linux_gaming.PortProtonQt.xml +usr/share/polkit-1/rules.d/ru.linux_gaming.PortProtonQt.rules +usr/share/portproton/ +usr/share/zsh/site-functions/_portprotonqt diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..de9ef972 --- /dev/null +++ b/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +%: + dh $@ --buildsystem=meson + +override_dh_auto_configure: + dh_auto_configure -- \ + -Dpython_purelibdir=/usr/lib/python3/dist-packages \ + -Dudev_rulesdir=/usr/lib/udev/rules.d + +override_dh_auto_install: + dh_auto_install --destdir=debian/tmp + +execute_after_dh_auto_install: + bash ./dev-scripts/generate-completions.sh + install -Dpm 0644 completions/portprotonqt \ + debian/tmp/usr/share/bash-completion/completions/portprotonqt + install -Dpm 0644 completions/_portprotonqt \ + debian/tmp/usr/share/zsh/site-functions/_portprotonqt + install -Dpm 0644 completions/portprotonqt.fish \ + debian/tmp/usr/share/fish/vendor_completions.d/portprotonqt.fish diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..89ae9db8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- 2.54.0