summaryrefslogtreecommitdiffstats
path: root/core/modules/pvs2/module.build
blob: b7ccfa47c9e3e2a941f210dc23be9ca84d9fb317 (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
29
30
31
32
33
34
35
#!/bin/bash

fetch_source() {
	git clone "${REQUIRED_GIT}" src
}

build() {

	local SRCDIR="${MODULE_WORK_DIR}/src/"
	local BUILDDIR="$SRCDIR/build/"
	local DESTDIR="$MODULE_BUILD_DIR/opt/openslx/bin"

	# first activate qt 4
	activate_qt 4

	mkdir -p "$DESTDIR" || perror "Could not mkdir $DESTDIR!"
	mkdir -p "$BUILDDIR" || perror "Could not mkdir $BUILDDIR!"
	cd "$BUILDDIR" || perror "Could not cd to $BUILDDIR!"

	pinfo "Running cmake"
	cmake .. || perror "'cmake ..' failed."
	pinfo "Running make"
	make || perror "'make' failed."
	mv pvsmgr pvsclient $DESTDIR
	cd - > /dev/null

	# needed for copying REQUIRED_CONTENT_PACKAGES to build/
	COPYLIST="list_dpkg_output"
	[ -e "$COPYLIST" ] && rm "$COPYLIST"
	list_packet_files >> "$COPYLIST"
	tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
}
post_copy() {
	:
}