diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 6bde8cf5..00dcdcc7 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -274,10 +274,71 @@ jobs: chmod +x ovr-platform-util ./ovr-platform-util upload-quest-build --app-id 7959676140827574 --token $OCULUS_TOKEN --apk apk/WiVRn-standard-oculus.apk --channel ALPHA --age-group TEENS_AND_ADULTS --draft --debug_symbols_dir debug/ --debug-symbols-pattern '*.so' + build-ubuntu: + name: Build Ubuntu package + strategy: + fail-fast: false + matrix: + distro: ['ubuntu-24.04'] + runs-on: ${{ matrix.distro }} + steps: + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: wivrn + + - name: Download monado + run: | + MONADO_COMMIT=$(grep -zo "FetchContent_Declare(monado[^)]*)" wivrn/CMakeLists.txt | sed -ze "s/^.*GIT_TAG *\([^ )]*\).*$/\1/" | tr -d '\0') + wget https://gitlab.freedesktop.org/monado/monado/-/archive/$MONADO_COMMIT/monado-$MONADO_COMMIT.tar.gz + + mkdir wivrn/monado-src + tar xzf monado-*.tar.gz --strip-components=1 -C wivrn/monado-src + + - name: Patch monado + working-directory: wivrn/monado-src + run: ../patches/apply.sh ../patches/monado + + - name: Edit changelog + if: ${{ ! startsWith(github.ref, 'refs/tags/') }} + working-directory: wivrn/debian + run: | + mv changelog changelog.orig + echo "wivrn ("$(git describe --tags | sed s/^v//)") "$(lsb_release -c -s)"; urgency=medium" > changelog + echo "" >> changelog + echo " * Nightly build" >> changelog + echo "" >> changelog + echo " -- github-actions <41898282+github-actions@users.noreply.github.com> "$(date -R) >> changelog + echo "" >> changelog + cat changelog.orig |sed s/unstable/$(lsb_release -c -s)/ >> changelog + cat changelog + + - name: Install dependencies + run: | + sudo apt update + sudo apt install libcjson-dev libx264-dev libavcodec-dev libavutil-dev libswscale-dev libavfilter-dev libbsd-dev libavahi-client-dev libavahi-glib-dev libeigen3-dev glslang-tools libudev-dev libwayland-dev libx11-xcb-dev libxrandr-dev libxcb-randr0-dev libgl-dev libglx-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libsystemd-dev libva-dev nlohmann-json3-dev libpulse-dev xz-utils libpipewire-0.3-dev libcli11-dev qt6-base-dev qt6-tools-dev libcap-dev policykit-1 libboost-all-dev librsvg2-bin dpkg-dev pkg-config debhelper-compat build-essential lintian cmake + + - name: Build package + working-directory: wivrn + run: dpkg-buildpackage --build=binary --no-sign + + - name: Publish package + uses: actions/upload-artifact@v4 + with: + name: wivrn-${{ matrix.distro }} + path: | + *.deb + *.ddeb + + - name: Check package + working-directory: wivrn + run: lintian --fail-on error | sed -e s/^W:/::warning::/ -e s/^E:/::error::/ + release: name: Create release runs-on: ubuntu-22.04 - needs: [build-server, build-android, build-test-client, build-dissector, build-server-flatpak] + needs: [build-server, build-android, build-test-client, build-dissector, build-server-flatpak, build-ubuntu] if: success() && startsWith(github.ref, 'refs/tags/') steps: @@ -306,6 +367,12 @@ jobs: name: wivrn-server-x86_64 path: flatpak + - name: Download artifacts (deb) + uses: actions/download-artifact@v4 + with: + name: wivrn-ubuntu-24.04 + path: ubuntu + - name: Release uses: softprops/action-gh-release@v2 with: @@ -315,6 +382,7 @@ jobs: files: | apk/*.apk flatpak/*.flatpak + ubuntu/*.deb - name: Update flatpak manifest for flathub run: | diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..be793e79 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +wivrn (0.20-1) unstable; urgency=medium + + * Initial release. + + -- Guillaume Meunier Mon, 28 Oct 2024 13:28:10 +0100 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..dbe49846 --- /dev/null +++ b/debian/control @@ -0,0 +1,62 @@ +Source: wivrn +Section: net +Priority: optional +Maintainer: Guillaume Meunier +Rules-Requires-Root: no +Build-Depends: + debhelper-compat (= 13), + cmake (>= 3.25), + pkg-config, + glslang-tools, + libavahi-client-dev, + libavahi-glib-dev, + libavcodec-dev, + libavfilter-dev, + libavutil-dev, + libbsd-dev, + libboost-all-dev, + libcap-dev, + libcjson-dev, + libcli11-dev, + libeigen3-dev, + libgl-dev, + libgl1-mesa-dev, + libglu1-mesa-dev, + libglx-dev, + libpipewire-0.3-dev, + libpulse-dev, + libswscale-dev, + libsystemd-dev, + libudev-dev, + libva-dev, + libvulkan-dev (>= 1.3.261), + libwayland-dev, + libx11-xcb-dev, + libx264-dev, + libxcb-randr0-dev, + libxrandr-dev, + mesa-common-dev, + nlohmann-json3-dev, + policykit-1, + qt6-base-dev, + qt6-tools-dev, + xz-utils +Standards-Version: 4.6.2 +Homepage: https://wivrn.github.io +#Vcs-Browser: https://salsa.debian.org/debian/wivrn +#Vcs-Git: https://salsa.debian.org/debian/wivrn.git + +Package: wivrn +Architecture: any +Multi-Arch: foreign +Depends: + ${shlibs:Depends}, + ${misc:Depends}, +Description: OpenXR streaming application to a standalone headset + WiVRn wirelessly connects a standalone VR headset to a Linu + computer. You can then play PCVR games on the headset while + processing is done on the computer. + . + It supports a wide range of headsets such as Quest 1 / 2 / Pro / 3, + Pico Neo 3 / 4, HTC Vive Focus 3, HTC Vive XR elite and most + other Android based headsets. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..153ecf2c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,81 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: +Upstream-Name: WiVRn + +Files: + * +Copyright: + 2022-2024 Guillaume Meunier + 2022-2024 Patrick Nicolas + 2024 galister +License: GPL-3.0+ + +Files: + debian/* +Copyright: + 2024 Guillaume Meunier +License: GPL-3.0+ + +Files: + external/ffnvcodec/dynlink_cuda.h + external/ffnvcodec/dynlink_cuviddec.h + external/ffnvcodec/dynlink_loader.h + external/ffnvcodec/dynlink_nvcuvid.h + external/ffnvcodec/nvEncodeAPI.h +Copyright: + 2010-2021 NVIDIA Corporation + +Files: + external/IconsFontAwesome6.h +Copyright: + 2017 Juliette Foucaut and Doug Binks +License: zlib + +Files: + assets/Font Awesome 6*.otf +License: SIL Open Font License + +Files: + assets/controllers/* +License: W3C Software and Document License + +Files: + assets/WoodFloor051* +License: CC0 +Copyright: + 2017 - 2024 Lennart Demes + +Files: + external/magic_enum*.hpp +Copyright: + 2019 - 2023 Daniil Goncharov +License: MIT + +Files: + external/mdns.h +Copyright: + 2017 Mattias Jansson +License: Public-Domain + +Files: + external/vk_mem_alloc.h +Copyright: + 2017-2022 Advanced Micro Devices, Inc. All rights reserved. + + +License: GPL-3.0+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . +Comment: + 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/postinst b/debian/postinst new file mode 100644 index 00000000..4d122afa --- /dev/null +++ b/debian/postinst @@ -0,0 +1,40 @@ +#!/bin/sh +# postinst script for wivrn. +# +# See: dh_installdeb(1). + +set -e + +# Summary of how this script can be called: +# * 'configure' +# * 'abort-upgrade' +# * 'abort-remove' 'in-favour' +# +# * 'abort-remove' +# * 'abort-deconfigure' 'in-favour' +# 'removing' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package. + + +case "$1" in + configure) + setcap CAP_SYS_NICE=+ep /usr/bin/wivrn-server + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument '$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..5b389358 --- /dev/null +++ b/debian/rules @@ -0,0 +1,44 @@ +#!/usr/bin/make -f + +# See debhelper(7) (uncomment to enable). +# Output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# See FEATURE AREAS in dpkg-buildflags(1). +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# See ENVIRONMENT in dpkg-buildflags(1). +# Package maintainers to append CFLAGS. +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# Package maintainers to append LDFLAGS. +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + +# dh_make generated override targets. +# This is an example for Cmake (see ). +override_dh_auto_configure: + dh_auto_configure -- \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWIVRN_BUILD_CLIENT=OFF \ + -DWIVRN_BUILD_SERVER=ON \ + -DWIVRN_BUILD_DASHBOARD=ON \ + -DWIVRN_BUILD_DISSECTOR=OFF \ + -DWIVRN_USE_VAAPI=ON \ + -DWIVRN_USE_VULKAN_ENCODE=OFF \ + -DWIVRN_USE_X264=ON \ + -DWIVRN_USE_NVENC=ON \ + -DWIVRN_USE_SYSTEMD=ON \ + -DWIVRN_USE_SYSTEM_BOOST=ON \ + -DWIVRN_USE_PULSEAUDIO=ON \ + -DWIVRN_USE_PIPEWIRE=ON \ + -DWIVRN_WERROR=OFF \ + -DFETCHCONTENT_BASE_DIR=$(shell pwd) + +# Don't add the ldconfig trigger +override_dh_makeshlibs: + dh_makeshlibs --no-scripts