First of all, the former PKGBUILD was installing to /usr/local.
I have changed the meson line in prepare() into
    meson setup build --prefix=/usr

Ralf Mardorf <[email protected]> wrote:

> On Sun, 2026-10-25 at 04:57 +0100, Ralf Mardorf wrote:
> > On Sat, 2026-10-24 at 22:37 +0000, [email protected] wrote:
> > > pkgname="${_pkgname}"
> >   pkgname="${_pkgname}.git"
> Oops!       "${_pkgname}-git" ;)

I have also removed empty lines, so line 30 is not what it was before.
The addition of -git to pkgname doesn't work.
    PKGBUILD: line 30: cd: northstar-web-browser-git: No such file or directory
    ==> ERROR: A failure occurred in build().
        Aborting...

Am I right the reason for the _variables is to override makepkg internal 
variables?
Am I right such override is not encouraged because makepkg may change its usage 
of 
internal variables? Is there a better way to package a project from git?

Anyway, I have noticed now there is a more traditional source.tar.gz. My latest
PKGBUILD is:
Skipping the chksum for the source because I didn't see if/where it is 
published. 

pkgname=northstar-web-browser
pkgver=1.0.16
pkgrel=1
pkgdesc="A minimalist web browser written from scratch in C"
arch=('x86_64')
url="https://nordstjernen.org/northstar-browser/";
license=('GPL-3.0-or-later')
depends=('gtk4' 'uchardet')
makedepends=('meson' 'cmake')
options=('!debug' 'strip')
source=( 
"${pkgname}-${pkgver}.tar.gz::https://github.com/nordstjernen-web/${pkgname}/archive/refs/tags/${pkgver}.tar.gz";
 )
sha256sums=('SKIP')

prepare() {
  cd "${pkgname}-${pkgver}"
  meson setup build --prefix=/usr
}

build() {
  cd "${pkgname}-${pkgver}"
  meson compile -C build
}

package() {
  cd "${pkgname}-${pkgver}"
  DESTDIR="$pkgdir" meson install -C build
}

# vim: set ts=2 sw=2 et:

Reply via email to