forked from QubesOS/qubes-gui-agent-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
198 lines (176 loc) · 8.56 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#
# The Qubes OS Project, http://www.qubes-os.org
#
# Copyright (C) 2010 Joanna Rutkowska <[email protected]>
#
# 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 2
# of the License, or (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
RPMS_DIR=rpm/
VERSION := $(shell cat version)
DIST_DOM0 ?= fc13
LIBDIR ?= /usr/lib64
USRLIBDIR ?= /usr/lib
SYSLIBDIR ?= /lib
DATADIR ?= /usr/share
PA_VER ?= $(shell pkg-config --modversion libpulse | cut -d "-" -f 1 || echo 0.0)
help:
@echo "Qubes GUI main Makefile:" ;\
echo "make rpms <--- make all rpms and sign them";\
echo "make rpms-dom0 <--- create binary rpms for dom0"; \
echo "make rpms-vm <--- create binary rpms for appvm"; \
echo; \
echo "make clean <--- clean all the binary files";\
echo "make update-repo-current <-- copy newly generated rpms to qubes yum repo";\
echo "make update-repo-current-testing <-- same, but for -current-testing repo";\
echo "make update-repo-unstable <-- same, but to -testing repo";\
echo "make update-repo-installer -- copy dom0 rpms to installer repo"
@exit 0;
appvm: gui-agent/qubes-gui gui-common/qubes-gui-runuser \
xf86-input-mfndev/src/.libs/qubes_drv.so \
xf86-video-dummy/src/.libs/dummyqbs_drv.so pulse/module-vchan-sink.so \
xf86-qubes-common/libxf86-qubes-common.so
gui-agent/qubes-gui:
(cd gui-agent; $(MAKE))
gui-common/qubes-gui-runuser:
(cd gui-common; $(MAKE))
xf86-input-mfndev/src/.libs/qubes_drv.so: xf86-qubes-common/libxf86-qubes-common.so
(cd xf86-input-mfndev && ./autogen.sh && ./configure && make)
xf86-video-dummy/src/.libs/dummyqbs_drv.so: xf86-qubes-common/libxf86-qubes-common.so
(cd xf86-video-dummy && ./autogen.sh && make)
pulse/module-vchan-sink.so:
rm -f pulse/pulsecore
ln -s pulsecore-$(PA_VER) pulse/pulsecore
$(MAKE) -C pulse module-vchan-sink.so
xf86-qubes-common/libxf86-qubes-common.so:
$(MAKE) -C xf86-qubes-common libxf86-qubes-common.so
rpms: rpms-dom0 rpms-vm
rpm --addsign rpm/x86_64/*$(VERSION)*.rpm
(if [ -d rpm/i686 ] ; then rpm --addsign rpm/i686/*$(VERSION)*.rpm; fi)
rpms-vm:
rpmbuild --define "_rpmdir rpm/" -bb rpm_spec/gui-vm.spec
tar:
git archive --format=tar --prefix=qubes-gui/ HEAD -o qubes-gui.tar
clean:
(cd common && $(MAKE) clean)
(cd gui-agent && $(MAKE) clean)
(cd gui-common && $(MAKE) clean)
$(MAKE) -C pulse clean
$(MAKE) -C xf86-qubes-common clean
(cd xf86-input-mfndev; if [ -e Makefile ] ; then \
$(MAKE) distclean; fi; ./bootstrap --clean || echo )
install: install-rh-agent install-pulseaudio
install-rh-agent: appvm install-common
install -m 0644 -D appvm-scripts/qubes-gui-agent.service \
$(DESTDIR)/$(SYSLIBDIR)/systemd/system/qubes-gui-agent.service
install -m 0644 -D appvm-scripts/etc/sysconfig/desktop \
$(DESTDIR)/etc/sysconfig/desktop
install -m 0755 -D appvm-scripts/etc/X11/xinit/xinitrc.d/qubes-keymap.sh \
$(DESTDIR)/etc/X11/xinit/xinitrc.d/qubes-keymap.sh
install -D appvm-scripts/etc/X11/xinit/xinitrc.d/20qt-x11-no-mitshm.sh \
$(DESTDIR)/etc/X11/xinit/xinitrc.d/20qt-x11-no-mitshm.sh
install -D appvm-scripts/etc/X11/xinit/xinitrc.d/20qt-gnome-desktop-session-id.sh \
$(DESTDIR)/etc/X11/xinit/xinitrc.d/20qt-gnome-desktop-session-id.sh
install-xfce:
install -D appvm-scripts/etc/X11/xinit/xinitrc.d/50-xfce-desktop.sh \
$(DESTDIR)/etc/X11/xinit/xinitrc.d/50-xfce-desktop.sh
install-debian: appvm install-common install-pulseaudio
install -d $(DESTDIR)/etc/X11/Xsession.d
install -m 0755 appvm-scripts/etc/X11/xinit/xinitrc.d/qubes-keymap.sh \
$(DESTDIR)/etc/X11/Xsession.d/90qubes-keymap
install -m 0644 appvm-scripts/etc/X11/Xsession.d/* $(DESTDIR)/etc/X11/Xsession.d/
install -d $(DESTDIR)/etc/xdg
install -m 0644 appvm-scripts/etc/xdg-debian/* $(DESTDIR)/etc/xdg
install -m 0644 -D appvm-scripts/qubes-gui-agent.service \
$(DESTDIR)/$(SYSLIBDIR)/systemd/system/qubes-gui-agent.service
install-pulseaudio:
install -D pulse/start-pulseaudio-with-vchan \
$(DESTDIR)/usr/bin/start-pulseaudio-with-vchan
install -m 0644 -D pulse/qubes-default.pa \
$(DESTDIR)/etc/pulse/qubes-default.pa
install -D pulse/module-vchan-sink.so \
$(DESTDIR)$(LIBDIR)/pulse-$(PA_VER)/modules/module-vchan-sink.so
install -m 0644 -D appvm-scripts/etc/tmpfiles.d/qubes-pulseaudio.conf \
$(DESTDIR)/$(USRLIBDIR)/tmpfiles.d/qubes-pulseaudio.conf
install -m 0644 -D appvm-scripts/etc/xdgautostart/qubes-pulseaudio.desktop \
$(DESTDIR)/etc/xdg/autostart/qubes-pulseaudio.desktop
install-common:
install -D gui-agent/qubes-gui $(DESTDIR)/usr/bin/qubes-gui
install -D gui-common/qubes-gui-runuser $(DESTDIR)/usr/bin/qubes-gui-runuser
install -d $(DESTDIR)/etc/qubes/post-install.d
install -m 0755 appvm-scripts/etc/qubes/post-install.d/20-qubes-guivm-gui-agent.sh \
$(DESTDIR)/etc/qubes/post-install.d/20-qubes-guivm-gui-agent.sh
install -D appvm-scripts/usrbin/qubes-session \
$(DESTDIR)/usr/bin/qubes-session
install -D appvm-scripts/usrbin/qubes-run-xorg \
$(DESTDIR)/usr/bin/qubes-run-xorg
install -D appvm-scripts/usrbin/qubes-run-xephyr \
$(DESTDIR)/usr/bin/qubes-run-xephyr
install -D appvm-scripts/usrbin/qubes-change-keyboard-layout \
$(DESTDIR)/usr/bin/qubes-change-keyboard-layout
install -D appvm-scripts/usrbin/qubes-set-monitor-layout \
$(DESTDIR)/usr/bin/qubes-set-monitor-layout
install -D xf86-qubes-common/libxf86-qubes-common.so \
$(DESTDIR)$(LIBDIR)/libxf86-qubes-common.so
install -D xf86-input-mfndev/src/.libs/qubes_drv.so \
$(DESTDIR)$(LIBDIR)/xorg/modules/drivers/qubes_drv.so
install -D xf86-video-dummy/src/.libs/dummyqbs_drv.so \
$(DESTDIR)$(LIBDIR)/xorg/modules/drivers/dummyqbs_drv.so
install -m 0644 -D appvm-scripts/etc/X11/xorg-qubes.conf.template \
$(DESTDIR)/etc/X11/xorg-qubes.conf.template
install -m 0644 -D appvm-scripts/etc/profile.d/qubes-gui.sh \
$(DESTDIR)/etc/profile.d/qubes-gui.sh
install -m 0644 -D appvm-scripts/etc/profile.d/qubes-gui.csh \
$(DESTDIR)/etc/profile.d/qubes-gui.csh
install -m 0644 -D appvm-scripts/etc/profile.d/qubes-session.sh \
$(DESTDIR)/etc/profile.d/qubes-session.sh
install -m 0644 -D appvm-scripts/etc/tmpfiles.d/qubes-session.conf \
$(DESTDIR)/$(USRLIBDIR)/tmpfiles.d/qubes-session.conf
install -m 0644 -D appvm-scripts/etc/securitylimits.d/90-qubes-gui.conf \
$(DESTDIR)/etc/security/limits.d/90-qubes-gui.conf
install -D appvm-scripts/etc/X11/xinit/xinitrc.d/50-guivm-windows-prefix.sh \
$(DESTDIR)/etc/X11/xinit/xinitrc.d/50-guivm-windows-prefix.sh
ifneq ($(shell lsb_release -is), Ubuntu)
install -m 0644 -D appvm-scripts/etc/xdg/Trolltech.conf \
$(DESTDIR)/etc/xdg/Trolltech.conf
endif
install -m 0644 -D appvm-scripts/qubes-gui-vm.gschema.override \
$(DESTDIR)$(DATADIR)/glib-2.0/schemas/20_qubes-gui-vm.gschema.override
install -m 0644 -D appvm-scripts/etc/qubes-rpc/qubes.SetMonitorLayout \
$(DESTDIR)/etc/qubes-rpc/qubes.SetMonitorLayout
install -D window-icon-updater/icon-sender \
$(DESTDIR)/usr/lib/qubes/icon-sender
install -m 0644 -D window-icon-updater/qubes-icon-sender.desktop \
$(DESTDIR)/etc/xdg/autostart/qubes-icon-sender.desktop
install -m 0644 -D appvm-scripts/etc/xdgautostart/qubes-qrexec-fork-server.desktop \
$(DESTDIR)/etc/xdg/autostart/qubes-qrexec-fork-server.desktop
install -D -m 0644 appvm-scripts/usr/lib/sysctl.d/30-qubes-gui-agent.conf \
$(DESTDIR)/usr/lib/sysctl.d/30-qubes-gui-agent.conf
install -D -m 0644 appvm-scripts/lib/udev/rules.d/70-master-of-seat.rules \
$(DESTDIR)/$(SYSLIBDIR)/udev/rules.d/70-master-of-seat.rules
ifeq ($(shell lsb_release -is), Debian)
install -D -m 0644 appvm-scripts/etc/pam.d/qubes-gui-agent.debian \
$(DESTDIR)/etc/pam.d/qubes-gui-agent
else ifeq ($(shell lsb_release -is), Ubuntu)
install -D -m 0644 appvm-scripts/etc/pam.d/qubes-gui-agent.debian \
$(DESTDIR)/etc/pam.d/qubes-gui-agent
else ifeq ($(shell lsb_release -is), Arch)
install -D -m 0644 appvm-scripts/etc/pam.d/qubes-gui-agent.archlinux \
$(DESTDIR)/etc/pam.d/qubes-gui-agent
else
install -D -m 0644 appvm-scripts/etc/pam.d/qubes-gui-agent \
$(DESTDIR)/etc/pam.d/qubes-gui-agent
endif
install -d $(DESTDIR)/var/log/qubes