You are not logged in.

#1 2025-10-10 20:40:18

WaiRo
Member
Registered: 2025-01-02
Posts: 8

[SOLVED] PKGBUILD testing, errors with pkgctl build

The package itself works on my machine.

Here's the PKGBUILD:

# Maintainer: WaiRo <wairo@cock.li>
_pkgname="vibra"
pkgname="$_pkgname-git"
pkgver=r312.5ff95ed
pkgrel=1
pkgdesc="A library and CLI tool for music recognition using the unofficial Shazam API"

arch=("x86_64" "aarch64")
url="https://github.com/BayernMuller/$_pkgname"
license=("GPL-3.0-only")

depends=(
    "fftw"
    "curl"
    "glibc"
    "gcc-libs"
)
makedepends=(
    "git"
    "cmake"
    "bc"
    "jq"
    "ffmpeg"
)
optdepends=(
    "ffmpeg: support for audio formats other than WAV"
)

provides=("$_pkgname")
conflicts=("$_pkgname")

source=("git+$url.git")
sha256sums=("SKIP")

pkgver() {
    cd "$srcdir/$_pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/$_pkgname"
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
        -Wno-dev
    cmake --build build
}

check() {
    cd "$srcdir/$_pkgname/tests"
    PATH="$srcdir/$_pkgname/build/cli:$PATH" ./test.sh
}

package() {
    cd "$srcdir/$_pkgname"
    cmake --install build
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}

I don't understand how to fix the target not found error, and also do I have to do anything about the vibra-git-debug warnings?

==> Running checkpkg
error: target not found: vibra-git
==> WARNING: Skipped checkpkg due to missing repo packages
Checking vibra-git-debug-r312.5ff95ed-1-x86_64.pkg.tar.zst
vibra-git-debug W: Directory (usr/src/debug/vibra-git/vibra/build/lib) is empty
vibra-git-debug W: Directory (usr/src/debug/vibra-git/vibra/build/cli) is empty

Another thing, I want to ask is, should I keep the testing, it requires me to add 'bc', 'jq' and 'ffmpeg' as makedepends, it also requires internet access.

Also is it fine to have 'gcc-libs' and 'glibc' in the dependencies. 'pkgctl build' gave me warnings about those.

Last edited by WaiRo (2025-10-11 09:35:53)

Offline

#2 2025-10-10 23:02:48

yochananmarqos
Member
Registered: 2020-02-05
Posts: 217

Re: [SOLVED] PKGBUILD testing, errors with pkgctl build

For the build flag, use:

    -DCMAKE_INSTALL_PREFIX='/usr'

For the install command, use:

    DESTDIR="$pkgdir" cmake --install build

See Cmake package guidlelines for more info.

Last edited by yochananmarqos (2025-10-10 23:03:11)

Offline

#3 2025-10-10 23:07:15

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,580
Website

Re: [SOLVED] PKGBUILD testing, errors with pkgctl build

WaiRo wrote:

I don't understand how to fix the target not found error, and also do I have to do anything about the vibra-git-debug warnings?

==> Running checkpkg
error: target not found: vibra-git
==> WARNING: Skipped checkpkg due to missing repo packages
Checking vibra-git-debug-r312.5ff95ed-1-x86_64.pkg.tar.zst
vibra-git-debug W: Directory (usr/src/debug/vibra-git/vibra/build/lib) is empty
vibra-git-debug W: Directory (usr/src/debug/vibra-git/vibra/build/cli) is empty

Both those are nothing to worry about - the "missing repo package" is for a check done when building packages that are in Arch repos.  Your package is not, so pkgctl can not check for changed files.   The empty directories are fairly meaningless for the debug package.

Offline

#4 2025-10-10 23:14:42

loqs
Member
Registered: 2014-03-06
Posts: 18,629

Re: [SOLVED] PKGBUILD testing, errors with pkgctl build

    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"

Not required for common license GPL-3.0-only.

Offline

#5 2025-10-11 08:41:47

WaiRo
Member
Registered: 2025-01-02
Posts: 8

Re: [SOLVED] PKGBUILD testing, errors with pkgctl build

loqs wrote:
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"

Not required for common license GPL-3.0-only.

Is there a list for common licenses?

And also, if I were to have a license,  is it correct to use the full package name, or should I have to use just 'vibra', without '-git' suffix?

Offline

#6 2025-10-11 10:26:09

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,310

Re: [SOLVED] PKGBUILD testing, errors with pkgctl build

https://wiki.archlinux.org/title/PKGBUILD#license

Use the full $pkgname as vibra & vibra-git are 2 different packages and both need their license to be present .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2025-10-11 20:48:22

WaiRo
Member
Registered: 2025-01-02
Posts: 8

Re: [SOLVED] PKGBUILD testing, errors with pkgctl build

Thanks, also I'm assuming since this is GPLv3, I don't have to copy over the license from the repo, and just defining it in the PKGBUILD is fine?

Edit: actually ignore this, I had a brain fart, and forgot what I read previously

Last edited by WaiRo (2025-10-11 20:51:06)

Offline

Board footer

Powered by FluxBB