2023-08-14 03:34:16 +00:00
|
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
2024-06-03 12:15:29 +00:00
|
|
|
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
2023-08-14 03:34:16 +00:00
|
|
|
pkgname=qubes-vm-gui
|
2023-08-16 02:14:12 +00:00
|
|
|
subpackages="
|
|
|
|
qubes-vm-pulseaudio
|
|
|
|
qubes-vm-pipewire
|
|
|
|
$pkgname-openrc"
|
2024-10-31 19:53:09 +00:00
|
|
|
pkgver=4.3.0
|
|
|
|
pkgrel=0
|
2023-08-14 03:34:16 +00:00
|
|
|
_gittag="v$pkgver"
|
|
|
|
pkgdesc="The Qubes GUI Agent for AppVMs"
|
|
|
|
arch="x86_64"
|
|
|
|
url="https://github.com/QubesOS/qubes-gui-agent-linux"
|
|
|
|
license="GPL"
|
|
|
|
options="!check" # No testsuite
|
|
|
|
depends="
|
|
|
|
libxcomposite
|
|
|
|
py3-xcffib
|
|
|
|
xinit
|
|
|
|
zenity
|
|
|
|
"
|
|
|
|
makedepends="
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
gcc
|
|
|
|
git
|
|
|
|
libtool
|
|
|
|
libxcomposite-dev
|
|
|
|
libxt
|
|
|
|
linux-pam-dev
|
2023-08-16 02:14:12 +00:00
|
|
|
lsb-release-minimal
|
2023-08-14 03:34:16 +00:00
|
|
|
make
|
|
|
|
patch
|
|
|
|
pixman
|
|
|
|
pkgconf
|
2023-08-16 02:14:12 +00:00
|
|
|
pipewire-dev
|
2023-08-14 03:34:16 +00:00
|
|
|
pulseaudio-dev
|
|
|
|
qubes-db-vm
|
|
|
|
qubes-db-vm-dev
|
|
|
|
qubes-libvchan-xen-dev
|
|
|
|
qubes-vm-gui-dev
|
|
|
|
xen-dev
|
|
|
|
util-macros
|
|
|
|
xorg-server-dev
|
|
|
|
"
|
|
|
|
|
|
|
|
source="
|
|
|
|
$pkgname-$_gittag.tar.gz::https://github.com/QubesOS/qubes-gui-agent-linux/archive/refs/tags/$_gittag.tar.gz
|
|
|
|
0001-musl-build.patch
|
|
|
|
0001-initd-fix.patch
|
|
|
|
qubes-gui-agent.openrc
|
|
|
|
qubes-sessions.sh
|
|
|
|
qubes-gui-agent.pam
|
2023-09-11 03:18:19 +00:00
|
|
|
qubes-sessions_do-not-use-systemd.patch
|
2023-08-14 03:34:16 +00:00
|
|
|
"
|
|
|
|
builddir="$srcdir"/qubes-gui-agent-linux-${_gittag/v}
|
|
|
|
_qubes_backend_vmm=xen
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local pa_ver=$(pkg-config --modversion libpulse 2>/dev/null | cut -f 1 -d "-")
|
|
|
|
|
|
|
|
rm -f pulse/pulsecore
|
|
|
|
ln -s pulsecore-$pa_ver pulse/pulsecore
|
|
|
|
|
|
|
|
# Bug fixes : /var/run/console depends on pam_console, which is fedora specific
|
|
|
|
# As a consequece, /var/run/console does not exists and qubes-gui-agent will always fail
|
|
|
|
sed 's:ExecStartPre=/bin/touch:#ExecStartPre=/bin/touch:' -i appvm-scripts/qubes-gui-agent.service
|
|
|
|
# Ensure that qubes-gui-agent starts after user autologin
|
|
|
|
sed 's/After=\(.*\)qubes-misc-post.service/After=\1qubes-misc-post.service getty.target/' -i appvm-scripts/qubes-gui-agent.service
|
|
|
|
|
|
|
|
make BACKEND_VMM="$_qubes_backend_vmm" appvm
|
|
|
|
make appvm
|
|
|
|
|
|
|
|
# replace all shebangs with /bin/sh as qubes expects bash
|
|
|
|
# shellcheck disable=SC2013
|
|
|
|
for i in $(grep '/bin/sh' -Rl .); do
|
|
|
|
sed -i 's|/bin/sh|/bin/bash|' "$i"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2024-10-16 23:36:49 +00:00
|
|
|
make install-rh-agent DESTDIR="$pkgdir" LIBDIR=/usr/lib USRLIBDIR=/usr/lib SYSLIBDIR=/usr/lib
|
2023-08-14 03:34:16 +00:00
|
|
|
install -Dm 755 "$srcdir"/qubes-gui-agent.openrc "$pkgdir"/etc/init.d/qubes-gui-agent
|
2023-08-26 18:08:50 +00:00
|
|
|
|
|
|
|
# Starts qubes-session after X11 start
|
|
|
|
install -Dm 755 "$srcdir"/qubes-sessions.sh "$pkgdir"/etc/X11/xinit/xinitrc.d/90-qubes-sessions.sh
|
|
|
|
|
|
|
|
# Remove broken pam and replace with adequate
|
|
|
|
install -Dm 644 "$srcdir"/qubes-gui-agent.pam "$pkgdir"/etc/pam.d/qubes-gui-agent
|
2023-08-14 03:34:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pulseaudio() {
|
|
|
|
pkgdesc="Pulseaudio support for Qubes VM"
|
|
|
|
depends="
|
|
|
|
alsa-lib
|
|
|
|
alsa-utils
|
|
|
|
pulseaudio
|
|
|
|
pulseaudio-alsa
|
|
|
|
"
|
|
|
|
local pa_ver=$(pkg-config --modversion libpulse 2>/dev/null | cut -f 1 -d "-")
|
|
|
|
|
|
|
|
cd "$builddir"
|
2024-10-16 23:36:49 +00:00
|
|
|
make install-pulseaudio DESTDIR=$subpkgdir PA_VER=$pa_ver LIBDIR=/usr/lib USRLIBDIR=/usr/lib SYSLIBDIR=/usr/lib
|
2023-08-14 03:34:16 +00:00
|
|
|
}
|
2023-08-16 02:14:12 +00:00
|
|
|
|
|
|
|
pipewire() {
|
2023-09-11 04:44:43 +00:00
|
|
|
pkgdesc="PipeWire support for Qubes VM."
|
2023-08-16 02:14:12 +00:00
|
|
|
depends="pipewire"
|
|
|
|
|
|
|
|
cd "$builddir"
|
|
|
|
make install-pipewire \
|
|
|
|
"DESTDIR=$subpkgdir" \
|
|
|
|
LIBDIR=/usr/lib \
|
|
|
|
USRLIBDIR=/usr/lib \
|
|
|
|
SYSLIBDIR=/usr/lib
|
|
|
|
}
|
|
|
|
|
2023-08-14 03:34:16 +00:00
|
|
|
sha512sums="
|
2024-10-31 19:53:09 +00:00
|
|
|
725df11ee64ae100b149b2f70253ab4cf0b73b05b5faa503df755925fa8b568f891ea8cd653999618d238a445103014e08ab741bf0ddbed7446f5df62e6076cd qubes-vm-gui-v4.3.0.tar.gz
|
2023-08-14 03:34:16 +00:00
|
|
|
f0bbb936e14689d0cbced2f564b8911f9287c0217616f02f3bd0c3060e516d080ad538219f089f5841c2b9d18bb4ad8efb63516ddfd46c18b038218378996a7d 0001-musl-build.patch
|
2023-08-16 02:14:12 +00:00
|
|
|
01beace4c130200dc8d42248349ea858d2bec746aca2bdfa5948b6e7240bb3b832bbb8b324293fba6fd6aafb0a3d7a2e3928c7fd39d318ef4d5a18cfeb48cde6 0001-initd-fix.patch
|
2023-08-14 03:34:16 +00:00
|
|
|
68d01e594296e18d54d8eaa17863451c3ac121e4fcacf98b64db14166bdcf38aa66f1c3659c5014c0a9cc25b5368df66f8c642b8e7af59da8d2a5ad97da9a194 qubes-gui-agent.openrc
|
|
|
|
bd707f7956f58c2bb24ccb9adad1381c069e70820fcb1b01b09dc88570d9df00e0dc92a9ac3b242f828314568d5487257566a6fc61e75e62e010b7e4871f9ea0 qubes-sessions.sh
|
|
|
|
b512d691f2a6b11fc329bf91dd05ca9c589bbd444308b27d3c87c75262dedf6afc68a9739229249a4bd3d0c43cb1f871eecbb93c4fe559e0f38bdabbffd06ad7 qubes-gui-agent.pam
|
2023-09-11 03:18:19 +00:00
|
|
|
5d44bed65772e0300cfdb5960327ccff923159f1c0c6b980a3b37758a7330f5d8befa3c053990f6e5e7d2e71bf0eca047040439446a8b91bb1c2672e9e1497a0 qubes-sessions_do-not-use-systemd.patch
|
2023-08-14 03:34:16 +00:00
|
|
|
"
|