You are not logged in.

#1 2017-02-10 18:07:12

Observer
Member
Registered: 2016-03-01
Posts: 16

PKGBUILD review request: hue-plus-git

Hi,

can someone review my first PKGBUILD please? That would be great, thank you very much! smile

_pkgname=hue-plus
pkgname=hue-plus-git
pkgver=r49.87080b1
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')
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 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"
}
logic@control ~/Desktop/hue-plus/git % namcap hue-plus-git-r49.87080b1-1-any.pkg.tar.xz         
hue-plus-git W: Dependency included and not needed ('python-pyserial')

Offline

#2 2017-02-12 04:02:15

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD review request: hue-plus-git

Well, is there any good reason these python modules are being installed to /opt rather than being properly installed to, say, /usr/lib/python3.6/site-packages/ ???
If the problem is knowing the major.minor version of the current python installation, consider asking the upstream developer to use a setup.py installer (assuming they aren't yet using one).

Even in situations where site-packages is for some reason not workable, /usr/share/${pkgname}/ is preferable to /opt as /opt is nonstandard and used as a last resort for software that doesn't really fit anywhere and uses a completely self-contained, relocatable set of dependencies.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB