You are not logged in.

#1 2004-06-07 02:25:56

fbidwell
Member
From: Atlanta, GA (USA)
Registered: 2004-05-09
Posts: 32

PKGBUILD File I created for Xpilots

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

#2 2004-06-08 01:30:17

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: PKGBUILD File I created for Xpilots

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

#3 2004-06-10 05:04:05

fbidwell
Member
From: Atlanta, GA (USA)
Registered: 2004-05-09
Posts: 32

Re: PKGBUILD File I created for Xpilots

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

#4 2004-06-10 11:28:39

kpiche
Forum Fellow
From: Ottawa, ON, Canada
Registered: 2004-03-30
Posts: 246
Website

Re: PKGBUILD File I created for Xpilots

It packages files into /usr/local.  I think your second sed has the wrong filename.

Offline

#5 2004-06-10 22:57:06

fbidwell
Member
From: Atlanta, GA (USA)
Registered: 2004-05-09
Posts: 32

Re: PKGBUILD File I created for Xpilots

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

#6 2004-06-13 02:11:57

kpiche
Forum Fellow
From: Ottawa, ON, Canada
Registered: 2004-03-30
Posts: 246
Website

Re: PKGBUILD File I created for Xpilots

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

#7 2005-03-06 20:54:29

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: PKGBUILD File I created for Xpilots

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" big_smile  Look for me at "TZX Rambunctious Modified"  8)

Offline

Board footer

Powered by FluxBB