You are not logged in.

#1 2010-02-23 12:53:59

TiborB
Member
Registered: 2008-12-09
Posts: 103

creating PKGBUILD: make install wants to copy files directly to /

Hi
I'm trying to write a PKGBUILD (I allready have some experiences) and part of installation procedure is to run 'make install'. But it tries to write directly to final locations of files (/usr/...) ...
What is standard aproach to such situation? Is it possible to fool 'make install' to copy files to $pkgdir as a fake root?
Or should I extract all relevant commands from make install and modify and put them directly to PKGBUILD? This is not always easy, and is prone to mistakes, I think....

Please advice.....

Offline

#2 2010-02-23 12:57:25

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,425
Website

Re: creating PKGBUILD: make install wants to copy files directly to /

It is usually something like:

make DESTDIR=$pkgdir install

or

make prefix=$pkgdir/usr install

Offline

#3 2010-02-23 13:04:20

TiborB
Member
Registered: 2008-12-09
Posts: 103

Re: creating PKGBUILD: make install wants to copy files directly to /

looks very simple, I will try it .....

Offline

#4 2010-02-24 23:21:04

TiborB
Member
Registered: 2008-12-09
Posts: 103

Re: creating PKGBUILD: make install wants to copy files directly to /

But doesn't work...

Offline

#5 2010-02-24 23:24:41

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

Re: creating PKGBUILD: make install wants to copy files directly to /

You need to examine the Makefile then - the install target in particular. Patching is the best solution - sed'ing is also OK. Running a bunch of install/cp commands in your PKGBUILD works, but is not very elegant.

Offline

Board footer

Powered by FluxBB