You are not logged in.

#1 2016-03-17 01:54:30

TwistedTomZ
Member
Registered: 2015-08-17
Posts: 11

Rate my PKGBUILD, it's my first time!

Hello everyone!

I managed to complete my first PKGBUILD, it's for a video game I made. I'm pretty sure I did many things wrong, but at least it's working! Here it is:

# Maintainer: Tom Tsagk <tomtsagk at protonmail dot com>
pkgname=dargite3d
pkgdesc="A pong-clone made with opengl, highly moddable"
pkgver=1.0.0
pkgrel=1
arch=('x86_64')
url="http://darkdimensiongames.blogspot.com"
license=('GPL')
depends=('freeglut' 'glew')
source=("https://www.dropbox.com/s/p75xt2rrii5o8lf/dargite3d-1.0.0.tar.gz?dl=0")
md5sums=('90879138571e4e6f5f2f7b05ecd24477')

build() {
    ./configure -p /usr
    make
}

package() {
    make DEST_DIR=$pkgdir install
}

By the way, what is the community's opinion on video games on AUR? I got the impression that programs with some functionality are preferred, is a video game allowed too?

Thanks in advance!

Edit: Removed "cd $srcdir" and changed licence to GPL (Thanks Scimmia!)

Last edited by TwistedTomZ (2016-03-17 02:15:09)

Offline

#2 2016-03-17 02:00:44

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

Re: Rate my PKGBUILD, it's my first time!

I don't see anything really wrong with it. There are a couple of things that could be improved, but they aren't critical.

You could use the $pkgver variable in the source array, that way you only have to change the version in one place when you update. It's easy to forget if it's in more than one place.

cd "$srcdir" is a no-op. Functions are guaranteed to start in $srcdir already.

Is this really 64 bit only? It's not a problem if it is, just curious.

I don't think anyone has a problem with video games in the AUR.

Edit: Oh, I did find something (minor) wrong. The license is listed as GPL2, but the license file says "either version 2 of the License, or (at your option) any later version." This means it should just be "GPL"

Last edited by Scimmia (2016-03-17 02:04:33)

Offline

#3 2016-03-17 02:11:05

TwistedTomZ
Member
Registered: 2015-08-17
Posts: 11

Re: Rate my PKGBUILD, it's my first time!

Scimmia wrote:

You could use the $pkgver variable in the source array, that way you only have to change the version in one place when you update. It's easy to forget if it's in more than one place.

I thought of that, but I wasn't sure where to upload the tar file, and on dropbox (that I use temporarily) it seems that each upload I make becomes a unique url. I will think about changing that later on based on your suggestion!

Scimmia wrote:

cd "$srcdir" is a no-op. Functions are guaranteed to start in $srcdir already.

I removed it and the package builds correctly! I can't remember why i put that there, thanks!

Scimmia wrote:

Is this really 64 bit only? It's not a problem if it is, just curious.

I'm not sure to be honest, I read somewhere that you should only include architectures that you have tested on, so far I tried it some 64-bit only. I believe for 32-bit I should change one dependency to its 32-bit version. (I looked at it at some point, but decided to try it later, for now I focus on getting the package itself right and then improve it after that)

Thanks a lot for your help!

Edit: Changed license name too and edited my first post.

Last edited by TwistedTomZ (2016-03-17 02:16:46)

Offline

Board footer

Powered by FluxBB