summaryrefslogtreecommitdiff
blob: 2018ddf3135df5d3e789828a9e452a121e41c85b (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop qmake-utils udev

if [ ${PV} == "9999" ]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/psieg/Lightpack"
else
	inherit vcs-snapshot
	SRC_URI="https://github.com/psieg/Lightpack/archive/${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~x86"
fi

DESCRIPTION="Prismatik is an open-source software to control Lightpack devices"
HOMEPAGE="http://lightpack.tv"

LICENSE="GPL-3"
SLOT="0"
IUSE="pulseaudio"

BDEPEND="
	dev-qt/linguist-tools:5
	"
RDEPEND="
	dev-qt/qtcore:5
	dev-qt/qtgui:5
	dev-qt/qtnetwork:5
	dev-qt/qtserialport:5
	dev-qt/qtwidgets:5
	media-libs/mesa
	virtual/libusb:1
	virtual/udev
	x11-libs/libX11
	x11-libs/libXext"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

S="${WORKDIR}/${P}/Software"

src_prepare() {
	rm -rf qtserialport
	sed -e "/qtserialport/d" -i Lightpack.pro || die
	if use pulseaudio ; then
		cp build-vars.prf.default build-vars.prf || die
	else
		sed -e "/PULSEAUDIO_SUPPORT/d"  build-vars.prf.default > build-vars.prf || die
	fi
	default
}

src_configure() {
	eqmake5 Lightpack.pro
}

src_install() {
	newbin bin/Prismatik ${PN}

	domenu "${FILESDIR}/${PN}.desktop"

	insinto /usr/share/
	doins -r dist_linux/package_template/usr/share/{icons,pixmaps}

	udev_dorules dist_linux/package_template/etc/udev/rules.d/93-lightpack.rules
}