You are not logged in.
Hi, I wanted to create a PKGBUILD for my binary file, which runs like normal when i do './my-binary-file'. I am not very deep into the Arch
Building System, but have done some research. I have came up with this basic PKGBUILD:
pkgname=myname
pkgver=1.4.0
pkgrel=1
pkgdesc='description'
arch=(any)
license=(MIT)
depends=('nodejs' 'npm')
source=(https://github.com/hyperonecom/h1-cli/releases/download/v$pkgver/h1-linux)
sha1sums=(783aeaf89aa19b7c52c7ad5103186cfeaccf8342)
package() {
cd $srcdir
install -Dm755 h1-linux $pkgdir/usr/local/bin/h1-linux
}
and the installations goes without any errors. However when I try to run the newly created file in the /usr/local/bin, I get this error:
Pkg: Error reading from file.
After searching it on the web, I got absolutely nothing, so that's why I ask here. What have I done wrong and how to get this working?
Thank you, John.
Offline
sounds like a problem with the binary itself.
Anyway, packages can't put things in /usr/local/.
Offline
But the package is totally fine, when using it directly without installation of PKGBUILD.
Offline
Ok, this was actually a problem with the package. I had to disable unneeded symbols stripping in the options and now it works fine.
Offline
There are countless problems with that PKGBUILD. Some of them are obvious that you are just putting placeholders that you will fix later, many others are not so obvious whether you'd be aware of the problem. Make an effort, then post your actual draft if you want feedback.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
You won't have issues with binary stripping, if you follow the standard, recommended route and build from source using the system nodejs package rather than using some questionable utility to append it to a prebuilt nodejs executable.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline