Skip to content

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.

7 points43 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
7 · 89% up
Kind
Text
ID
pycsst

Author

16
posts
357
comments
2
media
View profile

43 comments

Off the top of my head:

  • you have two source lines, only one is correct
  • you're exclusively downloading amd64 binaries, but declaring i686 support
  • you don't need to provides your own package name
  • you don't need the go dependency, Go binaries are self-contained
  • your install commands overwrite each other
  • you never install the .sysusers file
  • the _uid_livepeer and _gid_livepeer variables are never used
  • be consistent about quoting or not quoting variable names
12 points
2 points

Also, quoting still kind of all over the place, sysusers file still not installed, and I want to see your unit file too.

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.