-
Notifications
You must be signed in to change notification settings - Fork 1
/
looking-glass-client.spec
126 lines (110 loc) · 5.15 KB
/
looking-glass-client.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%define lg_version B6
Name: looking-glass-client
Version: 0~%{lg_version}
Release: 3%{?dist}
Summary: Low latency KVMFR implementation for guests with VGA PCI Passthrough (client)
License: GPLv2
Source0: https://github.com/gnif/LookingGlass/archive/refs/tags/%{lg_version}.tar.gz
Source1: https://github.com/gnif/LGMP/archive/1b170ad8d732c8649d75f2ab71c11731661b0b96.tar.gz
Source2: https://github.com/gnif/PureSpice/archive/247c57ee36110bc1d99e42355338a25ff2e483b0.tar.gz
Source3: https://github.com/cimgui/cimgui/archive/261250f88f374e751b2de1501ba5c0c11e420b5a.tar.gz
Source4: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/930bc8014b43653204d411add2009c0d86e4a945/wayland-protocols-930bc8014b43653204d411add2009c0d86e4a945.tar.gz
Source5: https://github.com/memononen/nanosvg/archive/64d59e4d53308104181c6a7ad71fbf423f71910f.tar.gz
Source6: https://github.com/ocornut/imgui/archive/c71a50deb5ddf1ea386b91e60fa2e4a26d080074.tar.gz
Source7: %{name}-sysusers.conf
Source8: %{name}-tmpfiles.conf
BuildRequires: systemd-rpm-macros
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: coreutils
BuildRequires: pkgconfig(libpipewire-0.3)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-cursor)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(libdecor-0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xscrnsaver)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xpresent)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(wayland-egl)
BuildRequires: gawk
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(samplerate)
BuildRequires: binutils-devel
BuildRequires: pkgconfig(spice-protocol)
BuildRequires: pkgconfig(nettle)
BuildRequires: pkgconfig(hogweed)
# LookingGlass/client/audiodevs/PipeWire: pkgconfig(libpipewire-0.3)
# LookingGlass/client/audiodevs/PulseAudio: pkgconfig(libpulse)
# LookingGlass/client/displayservers/Wayland: pkgconfig(wayland-client) pkgconfig(wayland-cursor) pkgconfig(xkbcommon) ENABLE_LIBDECOR:pkgconfig(libdecor-0)
# LookingGlass/client/displayservers/X11: pkgconfig(x11) pkgconfig(xi) pkgconfig(xfixes) pkgconfig(xscrnsaver) pkgconfig(xinerama) pkgconfig(xcursor) pkgconfig(xpresent) pkgconfig(xkbcommon)
# LookingGlass/client/renderers/EGL: pkgconfig(egl) pkgconfig(gl) OPTIONAL:pkgconfig(wayland-egl) gawk
# LookingGlass/client/renderers/OpenGL: pkgconfig(gl)
# LookingGlass/client: pkgconfig(fontconfig) ENABLE_PIPEWIRE|ENABLE_PULSEAUDIO:pkgconfig(samplerate)
# LookingGlass/common/src/platform/linux: ENABLE_BACKTRACE:binutils-devel
# PureSpice: pkgconfig(spice-protocol) pkgconfig(nettle) pkgconfig(hogweed)
# missing from previous deps: pkgconfig(xrandr)
Requires: dejavu-sans-mono-fonts
%description
Looking Glass is an open source application that allows the use of a KVM
(Kernel-based Virtual Machine) configured for VGA PCI Pass-through without an
attached physical monitor, keyboard or mouse. This is the final step required
to move away from dual booting with other operating systems for legacy
programs that require high performance graphics.
%prep
cd "%{_builddir}"
rm -rf LookingGlass-%{lg_version}
/usr/lib/rpm/rpmuncompress -x -v "%{SOURCE0}" || exit $?
cd LookingGlass-%{lg_version} || exit $?
echo "%{lg_version}" > VERSION
/usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
rm -rf repos
mkdir repos
cd repos || exit $?
/usr/lib/rpm/rpmuncompress -x -v "%{SOURCE1}" || exit $?
/usr/lib/rpm/rpmuncompress -x -v "%{SOURCE2}" || exit $?
/usr/lib/rpm/rpmuncompress -x -v "%{SOURCE3}" || exit $?
/usr/lib/rpm/rpmuncompress -x -v "%{SOURCE4}" || exit $?
/usr/lib/rpm/rpmuncompress -x -v "%{SOURCE5}" || exit $?
/usr/lib/rpm/rpmuncompress -x -v "%{SOURCE6}" || exit $?
mv LGMP-* LGMP || exit $?
mv PureSpice-* PureSpice || exit $?
mv cimgui-* cimgui || exit $?
mv wayland-protocols-* wayland-protocols || exit $?
mv nanosvg-* nanosvg || exit $?
rmdir cimgui/imgui && mv imgui-* cimgui/imgui || exit $?
/usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
%build
cd "%{_builddir}/LookingGlass-%{lg_version}/client"
%cmake -DENABLE_OPENGL=ON -DENABLE_EGL=ON -DENABLE_BACKTRACE=ON -DENABLEX11=ON -DENABLE_WAYLAND=ON -DENABLE_LIBDECOR=ON -DENABLE_PIPEWIRE=ON -DENABLE_PULSEAUDIO=ON
%cmake_build
%install
cd "%{_builddir}/LookingGlass-%{lg_version}/client"
%cmake_install
install -Dm644 %{SOURCE7} %{buildroot}%{_sysusersdir}/%{name}.conf
install -Dm644 %{SOURCE8} %{buildroot}%{_tmpfilesdir}/%{name}.conf
%pre
%sysusers_create_compat ${SOURCE7}
%post
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf &>/dev/null || :
usermod -aG looking-glass qemu 2>/dev/null || :
%files
%{_bindir}/%{name}
%{_tmpfilesdir}/%{name}.conf
%{_sysusersdir}/%{name}.conf
%changelog
* Fri May 10 2024 Patrick Gaskin <patrick@pgaskin.net> - 0~B6-3
- Rebuild.
* Sat Jul 08 2023 Patrick Gaskin <patrick@pgaskin.net> - 0~B6-2
- Rebuild.
* Thu Jan 26 2023 Patrick Gaskin <patrick@pgaskin.net> - 0~B6-1
- Initial package.