You are not logged in.

#1 2025-11-28 01:05:57

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 24
Website

PKGBUILD review: vibe

Hi! I'd like to request a review of the following `PKGBUILD`:

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe
pkgver=vibe.v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers')
optdepends=(
	'vulkan-radeon: If you have an AMD GPU',
	'vulkan-intel: If you have an Intel GPU',
	'vulkan-utils: If you have a Nvidia GPU',
)
makedepends=('rust' 'git')
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

prepare() {
	cd "$pkgname"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

pkgver() {
	git -C $pkgname describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "$pkgname"

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "$pkgname"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "$pkgdir/usr/bin/" "$pkgname/target/release/$pkgname"
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" $pkgname/LICENSE
}

I'm a bit unsure if the final package name will be set by the `pkgname` variable of the `PKGBUILD` file or the repository name because I'd like the aur package to be called `vibe-audio-visualizer` to avoid collisions with other packages which have the prefix `vibe`.

Offline

#2 2025-11-28 17:21:48

killertofus
Member
Registered: 2025-02-10
Posts: 85

Re: PKGBUILD review: vibe

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-git
_pkgname=vibe
pkgver=vibe.v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
provides=($_pkgname)
conflicts=($_pkgname)

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

 build() {
    cd "${srcdir}/${_pkgname}/"

    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --release --all-features


package() {
  cd "$_pkgname"
  install -Dm755 target/release/vibe "$pkgdir/usr/bin/vibe"
}

since you are building the git version, I adapted it to build from the git version

Last edited by killertofus (2025-11-28 17:22:26)

Offline

#3 2025-11-28 19:29:50

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 24
Website

Re: PKGBUILD review: vibe

killertofus wrote:

since you are building the git version, I adapted it to build from the git version

Looks like a big adaption big_smile Could you please explain each change why you did that? Or to be more clear:

  • Why did you add `_pkgname=vibe`? Is it because `pkgname` will be resulting package name in the AUR? Like, if you'd like to install it with your AUR helper it will be like `paru -S vibe-git`?

  • Why did you remove my `optdepends` lits?

  • Why did you replace `cd "$pkgname"` with `cd "${srcdir}/${_pkgname}/"`? Wouldn't `cd $_pkgname` be sufficient?

  • Why did you remove the LICENSE copy in the `package()` function? I think it's better if it stays there.

Never the less, thank you for your review! smile

Offline

#4 2025-11-28 19:44:39

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

Re: PKGBUILD review: vibe

optdepends=(
	'vulkan-radeon: If you have an AMD GPU',
	'vulkan-intel: If you have an Intel GPU',
	'vulkan-utils: If you have a Nvidia GPU',
)

vulkan-utils is not an archlinux package, you probably meant nvidia-utils .
All vulkan driver packages (incl. nvidia-utils) on archlinux provide vulkan-driver.
If vulkan support is required, add vulkan-driver as depend .


https://github.com/TornaxO7/vibe wrote:

wgsl and glsl support for shaders

Neither of those require vulkan , but https://github.com/TornaxO7/vibe/wiki/Config mentions vulkan as recommended backend.
Does your software require vulkan or wgsl / glsl ?


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

#5 2025-11-28 19:46:24

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 24
Website

Re: PKGBUILD review: vibe

Lone_Wolf wrote:

vulkan-utils is not an archlinux package, you probably meant nvidia-utils .
All vulkan driver packages (incl. nvidia-utils) on archlinux provide vulkan-driver.
If vulkan support is required, add vulkan-driver as depend .

Do you mean like this?

depends=('vulkan-driver' ...)
Lone_Wolf wrote:

Neither of those require vulkan , but https://github.com/TornaxO7/vibe/wiki/Config mentions vulkan as recommended backend.
Does your software require vulkan or wgsl / glsl ?

Hi! My software does require a graphics API. Can be either vulkan or opengl but I recommend vulkan.

Last edited by TornaxO7 (2025-11-28 19:48:44)

Offline

#6 Yesterday 15:51:47

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 24
Website

Re: PKGBUILD review: vibe

Alright, so I applied some fixes, recommended by you and the new PKGBUILD looks now like this:

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-audio-visualizer-git
_pkgname=vibe
pkgver=vibe.v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers' 'vulkan-driver')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
provides=($_pkgname)
conflicts=($_pkgname)

pkgver() {
	git -C $_pkgname describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "${_pkgdir}/usr/bin/" "${srcdir}/${_pkgname}/target/release/${_pkgname}"
    install -Dm644 -t "${_pkgdir}/usr/share/licenses/${_pkgname}/" ${_pkgname}/LICENSE
}

I hope it's fine/better now smile

Offline

#7 Yesterday 16:05:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,242

Re: PKGBUILD review: vibe

pkgver=vibe.v2.3.0.r54.g5cceea6

From https://wiki.archlinux.org/title/VCS_pa … elines#Git "If tag contains a prefix, like v or project name then it should be cut off:" In this case, you have a very long prefix, not just the v

provides=($_pkgname)

So anything that says it requires the vibe package can use this package instead and it should work? If not, it doesn't provide that.

"${_pkgdir}/usr/bin/"

What in the world is ${_pkgdir}? This PKGBUILD wouldn't even work.

install -Dm644 -t "${_pkgdir}/usr/share/licenses/${_pkgname}/" ${_pkgname}/LICENSE

If the license needs to be installed, it needs to be to a dir named ${pkgname}, not ${_pkgname}. In this case, you shouldn't be installing it at all as it's a common license.

Offline

#8 Yesterday 16:25:39

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 24
Website

Re: PKGBUILD review: vibe

Scimmia wrote:
pkgver=vibe.v2.3.0.r54.g5cceea6

From https://wiki.archlinux.org/title/VCS_pa … elines#Git "If tag contains a prefix, like v or project name then it should be cut off:" In this case, you have a very long prefix, not just the v

Oh neat, I didn't knew there would be an article for VCS packages. Thanks!

Scimmia wrote:
provides=($_pkgname)

So anything that says it requires the vibe package can use this package instead and it should work? If not, it doesn't provide that.

hm... I see your point. I guess it's better to remove it.

Scimmia wrote:
"${_pkgdir}/usr/bin/"

What in the world is ${_pkgdir}? This PKGBUILD wouldn't even work.

Oops, sorry, my brain somehow thought I should use `pkgdir`... thank you for spotting that smile

Scimmia wrote:
install -Dm644 -t "${_pkgdir}/usr/share/licenses/${_pkgname}/" ${_pkgname}/LICENSE

If the license needs to be installed, it needs to be to a dir named ${pkgname}, not ${_pkgname}. In this case, you shouldn't be installing it at all as it's a common license.

Oh ok. Thank you for the explanation about why the license shouldn't be installed as well.

So here's the updated version:

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-audio-visualizer-git
_pkgname=vibe
pkgver=v2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers' 'vulkan-driver')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
conflicts=($_pkgname)

pkgver() {
	git -C $_pkgname describe --long --tags --abbrev=7 | sed 's/^vibe.//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "${_pkgname}/usr/bin/" "${srcdir}/${_pkgname}/target/release/${_pkgname}"
}

Offline

#9 Yesterday 16:29:42

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,242

Re: PKGBUILD review: vibe

You *do* need to use ${pkgdir}, but you used ${_pkgdir}, which doesn't exist.

And you still have the 'v' prefix in the version that needs to go.

Last edited by Scimmia (Yesterday 16:30:11)

Offline

#10 Yesterday 16:32:11

TornaxO7
Member
From: Germany
Registered: 2023-03-05
Posts: 24
Website

Re: PKGBUILD review: vibe

Scimmia wrote:

You *do* need to use ${pkgdir}, but you used ${_pkgdir}, which doesn't exist.

And you still have the 'v' prefix in the version that needs to go.

Oh... sorry. I hope that I've applied the fixes correctly now ;-;

# Maintainer: TornaxO7 <tornax(at)pm.me>
# 
# Heavily inspired by `awww`'s PKGBUILD
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=awww-git

pkgname=vibe-audio-visualizer-git
_pkgname=vibe
pkgver=2.3.0.r54.g5cceea6
pkgrel=1
pkgdesc="A desktop audio visualizer for wayland."
arch=('x86_64')
url="https://github.com/TornaxO7/vibe"
license=('AGPL-3.0-or-later')
depends=('libxkbcommon' 'alsa-lib' 'wayland' 'wayland-protocols' 'vulkan-validation-layers' 'vulkan-headers' 'vulkan-driver')
makedepends=('rust' 'git')
source=("$_pkgname::git+$url.git")
sha256sums=('SKIP')
conflicts=($_pkgname)

pkgver() {
	git -C $_pkgname describe --long --tags --abbrev=7 | sed 's/^vibe.v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo update
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable CARGO_TARGET_DIR=target
	cargo build --frozen --release --all-features
}

check() {
	cd "${srcdir}/${_pkgname}"

	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen --all-features
}

package() {
    install -Dm755 -t "${pkgdir}/usr/bin/" "${srcdir}/${_pkgname}/target/release/${_pkgname}"
}

Offline

#11 Today 09:20:30

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

Re: PKGBUILD review: vibe

--locked tells cargo to strictly adhere to the versions specified in the Cargo.lock file and prevent it from updating dependencies. This is important for reproducible builds.

That should make "cargo update" unnecessary/unwanted .


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

Board footer

Powered by FluxBB