summaryrefslogtreecommitdiffstats
path: root/core/modules/virt-viewer/module.build
blob: 9c5e89e29fcc4b7f418bb9279435e36f36cb5be0 (plain) (blame)
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
#!/bin/bash
fetch_source() {
	autoclone
}

build() {
	local SRCDIR="${MODULE_WORK_DIR}/src/virt-viewer"
	local DSTDIR="${MODULE_BUILD_DIR}"
	cde "${SRCDIR}"

	# install meson (>= 0.54.0) since packaged version is too old
	pip3 install "meson>=0.54.0"

	meson build \
		--prefix="/usr" \
		--sysconfdir="/etc" \
		--localstatedir="/var" \
		-Dovirt=disabled \
		-Dspice=enabled \
		-Dvnc=enabled \
		-Dlibvirt=enabled || perror "'meson' failed."
	ninja -v -C build || perror "'ninja' failed."
	DESTDIR="${DSTDIR}" ninja -v -C build install || perror "'ninja install' failed."
}

post_copy() {
	:
}