You are not logged in.
hi
this is my first PKGBUILD i made so far, but it whont work.
my problem is that makepkg whont copy the files to the pkg dir so it can make the package, instead it trys to install the files directly to the destination where they are supposed to be installed with the package manager.
# Contributor: Wesley <rudirennsau@hotmail.com>
pkgname=ufoai-svn
pkgver=11224
pkgrel=1
pkgdesc="UFO: Alien Invasion is a strategy game featuring tactical combat"
arch=('i686' 'x86_64')
url="http://ufoai.ninex.info"
license=('GPL')
depends=(libgl sdl_ttf)
conflicts=('ufoai')
makedepends=('subversion')
source=()
md5sums=()
_svntrunk=https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk
_svnmod=trunk
_langs=()
build() {
cd $startdir/src
if [ -d $_svnmod/.svn ]; then
(cd $_svnmod && svn up -r $pkgver)
else
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
fi
msg "SVN checkout done or server timeout"
msg "Starting make..."
cd $_svnmod
./configure --prefix=/usr
make || return 1
make lang
make maps
cd base
./archives.sh
cd ..
make DESTDIR=$startdir/pkg/ install
cp -t $startdir/pkg/usr/share/ufoai/base/ base/*.pk3 base/*.cfg base/*.txt
}
"DESTDIR" whont works for me at all.
if i make
./configure --prefix=$startdir/pkg/usr
it trys to read the pk3 files from thet directory AFTER installing, so it whont work if i delete the pkg and src dir.
Offline
Can't check here exactly.
I can tell you that DESTDIR isn't honored, and that i'd most likely try to make
./configure --prefix=/usr
make
make PREFIX=$startdir/pkg/usr install
or
make prefix=$startdir/pkg/usr install
Otherwhise i'd need to look it up again at home.
Yours,
STi
Ability is nothing without opportunity.
Offline
thank you, the second choice worked for me, but with that i still got the problem with the game, searching for the data files in the pkg directory.
Offline
Take a look at the makefile and try to figure out, which variable allows you to install the package in a different place, if there's any. If there's no such variable, you have to patch the makefile.
Hail to the thief!
Offline
thank you for that hint.
i THINK i found why it is thatway(just wana state here that i am still an absolute newb in making PKGBUILD's my own).
there are some entrys in the MakeFile that describe where to put what (afaik because of what i gave ./configure as parameters?)
everything except the DATADIR is set to ${prefix}/bla or ${exec_prefix}/bla.
but DATADIR needs an absolute path as target to install probably or it gets just ignored, so its, whatever i make either DATADIR=/usr/share/ufoai(where i trys to install it there instead of throwing it into the pkg dir) or DATADIR=/home/bla/pkg/usr/share/ufoai(where he trys to look for that files even after installation.)
since i dont solved the problem with your hint i postet the makefile into a pastebin, maybe u can tell how to actually work around this.
Offline
yeah, the problem looks like the install-exec target - that makefile will need to be patched. Can't do it right now, 'cause I'm at work, but I'll try to remember to look at this when I get home
Offline
-edit-
Nevermind - I did it anyway. Here's a patch for Makefile.in
http://www.archlinux.org/~travis/ufoai- … e.in.patch
And a modified version of your PKGBUILD to use it.
http://www.archlinux.org/~travis/ufoai-svn/PKGBUILD
Last edited by Cerebral (2007-08-31 13:51:52)
Offline
thank you very much for the help, i will try it out as soon i can^^
and now i got a clue how these patches work too
Offline
I didn't look into this really deep, but wouldn't it have been possible to do something like "make DESTDIR=$startdir/pkg/ DATADIR=$startdir/pkg/something install"?
Haven't been here in a while. Still rocking Arch.
Offline
I didn't look into this really deep, but wouldn't it have been possible to do something like "make DESTDIR=$startdir/pkg/ DATADIR=$startdir/pkg/something install"?
no, because in the install target it creates launcher shell scripts that contain the line cd $(DATADIR); ./binary; - if DATADIR=$startdir/pkg/anything at install time this will be hardcoded into the launchers.
Plus, the makefile doesn't support DESTDIR. So I needed to patch it in.
Offline
Sigi wrote:I didn't look into this really deep, but wouldn't it have been possible to do something like "make DESTDIR=$startdir/pkg/ DATADIR=$startdir/pkg/something install"?
no, because in the install target it creates launcher shell scripts that contain the line cd $(DATADIR); ./binary; - if DATADIR=$startdir/pkg/anything at install time this will be hardcoded into the launchers.
Plus, the makefile doesn't support DESTDIR. So I needed to patch it in.
Thought so (but had to ask anyway ). Thanks Cerebral!
Haven't been here in a while. Still rocking Arch.
Offline