summaryrefslogtreecommitdiffstats
path: root/rules/weston.make
blob: adb24b0c739be9f7b70bad05e85076a34581f5b2 (plain)
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# -*-makefile-*-
#
# Copyright (C) 2013 by Philipp Zabel <p.zabel@pengutronix.de>
#               2014 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_WESTON) += weston

#
# Paths and names
#
WESTON_VERSION	:= 10.0.2
LIBWESTON_MAJOR := 10
WESTON_MD5	:= 8d46c0c0dd5c2ddfdced0a79ea7b6155
WESTON		:= weston-$(WESTON_VERSION)
WESTON_SUFFIX	:= tar.xz
WESTON_URL	:= https://gitlab.freedesktop.org/wayland/weston/-/releases/$(WESTON_VERSION)/downloads/$(WESTON).$(WESTON_SUFFIX)
WESTON_SOURCE	:= $(SRCDIR)/$(WESTON).$(WESTON_SUFFIX)
WESTON_DIR	:= $(BUILDDIR)/$(WESTON)
WESTON_LICENSE	:= MIT
WESTON_LICENSE_FILES	:= file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

WESTON_SIMPLE_CLIENTS-y := damage im shm touch
WESTON_SIMPLE_CLIENTS-$(PTXCONF_WESTON_GL) += egl dmabuf-egl dmabuf-feedback

WESTON_CONF_TOOL	:= meson
WESTON_CONF_OPT		:= \
	$(CROSS_MESON_USR) \
	-Dbackend-default=drm \
	-Dbackend-drm=true \
	-Dbackend-drm-screencast-vaapi=false \
	-Dbackend-headless=$(call ptx/truefalse,PTXCONF_WESTON_HEADLESS_COMPOSITOR) \
	-Dbackend-rdp=false \
	-Dbackend-wayland=$(call ptx/truefalse,PTXCONF_WESTON_GL) \
	-Dbackend-x11=false \
	-Dcolor-management-colord=false \
	-Dcolor-management-lcms=false \
	-Ddemo-clients=$(call ptx/truefalse,PTXCONF_WESTON_IVISHELL_EXAMPLE) \
	-Ddeprecated-backend-fbdev=$(call ptx/truefalse,PTXCONF_WESTON_FBDEV_COMPOSITOR) \
	-Ddeprecated-weston-launch=false \
	-Ddeprecated-wl-shell=$(call ptx/truefalse,PTXCONF_WESTON_DEPRECATED_WL_SHELL) \
	-Ddesktop-shell-client-default=weston-desktop-shell \
	-Ddoc=false \
	-Dimage-jpeg=true \
	-Dimage-webp=false \
	-Dlauncher-libseat=$(call ptx/truefalse,PTXCONF_WESTON_SEATD) \
	-Dlauncher-logind=$(call ptx/truefalse,PTXCONF_WESTON_SYSTEMD_LOGIND) \
	-Dpipewire=$(call ptx/truefalse,PTXCONF_WESTON_PIPEWIRE) \
	-Dremoting=$(call ptx/truefalse,PTXCONF_WESTON_REMOTING) \
	-Drenderer-gl=$(call ptx/truefalse,PTXCONF_WESTON_GL) \
	-Dresize-pool=true \
	-Dscreenshare=false \
	-Dshell-desktop=true \
	-Dshell-fullscreen=true \
	-Dshell-ivi=$(call ptx/truefalse,PTXCONF_WESTON_IVISHELL) \
	-Dshell-kiosk=$(call ptx/truefalse,PTXCONF_WESTON_SHELL_KIOSK) \
	-Dsimple-clients=$(subst $(space),$(comma),$(WESTON_SIMPLE_CLIENTS-y)) \
	-Dsystemd=$(call ptx/truefalse,PTXCONF_WESTON_SYSTEMD) \
	-Dtest-gl-renderer=false \
	-Dtest-junit-xml=false \
	-Dtest-skip-is-failure=false \
	-Dtools=calibrator,debug,info,terminal,touch-calibrator \
	-Dwcap-decode=$(call ptx/truefalse,PTXCONF_WESTON_WCAP_TOOLS) \
	-Dxwayland=$(call ptx/truefalse,PTXCONF_WESTON_XWAYLAND) \
	-Dxwayland-path=/usr/bin/Xwayland

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/weston.install:
	@$(call targetinfo)
	@$(call world/install, WESTON)

ifndef PTXCONF_WESTON_IVISHELL_EXAMPLE
	@install -D -m644 $(WESTON_DIR)-build/compositor/weston.ini \
		$(WESTON_PKGDIR)/etc/xdg/weston/weston.ini
else
	@install -D -m644 $(WESTON_DIR)-build/ivi-shell/weston.ini \
		$(WESTON_PKGDIR)/etc/xdg/weston/weston.ini
