~alpine/devel

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

Details
Message ID
<1257511460.1929.594.camel@ncopa-desktop.nor.wtbts.net>
Sender timestamp
1257511460
DKIM signature
missing
Download raw message
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@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)