ayaports/backports/looking-glass/APKBUILD

94 lines
2.9 KiB
Text
Raw Normal View History

2024-07-31 03:39:19 +00:00
# Contributor: Rogério da Silva Yokomizo <me@ro.ger.io>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Rogério da Silva Yokomizo <me@ro.ger.io>
pkgname=looking-glass
_gittag=b7_git20240607
pkgver=7b_git20240607
pkgrel=0
2024-07-31 03:39:19 +00:00
pkgdesc="Allows the use of a KVM configured for VGA PCI Pass-through without an attached physical monitor, keyboard or mouse"
url="https://looking-glass.io/"
arch="x86_64"
license="GPL-2.0-or-later"
makedepends="
cmake
fontconfig-dev
libsamplerate-dev
libx11-dev
libxcursor-dev
libxfixes-dev
libxi-dev
libxinerama-dev
libxkbcommon-dev
libxpresent-dev
libxscrnsaver-dev
nettle-dev
obs-studio-dev
pipewire-dev
pulseaudio-dev
samurai
spice-dev
wayland-dev
wayland-protocols
"
source="$pkgname-$_gittag.tar.gz::https://lab.ilot.io/mirrors/looking-glass/-/releases/$_gittag/downloads/tarball/looking-glass-$_gittag.tar.gz
2024-07-31 03:39:19 +00:00
missing-includes.patch
obs-plugins-lib.patch
werror.patch
"
subpackages="$pkgname-obs $pkgname-module"
builddir="$srcdir/$pkgname-$_gittag"
2024-07-31 03:39:19 +00:00
options="!check" # There are no tests nor --version.
build() {
cmake -S client -B build-client -G Ninja \
-DENABLE_BACKTRACE=OFF \
-DOPTIMIZE_FOR_NATIVE=OFF \
-DCMAKE_INSTALL_PREFIX=/usr
cmake -S obs -B build-obs -G Ninja \
-DENABLE_BACKTRACE=OFF \
-DOPTIMIZE_FOR_NATIVE=OFF \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build-client
cmake --build build-obs
}
package() {
DESTDIR="$pkgdir" cmake --install build-client
DESTDIR="$pkgdir" cmake --install build-obs
}
module() {
pkgdesc="Looking Glass kernel module (AKMS)"
depends="akms"
install_if="looking-glass=$pkgver-r$pkgrel"
_modver=$(awk -F "=" '{if($1=="PACKAGE_VERSION"){print $2}}' src/looking-glass-B6/module/dkms.conf | tr -d '"')
install -Dm644 "$builddir"/module/Makefile "$subpkgdir"/usr/src/looking-glass/Makefile
install -Dm644 "$builddir"/module/kvmfr* "$subpkgdir"/usr/src/looking-glass/.
cat ->> "$subpkgdir"/usr/src/looking-glass/AKMBUILD <<EOF
modname=kvmfr
modver=$pkgver
2024-07-31 03:39:19 +00:00
built_modules='kvmfr.ko'
EOF
chmod -R u=rwX,go=rX-w "$subpkgdir"/usr/src/looking-glass
mkdir -p "$subpkgdir"/etc/udev/rules.d
echo 'SUBSYSTEM=="kvmfr", OWNER="root", GROUP="kvm", MODE="0660"' > "$subpkgdir"/etc/udev/rules.d/99-kvmfr.rules
}
obs() {
pkgdesc="$pkgdesc (obs plugin)"
amove usr/lib/obs-plugins
}
sha512sums="
959f49c91dc7bb06dfae890547bfbd1c02bd4154f4ba1c898a12d15a3579658d65fcb9fc4b951c04180e17fc9151e551858e0fb60f20e3f1a72d19b86c7dc3db looking-glass-b7_git20240607.tar.gz
2024-07-31 03:39:19 +00:00
6d2449764a8316dd3c1b5cc0aa552671068f89ed2f95297f3c5256af8529b93e5ec7af8f979bd2e744fd09b11063e8a93f3ed26284f0e49294e467ca10f6e772 missing-includes.patch
33c5463412a16691f47d7833ebf81d7cf20c560a077dca141dcc9f02a5d6dfb676e483835f39a06012b114be9f509dda4614fe253bb1c72a0142e82dc265a5ca obs-plugins-lib.patch
b952d1fd284aed15bcfe7990f160dec3a4565fb5833ce339920f62de6bb46fbc09265a0a79fe80d212eecc6a1813614e1e193a8846c37e2afd18431dc3a89ca4 werror.patch
"