You are not logged in.

#1 2026-02-13 07:39:01

Everything2067
Member
Registered: 2025-06-29
Posts: 104

I need a review for my PKGBUILD

This is my first PKGBUILD for the browser extension Plasma Integration:

# Maintainer: Everything2067 <anand shaurya at proton dot me>
pkgname=librewolf-extension-plasma-integration-bin
pkgver=2.1
pkgrel=1
pkgdesc="Plasma Integration extension for LibreWolf"
arch=(any)
url="https://addons.mozilla.org/en-US/firefox/addon/plasma-integration"
license=('GPL-3.0-only')
groups=(librewolf-addons)
depends=(librewolf)
provides=(librewolf-extension-plasma-integration)
conflicts=(librewolf-extension-plasma-integration)
_filename=plasma-browser-integration@kde.org.xpi
source=("$_filename::https://addons.mozilla.org/firefox/downloads/file/4614817/plasma_integration-2.1.xpi")
noextract=("$_filename")
sha256sums=(35bfa3766e097160e74f525bde54d97bbba90d725daa425b9de6fef6ec5e9d44)

package() {
	install -Dm 644 "$_filename" "$pkgdir/usr/lib/librewolf/browser/extensions/$_filename"
}

I have checked and corrected any errors in the PKGBUILD using namcap and shellcheck. Please check for any more errors.
Also, the package plasma-browser-integration is a backend for this extension. Without this backend, the extension is useless. So should I put this in optdepends or depends?


How it feels to run shred/wipe in a COW system

Offline

#2 2026-02-13 11:01:18

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

Re: I need a review for my PKGBUILD

source=("$_filename::https://addons.mozilla.org/firefox/downloads/file/4614817/plasma_integration-2.1.xpi")

Renaming a file without a version in makes updates more difficult.  Just use the proper filename and the ${pkgver} variable.

Offline

#3 2026-02-13 11:55:25

Luciddream
Member
From: Greece
Registered: 2014-12-08
Posts: 72

Re: I need a review for my PKGBUILD

Also check that you are using spaces and not tabs for indentations, I think there is a bug in pacman for tabs inside the dependencies array, but I didn't have time to replicate it and report it. And there is no mention in the wiki about not using tabs, so it's easy to miss.

edit: for anyone that wants to take a look into that, this initial commit triggered that (possible) bug.

Last edited by Luciddream (2026-02-13 14:43:57)

Offline

#4 2026-02-13 13:50:46

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

Re: I need a review for my PKGBUILD

That has nothing to do with this PKGBUILD. Don't hijack threads.

Offline

#5 2026-02-13 13:54:58

Luciddream
Member
From: Greece
Registered: 2014-12-08
Posts: 72

Re: I need a review for my PKGBUILD

Scimmia wrote:

That has nothing to do with this PKGBUILD. Don't hijack threads.

Of course it does. He is using a tab character in this PKGBUILD. I'm providing tips and an example to support my tip.

Offline

#6 2026-02-13 13:57:25

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

Re: I need a review for my PKGBUILD

Nowhere in that PKGBUILD do they have a tab in any array. The depends array which you say is the problem has a single entry.

The only tab here is in the package function, where there's no way it could be a problem. I seriously doubt your entire issue, as you say there's a bug in pacman, but pacman never sees a PKGBUILD at all.

Offline

#7 2026-02-13 14:02:47

Luciddream
Member
From: Greece
Registered: 2014-12-08
Posts: 72

Re: I need a review for my PKGBUILD

Scimmia wrote:

Nowhere in that PKGBUILD do they have a tab in any array. The depends array which you say is the problem has a single entry.

The only tab here is in the package function, where there's no way it could be a problem. I seriously doubt your entire issue, as you say there's a bug in pacman, but pacman never sees a PKGBUILD at all.

Yes, but the only reason there isn't a tab in the depends array is it only has one dependency. And a tab character is allowed by makepkg. I don't see why me suggesting that is that big of an issue. Anyway, I don't have all day to argue. Have a good day

Offline

#8 2026-02-13 17:36:43

Everything2067
Member
Registered: 2025-06-29
Posts: 104

Re: I need a review for my PKGBUILD

Also check that you are using spaces and not tabs for indentations

I think there is a bug in pacman for tabs inside the dependencies array

Which one is it?
A tab in the package() function was already present in the PKGBUILD.proto file. I did not have a problem in running makepkg.

Also, the package plasma-browser-integration is a backend for this extension. Without this backend, the extension is useless. So should I put this in optdepends or depends?

Please answer this too.

Last edited by Everything2067 (2026-02-13 17:37:31)


How it feels to run shred/wipe in a COW system

Offline

#9 2026-02-13 17:43:14

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

Re: I need a review for my PKGBUILD

Ignore everything Luciddream said.

As for plasma-browser-integration, if the extension is useless without it, it's a dep. If it can be used with other backends, it's an optdep.

Offline

Board footer

Powered by FluxBB