You are not logged in.

#1 2006-07-17 12:19:00

Titus
Member
From: Izmir
Registered: 2006-05-11
Posts: 120
Website

make returns me with an error

# $Id: PKGBUILD,v 1.12 2003/11/06 08:26:13 dorphell Exp $
# Maintainer:Tutku Dalmaz <tutkudalmaz>>
pkgname=loosecannon
pkgver=0.5.0
pkgrel=1
pkgdesc="Loose Cannon is 3D 3rd person action adventure game."
url="http://sourceforge.net/projects/loose-cannon/"
licence="GPL"
depends=('openal')
source=("http://belnet.dl.sourceforge.net/sourceforge/loose-cannon/$pkgname-$pkgver.tar.gz")
md5sums=('7ec489f393295c88f9ef4b3f9d0d2c52')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$startdir/pkg install

}

this is my first PKGBUILD, i have written these but when i start with makepkg, after a while it gives me

make[2]: Entering directory `/home/titus/src/loosecannon/src/loosecannon-0.5.0'
make[2]: Nothing to be done for `install-exec-am'.
cp -r share/loosecannon /usr/share/
cp: cannot create directory `/usr/share/loosecannon': Permission denied

how can i correct this.


In a world without walls,who need windows?

Offline

#2 2006-07-17 12:38:23

Insane-Boy
Member
Registered: 2006-02-27
Posts: 243

Re: make returns me with an error

Check the permissions for the dir.

Offline

#3 2006-07-17 12:50:24

Titus
Member
From: Izmir
Registered: 2006-05-11
Posts: 120
Website

Re: make returns me with an error

i type #makepkg as root why i got the permission error?


In a world without walls,who need windows?

Offline

#4 2006-07-17 13:10:51

IsSuE
Member
Registered: 2006-04-29
Posts: 309

Re: make returns me with an error

your pkgbuild works for me. i copied it to /var/abs/local/loosecannon/PKGBUILD.

btw: freealut is another dependancy for this game

Offline

#5 2006-07-17 13:22:53

Titus
Member
From: Izmir
Registered: 2006-05-11
Posts: 120
Website

Re: make returns me with an error

thanks lot IsSuE and i have a question, my quote which starts with make[2], is an error or just a warning?


In a world without walls,who need windows?

Offline

#6 2006-07-17 17:56:02

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: make returns me with an error

make[2]: Entering directory `/home/titus/src/loosecannon/src/loosecannon-0.5.0'
make[2]: Nothing to be done for `install-exec-am'.

This is just information.

cp -r share/loosecannon /usr/share/
cp: cannot create directory `/usr/share/loosecannon': Permission denied 

This is bad. It tries to install files directly in the filesystem. Most likely, the package contains no files. The PKGBUILD needs to be fixed. If I have time, I'll give it a look.

You should never run makepkg as root. Always use fakeroot under a regular user.  If you try to use a bad PKGBUILD like this one, it will mess up your system.

Offline

#7 2006-07-17 18:08:58

Titus
Member
From: Izmir
Registered: 2006-05-11
Posts: 120
Website

Re: make returns me with an error

thanks snowman i'll be waiting your answers


In a world without walls,who need windows?

Offline

#8 2006-07-17 18:43:01

Titus
Member
From: Izmir
Registered: 2006-05-11
Posts: 120
Website

Re: make returns me with an error

snowman i scan all INSTALL file of loosecannon game and i changed some part of my PKGBUILD and when i type makepkg
now there is ne persmission denied warning but instead of it

cp -r share/loosecannon /usr/share/

part still exist.
i thing something still has problem, am i right?


In a world without walls,who need windows?

Offline

#9 2006-07-17 19:11:52

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: make returns me with an error

try using $startdir/pkg/usr   as prefix for ./configure

like this :

./configure --prefix=$startdir/pkg/usr

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2006-07-17 22:18:25

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: make returns me with an error

Lone_Wolf wrote:

try using $startdir/pkg/usr   as prefix for ./configure

like this :

./configure --prefix=$startdir/pkg/usr

This should be avoid because sometime the paths that are passed to the configure script are hardcoded in the app.

Here's the fixed PKGBUILD:

# Contributor:Tutku Dalmaz <tutkudalmaz>

pkgname=loosecannon
pkgver=0.5.0
pkgrel=1
pkgdesc="Loose Cannon is 3D 3rd person action adventure game."
url="http://sourceforge.net/projects/loose-cannon/"
licence="GPL"
depends=('python' 'mesa' 'sdl_image' 'freealut')
source=("http://dl.sourceforge.net/sourceforge/loose-cannon/$pkgname-$pkgver.tar.gz")
md5sums=('7ec489f393295c88f9ef4b3f9d0d2c52')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --prefix=/usr
  make || return 1
  install -d $startdir/pkg/usr/share
  make DESTDIR=$startdir/pkg datadir=$startdir/pkg/usr/share install
  chmod 644 $startdir/pkg/usr/share/loosecannon/snds/hover.wav
}

These kinds of problems are usually solved by looking at the Makefile. Some Makefiles don't use the DESTDIR variable for the installation location. The variable has another name like prefix, PREFIX, INSTALL_ROOT, etc or the Makefile is broken like in this case. It use DESTDIR for the executable but not for the data:

    cp -r share/loosecannon $(datadir)/

. So I gave it the wanted datadir path, completed depends, etc.

Offline

#11 2006-07-19 00:04:59

Titus
Member
From: Izmir
Registered: 2006-05-11
Posts: 120
Website

Re: make returns me with an error

thanks for your help snowman this pkgbuild is gonna be my tutorial.


In a world without walls,who need windows?

Offline

Board footer

Powered by FluxBB