Mail archive
alpine-devel

[alpine-devel] RFC: special variable builddir in APKBUILDs?

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Fri, 06 Nov 2009 13:44:20 +0100

Hi,

Just wondering if we should implement a special variable $builddir in
APKBUILDs.

This will do the same as $S in gentoo ebuilds, that is, define in what
dir the sources are supposed to be build from.

The idea is, if defined the following "magic" will happen:

* all *.patch *.diff files listed in $source will be applied with -p1
(unless prepare() function is defined in APKBUILD)

* before entering the use funcs prepare(), build(), package(), abuild
will "cd $builddir"


Benefit is that in the apkbuild, you will only need to define

  builddir="$srcdir"/$pkgname-$pkgver

in global scope (or it coudl be predefinied as that), then can patches
automatically be applied from the default prepare() function and the
build() and package() function does not need the initial

  cd "$srcdir"/$pkgname-$pkgver


Drawback is that now we add more "magic" functionallity and its not so
obvious whats going on when you read the APKBUILD.

What do you think?

-nc



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Nov 06 2009 - 13:44:20 UTC