[aur-general] Request to check my PKGBUILD and suggest me some improvements

Alad Wenter alad at archlinux.info
Sat Aug 13 19:55:40 UTC 2016


Op 13.08.2016 om 21:47 schreef Patrick Eigensatz via aur-general:
> Hello folks!
>
> I am a beginner in Arch packaging but I just came to a stable point writing
> my small systemd journal analyzer and beeing a Arch user for some years now
> I thought it would
> be a good exercise for me to write a PKGBUILD for my program and try to
> upload it to the AUR.
>
> It is now online @ https://aur.archlinux.org/packages/qjournalctl/
>
>
> I followed the wiki guidelines
>  @
> https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages
>
> I read myself into the
>  @ https://wiki.archlinux.org/index.php/Arch_packaging_standards
> and into
>  @ https://wiki.archlinux.org/index.php/PKGBUILD
>
> and I tried to follow all the suggestions there and I kept my PKGBUILD as
> tiny
> as possible.
>
> I also runned namcap to check my PKGBUILD respectively the generated
> package.
> As I had some dependencies (namely qt5-base and gcc-multilibs) I listed
> them in the PKGBUILD.
>
>
> I tried to have a look at other PKGBUILDs as well and to compare it to mine
> but I could not find something which would really differ from my first
> trial.
>
> 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?
>
>
> I hope some experienced AUR packagers / TUs can give me a few points I can
> work on. Feel free to give me feedback on my program as well! ;)
>
>
> Thank you very much!
> Patrick

- Remove the "This is an example" text at the top

- Quote $pkgdir so the build doesn't fail in directories with spaces

- The -jX option is already set in MAKEFLAGS, see makepkg.conf

- "install" is commonly used over "cp", as it has more options such as
setting permissions

- If you use double quotes in the source array, you can substitute
variables such as $url

People also tend to substitute $pkgname and $pkgver, so all they have to
do on an update is change those variables. I'd say this is a thing of
preference, though.

Alad


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20160813/f2bf5b9b/attachment.asc>


More information about the aur-general mailing list