endif

	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/weston.targetinstall:
	@$(call targetinfo)

	@$(call install_init, weston)
	@$(call install_fixup, weston,PRIORITY,optional)
	@$(call install_fixup, weston,SECTION,base)
	@$(call install_fixup, weston,AUTHOR,"Philipp Zabel <p.zabel@pengutronix.de>")
	@$(call install_fixup, weston,DESCRIPTION,"wayland reference compositor implementation")

	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-info)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-debug)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-screenshooter)
ifdef PTXCONF_WESTON_SIMPLE_CLIENTS
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-damage)
ifdef PTXCONF_WESTON_GL
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-egl)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-dmabuf-egl)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-dmabuf-feedback)
endif
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-shm)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-touch)
endif
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-terminal)
ifdef PTXCONF_WESTON_TOUCH_CALIBRATOR
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-touch-calibrator)
endif

ifdef PTXCONF_WESTON_WCAP_TOOLS
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/wcap-decode)
endif

	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR))
	@$(call install_lib, weston, 0, 0, 0644, libweston-desktop-$(LIBWESTON_MAJOR))
ifdef PTXCONF_WESTON_XWAYLAND
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/xwayland)
endif
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/drm-backend)
ifdef PTXCONF_WESTON_HEADLESS_COMPOSITOR
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/headless-backend)
endif
ifdef PTXCONF_WESTON_FBDEV_COMPOSITOR
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/fbdev-backend)
endif
ifdef PTXCONF_WESTON_GL
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/wayland-backend)
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/gl-renderer)
endif
ifdef PTXCONF_WESTON_PIPEWIRE
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/pipewire-plugin)
endif
ifdef PTXCONF_WESTON_REMOTING
	@$(call install_lib, weston, 0, 0, 0644, libweston-$(LIBWESTON_MAJOR)/remoting-plugin)
endif
	@$(call install_lib, weston, 0, 0, 0644, weston/desktop-shell)
	@$(call install_lib, weston, 0, 0, 0644, weston/fullscreen-shell)
ifdef PTXCONF_WESTON_IVISHELL
	@$(call install_lib, weston, 0, 0, 0644, weston/ivi-shell)
endif
ifdef PTXCONF_WESTON_SHELL_KIOSK
	@$(call install_lib, weston, 0, 0, 0644, weston/kiosk-shell)
endif
ifdef PTXCONF_WESTON_SYSTEMD
	@$(call install_lib, weston, 0, 0, 0644, weston/systemd-notify)
endif
	@$(call install_lib, weston, 0, 0, 0644, weston/libexec_weston)

ifdef PTXCONF_WESTON_STARTSCRIPT
	@$(call install_alternative, weston, 0, 0, 0755, /etc/init.d/weston-init)
ifneq ($(call remove_quotes,$(PTXCONF_WESTON_BBINIT_LINK)),)
	@$(call install_link, weston, \
		../init.d/weston-init, \
		/etc/rc.d/$(PTXCONF_WESTON_BBINIT_LINK))
endif
endif

	@$(call install_copy, weston, 0, 0, 0755, -, /usr/libexec/weston-simple-im)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/libexec/weston-desktop-shell)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/libexec/weston-keyboard)


	@$(foreach image, \
		border.png \
		icon_window.png \
		pattern.png \
		sign_close.png \
		sign_maximize.png \
		sign_minimize.png \
		terminal.png \
		wayland.png \
		wayland.svg, \
		$(call install_copy, weston, 0, 0, 0644, -, /usr/share/weston/$(image))$(ptx/nl))

ifdef PTXCONF_WESTON_INSTALL_CONFIG
	@$(call install_alternative, weston, 0, 0, 0644, /etc/xdg/weston/weston.ini)
endif

ifdef PTXCONF_WESTON_IVISHELL_EXAMPLE
	@$(call install_lib, weston, 0, 0, 0644, weston/hmi-controller)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/libexec/weston-ivi-shell-user-interface)

	@$(foreach image, \
		background.png \
		fullscreen.png \
		home.png \
		icon_ivi_clickdot.png \
		icon_ivi_flower.png \
		icon_ivi_simple-egl.png \
		icon_ivi_simple-shm.png \
		icon_ivi_smoke.png \
		panel.png \
		random.png \
		sidebyside.png \
		tiling.png, \
		$(call install_copy, weston, 0, 0, 0644, -, /usr/share/weston/$(image))$(ptx/nl))

	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-clickdot)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-flower)
ifdef PTXCONF_WESTON_GL
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-egl)
endif
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-simple-shm)
	@$(call install_copy, weston, 0, 0, 0755, -, /usr/bin/weston-smoke)
endif

	@$(call install_finish, weston)

	@$(call touch)

# vim: syntax=make