You are not logged in.

#1 2009-08-08 00:58:24

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

[solved] mandatory build() function inside PKGBUILD

hello,

do i get it right? the build function is still mandatory inside PKGBUILDs?
when writing a PKGBUILD for script packages which are not build (no ./configure or make) but only  packaged, do i need the build() function? how is this handled?
do i need smth like

build() {
:
}
package() {
install stuff
}

vlad

Last edited by DonVla (2009-08-08 01:35:38)

Offline

#2 2009-08-08 01:06:29

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: [solved] mandatory build() function inside PKGBUILD

Hello DonVla!

Did you read this ?
http://wiki.archlinux.org/index.php/Arc … _Standards

Bash script doesn't like empty functions, and you can use pre/proinstall, etc.

Hope this helps.

Offline

#3 2009-08-08 01:20:13

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: [solved] mandatory build() function inside PKGBUILD

thanks djszapi,

note that the build() function is not empty. there is a ":"  inside, that means "do nothing" (http://www.gnu.org/software/bash/manual … l-Builtins).
the question still remains - is this needed?

Last edited by DonVla (2009-08-08 01:25:25)

Offline

#4 2009-08-08 01:25:13

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

Re: [solved] mandatory build() function inside PKGBUILD

The build function is currently still needed (see http://bugs.archlinux.org/task/15147)

In fact, in the case of the build function doing nothing, it makes no difference to just use a build function() instead of an "empty" build() and a package() function in terms of fakeroot usage. So I would stick with just using a build function for now.

Offline

#5 2009-08-08 01:30:37

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: [solved] mandatory build() function inside PKGBUILD

Allan wrote:

The build function is currently still needed (see http://bugs.archlinux.org/task/15147)

In fact, in the case of the build function doing nothing, it makes no difference to just use a build function() instead of an "empty" build() and a package() function in terms of fakeroot usage. So I would stick with just using a build function for now.

ah ok, thanks.
though does the build() function set the correct ownerships (eg root - does it even matter)?
afais only package() uses a fakeroot env?

Offline

#6 2009-08-08 01:33:02

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

Re: [solved] mandatory build() function inside PKGBUILD

If there is no package() function, build() will use fakeroot.  It would break all old PKGBUILDs otherwise.

Offline

#7 2009-08-08 01:34:35

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: [solved] mandatory build() function inside PKGBUILD

Allan wrote:

If there is no package() function, build() will use fakeroot.  It would break all old PKGBUILDs otherwise.

d´oh! it´s so obvious!
thanks again allan smile

Offline

Board footer

Powered by FluxBB