Mail archive

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

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


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

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


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?


Received on Fri Nov 06 2009 - 13:44:20 UTC