summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 73971ba68f2434c3ee61f818826da1846792e87e (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
_pkgname=hue-plus
pkgname=hue-plus-git
pkgver=r66.23d127e
pkgrel=1
pkgdesc="A Linux driver in Python for the NZXT Hue+"
arch=('any')
url="https://github.com/kusti8/hue-plus"
license=('GPL3')
depends=('python-pyserial')
optdepends=('zenity: gui support'
			'python-pyqt5: gui support'
)
makedepends=('git')
provides=('hue-plus')
source=('git+https://github.com/kusti8/hue-plus.git')
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_pkgname}"

	# Get the version number
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	cd "${srcdir}/${_pkgname}"

	install -d "${pkgdir}/opt/${_pkgname}"
	install -Dm755 hue.py "${pkgdir}/opt/${_pkgname}/hue.py"
	install -Dm755 picker.py "${pkgdir}/opt/${_pkgname}/picker.py"
	install -Dm755 hue-ui.py "${pkgdir}/opt/${_pkgname}/hue-ui.py"
	install -Dm755 hue-gui.ui "${pkgdir}/opt/${_pkgname}/hue-gui.ui"
	install -Dm755 hue_gui.py "${pkgdir}/opt/${_pkgname}/hue_gui.py"
	install -Dm755 previous.py "${pkgdir}/opt/${_pkgname}/previous.py"
	install -Dm755 previous.p "${pkgdir}/var/lib/${_pkgname}/previous.p"

	install -d "${pkgdir}/usr/bin"
	ln -s "/opt/${_pkgname}/hue.py" "${pkgdir}/usr/bin/hue"
	ln -s "/opt/${_pkgname}/picker.py" "${pkgdir}/usr/bin/hue-picker"
	ln -s "/opt/${_pkgname}/hue-ui.py" "${pkgdir}/usr/bin/hue-ui"
}