Is this PKGBUILD ok?
This is to package 4 binaries shipped by upstream:
$ cat PKGBUILD
# Maintainer: Strykar <strykar@xxxxx.com>
pkgname=go-livepeer-bin
_pkgname=go-livepeer
pkgver=0.5.21
pkgrel=1
pkgdesc='Official Go binaries of the Livepeer protocol'
arch=('i686' 'x86_64')
url='https://github.com/livepeer/go-livepeer'
license=('MIT')
source=('git+git://github.com/livepeer/go-livepeer')
depends=('go')
conflicts=('go-livepeer-git')
provides=('go-livepeer-bin')
source=("https://github.com/livepeer/${_pkgname}/releases/download/v${pkgver}/livepeer-linux-amd64.tar.gz"
"livepeer.service"
"go-livepeer.sysusers")
sha256sums=('aa966e0af5599faf04d1c9334da36f59e3f6007ca23fc0f21c7c2379b998f0e4'
'130e1414682072cee2e3f1b0ad5699e1c8a0d8dd54933861a83ad3a432f5c812'
'9289d0f301b742cae2f1875266e7b30fde546d30235814ce058261dc5b4e1378')
_uid_livepeer=383
_gid_livepeer=383
package() {
install -Dm 755 "${srcdir}/livepeer-linux-amd64/livepeer" "$pkgdir/usr/bin/${_pkgname}"
install -Dm 755 "${srcdir}/livepeer-linux-amd64/livepeer_bench" "$pkgdir/usr/bin/${_pkgname}"
install -Dm 755 "${srcdir}/livepeer-linux-amd64/livepeer_cli" "$pkgdir/usr/bin/${_pkgname}"
install -Dm 755 "${srcdir}/livepeer-linux-amd64/livepeer_router" "$pkgdir/usr/bin/${_pkgname}"
install -Dm 644 "$srcdir/livepeer.service" -t "${pkgdir}/usr/lib/systemd/system"
}
Should I be renaming the tar.gz?
Edited 30 Sep 2021. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 7 · 89% up
- Kind
- Text
- ID
- pycsst
43 comments
Off the top of my head:
sourcelines, only one is correctprovidesyour own package namegodependency, Go binaries are self-containedinstallcommands overwrite each other.sysusersfile_uid_livepeerand_gid_livepeervariables are never usedThanks a ton, does this look better: https://gist.github.com/Strykar/8fea971e4a6b2029c3e9100950647938
/usr/share/licenses/$pkgname/directory (see the PKGBUILD wiki page)Also, quoting still kind of all over the place, sysusers file still not installed, and I want to see your unit file too.
If only there was a beautiful wiki explaining it all including do's and don'ts: https://wiki.archlinux.org/title/creating_packages
Also try running makepkg locally. You'll see if it works or not, for a start. Also read the wiki and see PKGBUILDs from other packages on AUR to see how things are usually done.