You are not logged in.
I'm fairly new to Arch linux and I'm trying to get familiar with the pkg building process using makepkg.
Here is a PKGBUILD file I created to build the xpilot game for X windows.
Can you guys give me some feedback on it?
# $Id: PKGBUILD,v 1.0 2004/06/06 20:29:00 fbidwell Exp $
# Maintainer: fbidwell <fbidwell@mindspring.com>
pkgname=xpilot
pkgver=4.5.4
pkgrel=1
pkgdesc="xpilot"
url="http://www.xpilot.org/"
depends=('xfree86')
source=(ftp://ftp.xpilot.org/pub/xpilot/$pkgname-$pkgver.tar.gz)
build() {
cd $startdir/src/$pkgname-$pkgver
cp Local.config Local.config.bck
sed -e "s/^PREFIXs=s.*/PREFIX = /usr/" Local.config > Local.config.new
sed -e "s/#definesLocalGuru.*/#define LocalGuru `whoami`@`hostname`/" Local.c
onfig.new2
# patch -p0 < $startdir/Makefile.patch
mv Local.config.new2 Local.config
rm Local.config.new
xmkmf -a
make || return 1
make DESTDIR=$startdir/pkg install
make DESTDIR=$startdir/pkg install.man
}
md5sums=('f2774fda5938629001ed65a311554c01')
Offline
I didn't compile it myself but a few quick notes:
1. ftp://ftp.xpilot.org/pub/xpilot/$pkgname-$pkgver.tar.gz includes unnecessary
2. you could use -i parameter with sed to get rid of making and moving copies of this config file (it can also make automatic backup copies if you tell it to - read sed manual)
3. what is this patch for ? if it is commented out for some purpose add also some explanation or just delete it.
4. does it compile at all with gcc 3.4 (just asking)?
Is this the kind of feedback you expected?
Offline
Thanks,
Exactly the type of feedback I was looking for. I'd like to start contributing some of my favorite packages and I wanted to get some insight from those who went before me.
I'll look at the sed man page more carefully for what you talked about. The patch thing was a left over from the PKGBUILD file I was using as reference I'll take it out. And yes it does compile with gcc 3.4.
Offline
It packages files into /usr/local. I think your second sed has the wrong filename.
Offline
Not sure what you mean about it packaging things in /usr/local?
When I build this and installed it on my system it put everthing under /usr/bin /usr/lib and /usr/man.
The sed command kinda pasted into the buffer wrong, but I'm going to change it to -i like suggested above.
Offline
When I used your package build, fixed the badly wrapped line, and ran makepkg, looking at the filelist showed everything under /usr/local. Probably because the sed's failed. Putting "|| return 1" after your sed commands will help with debugging.
Offline
Well, here's my PKGBUILD file for the latest version of xpilot-ng:
pkgver=4.6.6
pkgrel=1
pkgdesc="Xpilot NG Game"
url="http://xpilot.sourceforge.net/"
depends=('glibc' 'zlib' 'expat')
source=(http://unc.dl.sourceforge.net/sourceforge/xpilot/$pkgname-$pkgver.tar.gz)
md5sums=('785278551aa85356b44f907be1052bc3')
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
}
My nic is, uh... what else but "Soloport" Look for me at "TZX Rambunctious Modified" 8)
Offline