You are not logged in.

#1 2013-04-22 06:42:03

Addle
Member
Registered: 2013-04-22
Posts: 2

Critique requested for first package (QMentat)

I wrote a program to practice mental arithmetic, and I've just finished what I hope is a not too terrible attempt at making a PKGBUILD for it. I would greatly appreciate any critiques, pointers, etc. No warnings or errors shown from running namcap, and I paid close attention to the docs, so hopefully it's not too bad.

The PKGBUILD file is here: https://gist.github.com/RealGrep/5432464

The actual program's home page is here: http://realgrep.github.io/QMentat/

Please note that the warnings from a Qt header file when building are an issue with Qt uncovered by gcc 4.8.x, not my program.

Thanks.

Offline

#2 2013-04-22 11:16:51

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Critique requested for first package (QMentat)

You shouldn't need to mkdir in the build and package functions (which solves the need for awkward "../foo" calls), nor should you have to manually clear .git files. Other than that, it seems fine.
As for gmp, it is assumed that the package groups 'base' and 'base-devel' are installed, thus there is no need to add depends on stuff like compilers.

Here's the PKGBUILD with the small tweaks applied: http://ix.io/5hH/sh

I'm not so sure about how it's installing the LICENSE though. That might be passable, although, you could remove it for a little more space saving (since GPL3 is already in /usr/share/license)

`tree -a' => http://ix.io/5hF

Last edited by Earnestly (2013-04-22 11:20:43)

Offline

#3 2013-04-23 07:28:26

Addle
Member
Registered: 2013-04-22
Posts: 2

Re: Critique requested for first package (QMentat)

Thanks, Kaustic, that was very helpful. I appreciate it. It looks much nicer, and it's good to know exactly why gmp was already assumed a dependency.

Anyways, I took all that info into consideration and hopefully it's all good now. Good to know about not needing to manually clear the .git files, as well. The Wiki suggested I do so ( https://wiki.archlinux.org/index.php/VC … Guidelines in "Removing VCS leftovers"), so I popped it in. But if it's not needed, then removed it is.

Thanks again!

Offline

#4 2013-04-23 10:13:15

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Critique requested for first package (QMentat)

It may be needed in some packages(?) but so far I haven't encountered a single -git package which does this when using the builtin method.

Offline

#5 2013-04-23 10:21:54

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,081

Re: Critique requested for first package (QMentat)

That section doesn't make sense, what kind of screwed up build system would install the CVS dir?

Offline

#6 2013-04-23 10:33:54

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: Critique requested for first package (QMentat)

Scimmia wrote:

That section doesn't make sense, what kind of screwed up build system would install the CVS dir?

Probably if you're doing extremely silly stuff like this:  https://aur.archlinux.org/packages/fo/f … t/PKGBUILD

Offline

#7 2013-04-23 10:45:12

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,081

Re: Critique requested for first package (QMentat)

Yeah, reading the comments, that maintainer is an idiot. Half that pkgbuild is unnecessary and pkgver() won't even be run, but even then I don't see the .git dir ending up in $pkgdir.

Last edited by Scimmia (2013-04-23 10:47:18)

Offline

Board footer

Powered by FluxBB