You are not logged in.

#1 2022-08-18 21:58:07

ChilledTonic
Member
Registered: 2021-12-18
Posts: 6

[SOLVED] PKGBUILD review request: kaarten-deno

Hi all,

Working on building a PKGBUILD for a small project I administer. It's written in deno; source files below.
https://git.sr.ht/~tonic/kaarten-deno

Here's the pkgbuild:

#Maintainer: Alex S. <alex at panoptic dot onl>
pkgname=kaarten-deno
pkgver=0.2.2
pkgrel=1
pkgdesc="A Kaarten is a digital csv database which supplements your analog notebook."
arch=('x86_64')
url="https://git.sr.ht/~tonic/kaarten-deno"
license=('MIT')
makedepends=(deno)
source=($pkgver.tar.gz::"https://git.sr.ht/~tonic/kaarten-deno/archive/v$pkgver.tar.gz")
sha256sums=('4c35ae8b3d310d5e8fa2527a62501b7ccd4e9d3fa46b7456de3c14731b4cb8f9')
build() {
	cd "$srcdir/kaarten-deno-v$pkgver"
	deno compile --reload --output "../kaarten" --target x86_64-unknown-linux-gnu --allow-read --allow-write kaarten.ts
}
package() {
	cd "$srcdir"
	install -Dm777 kaarten "$pkgdir/usr/bin/kaarten"
}

There's a very bizarre issue I'm facing that I can't make heads or tails of - the compile process in build() works - but it breaks in package(). If I run the outputted binary in the src/ folder, it executes properly - however if I try to install the outputted package, or run the binary after it's been "installed" to the pkg/ directory, the same file now drops directly to the deno runtime - as if I had simply executed "deno" with no arguments, instead of running my compiled script.

Can anyone give me pointers on what I'm doing wrong, or how to find out what I'm doing wrong?

Thanks in advance.

Update 1: The installed package is 30MB smaller then the full binary; which may explain something. What isn't explained yet is why this filesize drop only happens in the false root, not when I "install" the binary manually.

Update 2: Enabling !strip in options() allows the package to be moved normally. Unsure what flags makepkg is stripping that causes it to fail; but it mangles the binary file.

Last edited by ChilledTonic (2022-08-19 01:05:01)

Offline

Board footer

Powered by FluxBB