diff options
-rw-r--r-- | sample.APKBUILD | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/sample.APKBUILD b/sample.APKBUILD index 342a28e..fc7393a 100644 --- a/sample.APKBUILD +++ b/sample.APKBUILD @@ -7,38 +7,50 @@ # Maintainer: Your Name <youremail@domain.com> pkgname=NAME pkgver=VERSION -pkgrel=0 pkgdesc="" url="" arch="all" -license="GPL" -depends= -depends_dev= +license="" +depends="" +depends_dev="" makedepends="$depends_dev" -install= +install="$pkgname.pre-install $pkgname.post-install" subpackages="$pkgname-dev $pkgname-doc" -source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" - +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + # remove the 2 lines below (and this) if there is no init.d script + # $pkgname.initd + # $pkgname.confd + " _builddir="$srcdir"/$pkgname-$pkgver - prepare() { + local i cd "$_builddir" - # apply patches here + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { cd "$_builddir" - ./configure --prefix=/usr \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ - --infodir=/usr/share/info + --infodir=/usr/share/info \ + --localstatedir=/var \ + || return 1 make || return 1 } package() { cd "$_builddir" - make DESTDIR="$pkgdir" install + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la # remove the 2 lines below (and this) if there is no init.d script # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname |