[aur-general] AUR Best Practice for New Package Upload

Nuno Araujo nuno.araujo at russo79.com
Tue Sep 16 11:42:24 UTC 2014

> To be clear, this program, for which I am trying to build my first AUR PKGBUILD (bear with me please, still learning) is NOT a python package or library.
> So perhaps a setup.py may not necessarily be needed or relevant in this case. (I could be wrong.)

There is no obligation to have a setup.py.
Usually, when it is provided by upstream, it is used to ease the
installation process.

> Right now, personally, on my box, I have the package as so (I just downloaded it since it is self-contained, there is nothing to build; and am just running it from there):
> [...]

This is not the best approach. Usually /opt is used for *large*
self-contained packages.

> *The program is self-contained.*
> In each of /opt/MassHash/python2/ and /opt/MassHash/python3/ there are 2 executables: masshash for the CLI and masshash-launcher to launch the program with the GTK+ GUI.

Since it's an application and not a library, one should only install the
python3 version of the scripts, since this is the default version of
python in ArchLinux now.

> So looking at <https://wiki.archlinux.org/index.php/Python_Package_Guidelines> I am not sure this applies here.
> And looking at <https://wiki.archlinux.org/index.php/Arch_Packaging_Standards#Directories> 
> one idea would be to install as such:
> /usr/share/program/
> /usr/share/program/data/
> /usr/share/masshash/data/masshash-launcher.glade
> /usr/share/masshash/data/masshash-launcher.svg
> /usr/share/masshash/python3/
> /usr/share/masshash/python3/masshash
> /usr/share/masshash/python3/masshash-launcher
> /usr/share/doc/
> /usr/share/doc/masshash/AUTHORS
> /usr/share/doc/masshash/COPYING
> /usr/share/doc/masshash/README.md
> Then the PKGBUILD script creates another script or symlink which is placed in /usr/bin

You're not far from truth. I would install masshash and
masshash-launcher directly in in /usr/bin.
No need for the symlinks.

I wouldn't install the README.md and the AUTHORS file.
Usually, those files belong to the source archive and are not deployed.
However, you can as well put them in /usr/share/doc/masshash if you

I would also add a .desktop file to allow the mashhash-launcher to be
run from your desktop environment without having to open a terminal for
And finally, I would create a split package for this application. One
for the console application only and one for the GUI. 

> Would either /opt or /usr/share as above work or do you guys confirm that, according to AUR packaging standards it should have a setup.py ?
> (Johannes has already told me not to use /opt but I had not given the full data previously. Johannes, based on the additional info given here, feel free to confirm your earlier recommendation; or change it, as the case may be.)

No /opt for your package ;)

> Guys, please also, let me know if the AUR forum might be better suited for this discussion and if so, I will move it there.
> Thanks a lot for your feedback and patience.

For the exercice, I packaged the application, and you can find the
result here [1] (in the masshash directory).
Feel free to inspire yourself, or simply to take it as it is if you
Try to study it and feel free to ask any questions you want about it.


Nuno Araujo <nuno.araujo at russo79.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.archlinux.org/pipermail/aur-general/attachments/20140916/f88cde63/attachment.asc>

More information about the aur-general mailing list