You are not logged in.
I have created a PKBUILD for "Project: Starfighter" which btw is my first PKGBUILD. I would appreciate comments on this PKGBUILD before I post it on AUR.
To make it build cleaner I had to change some paths in the makefile. I am not sure if I should name the patchfile (for the makefile) in any different way or if the name I have chosen works.
PKGBUILD
# Contributor: Peter Johansson <johpet>
pkgname=starfighter
pkgver=1.1
pkgrel=1
pkgdesc="Project: Starfighter is a 2D mission-based shoot-'em-up game."
url="http://www.parallelrealities.co.uk/starfighter.php"
license="GPL"
depends=('sdl' 'sdl_image' 'sdl_mixer')
source=('http://www.parallelrealities.co.uk/download.php?file=starfighter-1.1-1.tar.gz&type=zip')
md5sums=('6a4b704dbc83c7403842b936f95ee958')
build() {
cd $startdir/src
tar -xzf 'download.php?file=starfighter-1.1-1.tar.gz&type=zip'
cd $startdir/src/$pkgname-$pkgver
patch -p0 -i $startdir/$pkgname.patch
make || return 1
make DESTDIR=$startdir/pkg install
}
starfighter.patch
--- makefile.old 2006-05-26 07:39:55.000000000 +0200
+++ makefile 2006-05-26 07:52:39.000000000 +0200
@@ -7,8 +7,9 @@
PACK = starfighter.pak
DOCS = docs/*
-BINDIR = /usr/games/
-DATADIR = /usr/share/games/parallelrealities/
+DESTDIR =
+BINDIR = /usr/bin/
+DATADIR = /usr/share/starfighter/
DOCDIR = /usr/share/doc/starfighter/
# top-level rule to create the program.
all: $(PROG)
@@ -30,8 +31,8 @@
# install
install:
- mkdir -p $(DATADIR)
+ mkdir -p $(DESTDIR)$(DATADIR)
+ mkdir -p $(DESTDIR)$(BINDIR)
strip $(PROG)
- install -o root -g games -m 755 $(PROG) $(BINDIR)$(PROG)
- install -o root -g games -m 644 $(PACK) $(DATADIR)$(PACK)
- cp $(DOCS) $(DOCDIR)
+ install -m 755 $(PROG) $(DESTDIR)$(BINDIR)$(PROG)
+ install -m 644 $(PACK) $(DESTDIR)$(DATADIR)$(PACK)
errors/warnings from namcap
namcap PKGBUILD
PKGBUILD (starfighter) W: Missing Maintainer tag
PKGBUILD (starfighter) W: Missing CVS Id tag
PKGBUILD (starfighter) W: file referenced in $startdir outside of $startdir/src or $startdir/pkg
Should I put myself as a maintainer too?
Is the second warning something I have to fix or is it something that is more necessary if I would build from cvs?
I guess I could ignore the third warning since it probably is because I am reading a patchfile in $startdir
When I run namcap starfighter-1.1-1.pkg.tar.gz it complains on the dependencies but I know that they are needed since I have checked them with ldd and they are also listed as dependencies on the homepage. I am guessing that it is something that I could ignore? Or am I wrong?
Thanks in advance for any suggestions/corrections anyone might have.
Peter Johansson
Offline
Nice work. You can ignore the first two namcap messages - they only apply if the package is destined for a binary repo. The third message is important. All files required for a build must be listed in the source= array, with corresponding entries in the md5sums= array, and a PKGBUILD should only reference files in $startdir/src or $startdir/pkg. Put the patch file (the name is fine, btw) in source=, and change the path in the patch command to
$startdir/src/$pkgname.patch
One more thing, but this is optional. That source URL really offends me (<rant>why can't developers just link to the tarball, without this kind of crap?</rant>), so you could get it from somewhere a bit saner e.g.
http://ftp.osuosl.org/pub/FreeBSD/distfiles/starfighter-1.1-1.tar.gz
I've checked the md5sum, and it's the same. It's your package though, so you decide.
namcap is a good tool, but it's not gospel - you're using it the right way i.e. with common sense.
Offline
You could change the url to use $pkgver and $pkgname, if you want to..
Haven't been here in a while. Still rocking Arch.
Offline
Nice work. You can ignore the first two namcap messages - they only apply if the package is destined for a binary repo. The third message is important. All files required for a build must be listed in the source= array, with corresponding entries in the md5sums= array, and a PKGBUILD should only reference files in $startdir/src or $startdir/pkg. Put the patch file (the name is fine, btw) in source=, and change the path in the patch command to
$startdir/src/$pkgname.patch
One more thing, but this is optional. That source URL really offends me (<rant>why can't developers just link to the tarball, without this kind of crap?</rant>), so you could get it from somewhere a bit saner e.g.
http://ftp.osuosl.org/pub/FreeBSD/distfiles/starfighter-1.1-1.tar.gz
I've checked the md5sum, and it's the same. It's your package though, so you decide.
namcap is a good tool, but it's not gospel - you're using it the right way i.e. with common sense.
Thanks!
I have fix those problems even the one with the URL. I totally agree with you, it looks a lot saner with the other URL. Going to upload it to AUR in a couple of minuts. Hopefully it doesn't have anymore errors.
# Contributor: Peter Johansson <johpet>
pkgname=starfighter
pkgver=1.1
pkgrel=1
pkgdesc="Project: Starfighter is a 2D mission-based shoot-'em-up game."
url="http://www.parallelrealities.co.uk/starfighter.php"
license="GPL"
depends=('sdl' 'sdl_image' 'sdl_mixer')
source=(http://ftp.osuosl.org/pub/FreeBSD/distfiles/$pkgname-$pkgver-1.tar.gz starfighter.patch)
md5sums=(6a4b704dbc83c7403842b936f95ee958 7d11a7217022b216c3de6e0455483418)
build() {
cd $startdir/src/$pkgname-$pkgver
patch -p0 -i $startdir/src/$pkgname.patch
make || return 1
make DESTDIR=$startdir/pkg install
}
Offline