[aur-general] Request to check my PKGBUILD and suggest me some improvements
patrickeigensatz at gmail.com
Tue Aug 16 10:54:35 UTC 2016
Am 15.08.2016 02:57 schrieb "Eli Schwartz via aur-general" <
aur-general at archlinux.org>:
> On 08/13/2016 03:47 PM, Patrick Eigensatz via aur-general wrote:
> > Then I read I could ask here for suggestions and improvements.
> > Is there something I didn't do which is e.g. a good habit? Or did I
> > something that I shouldn't have done?
> Including the feedback you have already received, it looks pretty good
> But I would note a couple additional things:
> gcc-libs is part of the base group, and gcc is part of base-devel.
> Neither should ever be listed as depends (or makedepends, respectively),
> since it is assumed all users have gcc-libs installed and gcc is a
> prerequisite to running makepkg.
> I don't usually see people running shellscripts using `sh $shellscript`
> -- it is usually `./$shellscript`.
> It really makes no difference (practical or otherwise) except for
> looking odd...
> As Florian Bruhnin said, md5sums is not needed, you only need one
> checksum validation. The tools for every validation method (or anything
> else built into makepkg itself) will always be required for makepkg via
> the base/base-devel or pacman dependencies. In addition to the most
> common build tools like gcc/make/patch/autotools/libtool.
> sha256sums is always superior to legacy md5sums so stick with that.
> If you want to further variableize your PKGBUILD, you can use $pkgname
> in the url as well, I usually do. (Sometimes this will allow a lot more
> copy-pasting of existing PKGBUILDs, the rest of the time it just
> highlights the relationship between the pkgname and the upstream url.)
> This really is just a style preference though.
> Eli Schwartz
Thank you for explaining this to me! namcap showed gcc-libs-multilib as a
dependency. I chose to add gcc-libs but I did not know it would already be
installed as a prerequisite. Maybe this is something in namcap we could
I'll remove the md5sums soon, so I'll stick to sha256. Also I'll try to
variableize the url etc. as well - seems legit to me to take this PKGBUILD
as a template for further projects.
I usually do run my shellscripts via ./ too, but when I experimented with
makepkg I experienced some errors and I wasn't sure if makepkg would know
how to interpret ./ so I wrote sh. I'll change this back soon.
Indeed, although my autogen script is so simple it probably wouldn't even
matter if you run it with bash or only sh. If extracted correctly out of
the source .tar.gz the executable bit should already have been set.
More information about the aur-general