~alpine/devel

[alpine-devel] changes in APKBUILD

Details
Message ID
<1256899790.25733.18.camel@ncopa-desktop.nor.wtbts.net>
Sender timestamp
1256899790
DKIM signature
missing
Download raw message
Hi,

In order to utilize multicores better the format of APKBUILD have
changed slightly. While I was there I also added a separate stage for
patching. So new format is:


prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	# do patching here
}

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure --prefix=/usr
	make
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install
}


I was thinking of using a new global variable "builddir" which could be
defined in global scope. Then, before running prepare, build and
package, I could do soemthing like:

if [ -n "$builddir" ] && [ -d "$builddir" ]; then
	cd "$builddir"
else
	cd "$startdir"
fi

That way the APKBUILD could look like:

builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	# do patching here
}

build() {
	./configure --prefix=/usr
	make
}

package() {
	make DESTDIR="$pkgdir" install
}


what do you think?
Other ideas?

-nc



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)