You are not logged in.

#1 2007-08-31 09:22:33

Wesley
Member
From: Hannover, Germany
Registered: 2007-07-13
Posts: 33

makepkg whont "install" the files to the pkg/ dir

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

#2 2007-08-31 09:40:47

STiAT
Member
From: Vienna, Austria
Registered: 2004-12-23
Posts: 606

Re: makepkg whont "install" the files to the pkg/ dir

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

#3 2007-08-31 09:59:40

Wesley
Member
From: Hannover, Germany
Registered: 2007-07-13
Posts: 33

Re: makepkg whont "install" the files to the pkg/ dir

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

#4 2007-08-31 12:00:53

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: makepkg whont "install" the files to the pkg/ dir

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

#5 2007-08-31 12:25:16

Wesley
Member
From: Hannover, Germany
Registered: 2007-07-13
Posts: 33

Re: makepkg whont "install" the files to the pkg/ dir

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.

http://pastebin.com/m3da70e68

Offline

#6 2007-08-31 13:13:51

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: makepkg whont "install" the files to the pkg/ dir

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

#7 2007-08-31 13:41:03

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: makepkg whont "install" the files to the pkg/ dir

-edit-
Nevermind - I did it anyway.  big_smile  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

#8 2007-08-31 14:36:48

Wesley
Member
From: Hannover, Germany
Registered: 2007-07-13
Posts: 33

Re: makepkg whont "install" the files to the pkg/ dir

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 tongue

Offline

#9 2007-08-31 14:50:21

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: makepkg whont "install" the files to the pkg/ dir

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. smile

Offline

#10 2007-08-31 15:03:40

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: makepkg whont "install" the files to the pkg/ dir

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.

Offline

#11 2007-08-31 17:24:39

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: makepkg whont "install" the files to the pkg/ dir

Cerebral wrote:
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 tongue). Thanks Cerebral!


Haven't been here in a while. Still rocking Arch. smile

Offline

Board footer

Powered by FluxBB