You are not logged in.

#1 2009-01-15 16:13:02

metalfan
Member
Registered: 2007-11-22
Posts: 99

makepkg, make dir?

Im creating a package for gepolabo (finance tool),
When i run makepkg configure outputs:

checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GNOME_CFLAGS... -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12  
checking for GNOME_LIBS... -pthread -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgconf-2 -lgthread-2.0 -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lz -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0  
mkdir: cannot create directory `/usr/share/gepolabo': Permission denied
mkdir: cannot create directory `/usr/share/gepolabo': Permission denied
mkdir: cannot create directory `/usr/share/gepolabo': Permission denied
mkdir: cannot create directory `/usr/share/gepolabo': Permission denied
mkdir: cannot create directory `/usr/share/gepolabo': Permission denied
mkdir: cannot create directory `/usr/share/gnome/help/gepolabo': Permission denied
mkdir: cannot create directory `/usr/share/gnome/help/gepolabo': Permission denied
checking for ranlib... (cached) ranlib
checking for an ANSI C-conforming const... yes

why is make trying to create directories?
if i just run "./configure && make" in a fresh src dir it doesnt do this....


# $Id: PKGBUILD,v 1.7 2008/03/24 12:15:25 sergej Exp $
# Maintainer: 

pkgname=gepolabo
pkgver=0.5.1
pkgrel=1
pkgdesc=""
arch=("i686" "x86_64")
url=""
license=("")
makedepends=( "")
depends=( "")
source=("http://download.gna.org/gepolabo/v0.5.1/gepolabo-0.5.1.tar.gz")
md5sums=("89beb00713f3a52bb5a12a2f765cc855")

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

Last edited by metalfan (2009-01-15 16:13:49)

Offline

#2 2009-01-15 16:35:45

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: makepkg, make dir?

metalfan wrote:
    ./configure --prefix=/usr || return 1

I'm not entirely sure,  I I think it's because of the "--prefix=/usr" line. Try using

    ./configure --prefix=$pkgdir/usr || return 1

and see if that works.

Still, with the chroot in place, I would have thought it would try to create $startdir/usr, not /usr.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2009-01-15 17:33:55

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: makepkg, make dir?

The problem is a oddly written configure script.  For some reason, it creates the dirs inside the configure script (lines 19703-19710) instead of the makefile.

I would suggest sed'ing the proper dirs instead of giving it a hardcoded fakeroot prefix:

  sed -i "s#mkdir -p \$prefix#install -dm755 $pkgdir\$prefix#" configure
  ./configure --prefix=/usr || return 1
  make || return 1
  make DESTDIR="$pkgdir" install || return 1

Last edited by tdy (2009-01-15 17:35:53)

Offline

#4 2009-01-15 17:38:09

metalfan
Member
Registered: 2007-11-22
Posts: 99

Re: makepkg, make dir?

ah, that works. thx.

ive added:

make DESTDIR=${startdir}/pkg install || return 1

at the end of build(), somehow install tries to install to this path:

/bin/install -c -m 644 ./gepolabo-icon.png /home/metalfan/makepkg/gepolabo/pkg/home/metalfan/makepkg/gepolabo/pkg/usr/share/pixmaps/gepolabo/gepolabo-icon.png

i have no clue why.... any ideas?

Offline

#5 2009-01-15 17:43:38

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: makepkg, make dir?

metalfan wrote:

at the end of build(), somehow install tries to install to this path:

/bin/install -c -m 644 ./gepolabo-icon.png /home/metalfan/makepkg/gepolabo/pkg/home/metalfan/makepkg/gepolabo/pkg/usr/share/pixmaps/gepolabo/gepolabo-icon.png

i have no clue why.... any ideas?

That's a result of the hardcoded fakeroot prefix.  When you specify the prefix as $pkgdir/usr instead of /usr, it will install to $pkgdir$pkgdir/usr instead of $pkgdir/usr.  Just in case you missed it, I posted one solution above.

Last edited by tdy (2009-01-15 19:36:44)

Offline

#6 2009-01-15 19:51:40

metalfan
Member
Registered: 2007-11-22
Posts: 99

Re: makepkg, make dir?

oops, i did....the sed fixes the problem. thx

looks like src/$pkgname-$pkgver is not deleted if make fails for some reasons....wouldnt that make sense to get a fresh start?

Offline

#7 2009-01-15 21:17:38

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: makepkg, make dir?

metalfan wrote:

looks like src/$pkgname-$pkgver is not deleted if make fails for some reasons....wouldnt that make sense to get a fresh start?

I think the main reason makepkg doesn't remove the dir automatically is to let you diagnose the error(s) first (e.g. config.log).

Last edited by tdy (2009-01-15 21:19:51)

Offline

#8 2009-01-15 21:33:24

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: makepkg, make dir?

man makepkg or makepkg -h will help you out there - you're looking for the -c/--clean option.

Offline

#9 2009-01-15 21:42:30

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: makepkg, make dir?

tomk wrote:

man makepkg or makepkg -h will help you out there - you're looking for the -c/--clean option.

If I'm understanding metalfan correctly, I think he's asking about failed builds.

Last edited by tdy (2009-01-15 21:47:53)

Offline

#10 2009-01-15 23:28:22

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: makepkg, make dir?

He's asking why the src dir was not deleted, and I'm saying that if he wants that, he has to specify it on the command line.

Offline

#11 2009-01-16 00:02:38

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: makepkg, make dir?

But as far as I know, "-c" only affects successful builds.  I believe he's essentially asking about a "-c" equivalent for failed builds (even though I don't see much of a point for one personally).  Unless I'm missing something, the only way to remove the src dir after a failed build is to manually "rm -r" it.

Offline

Board footer

Powered by FluxBB