You are not logged in.

#1 2019-01-08 21:12:28

okonek83
Member
Registered: 2016-10-21
Posts: 11

PKGBUILD for a binary (?) file.

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

#2 2019-01-08 21:14:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: PKGBUILD for a binary (?) file.

sounds like a problem with the binary itself.

Anyway, packages can't put things in /usr/local/.

Offline

#3 2019-01-08 21:18:02

okonek83
Member
Registered: 2016-10-21
Posts: 11

Re: PKGBUILD for a binary (?) file.

But the package is totally fine, when using it directly without installation of PKGBUILD.

Offline

#4 2019-01-08 21:46:09

okonek83
Member
Registered: 2016-10-21
Posts: 11

Re: PKGBUILD for a binary (?) file.

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

#5 2019-01-08 22:15:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: PKGBUILD for a binary (?) file.

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

#6 2019-01-09 00:15:06

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

Re: PKGBUILD for a binary (?) file.

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

Board footer

Powered by FluxBB