You are not logged in.

#1 2019-03-27 03:19:29

Cloud_Ninja
Member
Registered: 2019-03-09
Posts: 10

PKGBUILD review request

I've just created a pkgbuild for https://hg.sr.ht/~scoopta/rootbar and i'm wondering if there's anything seriously wrong that i should change.

https://hastebin.com/raw/sizebikenu

The hastebin link is the pkgbuild.

Offline

#2 2019-03-27 03:49:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: PKGBUILD review request

Major thing that's wrong is using "../pkg/${pkgname}/usr/bin". $pkgdir is defined for a reason. Using install there would be better as well.

echo in the pkgver function is useless.

'cd ..' is useless in the build function.

Offline

#3 2019-03-27 04:01:10

Cloud_Ninja
Member
Registered: 2019-03-09
Posts: 10

Re: PKGBUILD review request

Scimmia wrote:

Major thing that's wrong is using "../pkg/${pkgname}/usr/bin". $pkgdir is defined for a reason. Using install there would be better as well.

echo in the pkgver function is useless.

'cd ..' is useless in the build function.


Got rid of the useless echo and cd, honestly forgot about the echo.
Got rid of the nonsense with ../pkg/
Also changed the pkgver because i found proper VCS versioning guidelines
https://hastebin.com/raw/utitewirib

My main question is how i should be maintaining it. Will this automatically pull the latest every time anyone goes to check for updates with their aur manager?

Offline

#4 2019-03-27 08:37:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,671

Re: PKGBUILD review request

pkgname should have a -hg suffix. People often define some helper variable like _pkgname to refer to the non suffixed base name if necessary. People rebuilding the PKGBUILD with whatever means will pull in the latest commits, you yourself would only need to upload a new version if there's a change in the build process that would necessitate a change to the PKGBUILD. (e.g. a change in dependencies, a switch to another build system from make or so)

Last edited by V1del (2019-03-27 08:38:16)

Online

#5 2019-03-27 11:25:47

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: PKGBUILD review request

https://hg.sr.ht/~scoopta/rootbar wrote:

Root Bar is a bar for wlroots based wayland compositors such as sway

Looks like wlroots should be a dependency


Will this automatically pull the latest every time anyone goes to check for updates with their aur manager?

Never seen such a beast, guess you mean aur helper ?

probably not, but it depends on how their aur helper deals with vcs packages.
Aur package maintainers should focus on making things work with makepkg, not aur helpers


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2019-03-27 12:48:24

loqs
Member
Registered: 2014-03-06
Posts: 17,326

Re: PKGBUILD review request

0252d72435277f86592e26f67d9028e343dcf8a9 does not build due to missing src/volume.c pinning to revision 63ee1eed0bfc9fbfc033b422b2599f0dffdffe63
From namcap

Checking PKGBUILD
PKGBUILD (rootbar) W: Missing Maintainer tag
Checking rootbar-r98.63ee1eed0bfc-1-x86_64.pkg.tar.xz
rootbar W: ELF file ('usr/bin/rootbar') lacks FULL RELRO, check LDFLAGS.
rootbar W: Unused shared library '/usr/lib/libpulse.so.0' by file ('usr/bin/rootbar')
rootbar W: Unused shared library '/usr/lib/libgdk_pixbuf-2.0.so.0' by file ('usr/bin/rootbar')
rootbar W: Unused shared library '/usr/lib/libpulse-mainloop-glib.so.0' by file ('usr/bin/rootbar')
rootbar W: Dependency wayland included but already satisfied
rootbar W: Dependency json-c included but already satisfied

Fixing the makefile / *.mk to use LDFLAGS and preferably CFLAGS plus CPPFLAGS should resolve the FULL RELRO and unused shared library warnings (although upstream does not need to link to shared libraries it does not use).

Offline

Board footer

Powered by FluxBB