Mail archive
alpine-devel

[alpine-devel] changes in APKBUILD

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Fri, 30 Oct 2009 11:49:50 +0100

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_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Oct 30 2009 - 11:49:50 UTC