This repository has been archived by the owner on Jun 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
66 lines (54 loc) · 2.78 KB
/
Makefile
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
# Copyright (C) 2021 Elliot Killick <elliotkillick@zohomail.eu>
# Licensed under the MIT License. See LICENSE file for details.
PKGNAME = qubes-video-companion
BINDIR ?= /usr/bin
DATADIR ?= /usr/share
SYSCONFDIR ?= /etc
QREXECDIR ?= $(SYSCONFDIR)/qubes-rpc
INSTALL_DIR = install -d --
INSTALL_PROGRAM = install -D --
INSTALL_DATA = install -Dm 644 --
help:
@echo "make build Build components"
@echo "make install-vm Install all components necessary for VMs"
@echo "make install-dom0 Install all components necessary for dom0"
@echo "make install-both Install components necessary for VMs and dom0"
@echo "make install-policy Install qrexec policies"
@echo "make install-license Install license to $(DATADIR)/licenses/$(PKGNAME)"
@echo "make clean Clean build"
build:
$(MAKE) -C doc manpages
install-v4l2loopback-script:
$(INSTALL_PROGRAM) scripts/v4l2loopback/install.sh $(DESTDIR)$(DATADIR)/$(PKGNAME)/scripts/v4l2loopback
$(INSTALL_DATA) scripts/v4l2loopback/author.asc $(DESTDIR)$(DATADIR)/$(PKGNAME)/scripts/v4l2loopback
install-vm: install-both
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
$(INSTALL_PROGRAM) receiver/$(PKGNAME) $(DESTDIR)$(BINDIR)
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)/$(PKGNAME)/receiver
$(INSTALL_PROGRAM) receiver/setup.sh receiver/receiver.py receiver/destroy.sh receiver/common.sh $(DESTDIR)$(DATADIR)/$(PKGNAME)/receiver
$(INSTALL_DIR) $(DESTDIR)$(SYSCONFDIR)/qubes/rpc-config
echo 'wait-for-session=1' > $(DESTDIR)$(SYSCONFDIR)/qubes/rpc-config/qvc.Webcam
echo 'wait-for-session=1' > $(DESTDIR)$(SYSCONFDIR)/qubes/rpc-config/qvc.ScreenShare
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)/$(PKGNAME)/scripts
$(INSTALL_DATA) scripts/webcam.html $(DESTDIR)$(DATADIR)/$(PKGNAME)/scripts
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)/$(PKGNAME)/scripts/v4l2loopback
$(MAKE) -C doc install
install-dom0: install-both install-policy
install-both:
$(INSTALL_DIR) $(DESTDIR)$(QREXECDIR)
$(INSTALL_PROGRAM) qubes-rpc/services/qvc.Webcam qubes-rpc/services/qvc.ScreenShare $(DESTDIR)$(QREXECDIR)
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)/$(PKGNAME)/sender
$(INSTALL_PROGRAM) sender/*.py $(DESTDIR)$(DATADIR)/$(PKGNAME)/sender
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)/doc/$(PKGNAME)
$(INSTALL_DATA) README.md doc/pipeline.md $(DESTDIR)$(DATADIR)/doc/$(PKGNAME)
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)/doc/$(PKGNAME)/visualizations
$(INSTALL_DATA) doc/visualizations/* $(DESTDIR)$(DATADIR)/doc/$(PKGNAME)/visualizations
install-policy:
$(INSTALL_DIR) $(DESTDIR)$(QREXECDIR)/policy
$(INSTALL_DATA) qubes-rpc/policies/* $(DESTDIR)$(QREXECDIR)/policy
install-license:
$(INSTALL_DIR) $(DESTDIR)$(DATADIR)/licenses/$(PKGNAME)
$(INSTALL_DATA) LICENSE $(DESTDIR)$(DATADIR)/licenses/$(PKGNAME)
clean:
$(MAKE) -C doc clean
.PHONY: clean install-license install-policy install-both install-dom0 install-v4l2loopback-script build help