Mail archive
alpine-devel

Re: [alpine-devel] change in the APKBUILD format

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Mon, 19 Oct 2009 18:00:16 +0200

On Mon, 2009-10-19 at 17:44 +0300, Timo Teräs wrote:
> Natanael Copa wrote:
> > 2. we follow gentoo style, and create src_prepare() (for applying
> > patches), src_configure() to run ./configure, src_compile() to run make
> > and src_install() to do the make install - as fakeroot.
>
> I definitely want "unpack+patch sources" to be doable as separate
> step. It helps when I need to get the exact sources used to
> build a debuggable binary.

It is possible do something like this already:

_prepare() {
        # do patching
}

_compile() {
        # do compiling
}

build() {
        _prepare && _compile
}

Then you can run:
abuild fetch unpack _prepare

and you have your patches sources

We can still make prepare() as an official step.

> Not sure if configure/compile needs to be separated.


How about something like

prepare() {
        # patch sources here
}

build() {
        ./configure
        make
}

package() {
        make install DESTDIR=$pkgdir
}


Then in abuild we do something like, if package is not a defined
function, we run build() in fakeroot as normal. Otherwise we run package
and subpackage split functions as fakeroot only. that way we keep
compability.

We end up with an API (3 functions) which needs to be learned to build
packages, but i suppose its not possible to completely avoid it.

-nc



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Mon Oct 19 2009 - 18:00:16 UTC