sample.APKBUILD 1.11 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2 3 4 5 6
# This is an example APKBUILD file. Use this as a start to creating your own,
# and remove these comments. 
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Contributor: Your Name <youremail@domain.com>
Natanael Copa's avatar
Natanael Copa committed
7
# Maintainer: Your Name <youremail@domain.com>
Natanael Copa's avatar
Natanael Copa committed
8 9 10 11 12
pkgname=NAME
pkgver=VERSION
pkgrel=0
pkgdesc=""
url=""
13
arch="all"
Natanael Copa's avatar
Natanael Copa committed
14
license="GPL"
Natanael Copa's avatar
Natanael Copa committed
15
depends=
16 17
depends_dev=
makedepends="$depends_dev"
Natanael Copa's avatar
Natanael Copa committed
18
install=
19
subpackages="$pkgname-dev $pkgname-doc"
20
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
Natanael Copa's avatar
Natanael Copa committed
21

22

Natanael Copa's avatar
Natanael Copa committed
23 24 25 26 27 28
_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	# apply patches here
}
Natanael Copa's avatar
Natanael Copa committed
29

Natanael Copa's avatar
Natanael Copa committed
30 31
build() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
32 33 34 35
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
Natanael Copa's avatar
Natanael Copa committed
36
	make || return 1
Natanael Copa's avatar
Natanael Copa committed
37 38 39 40
}

package() {
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
41
	make DESTDIR="$pkgdir" install
42

43
	# remove the 2 lines below (and this) if there is no init.d script
44 45
	# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	# install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
Natanael Copa's avatar
Natanael Copa committed
46 47
}

Natanael Copa's avatar
Natanael Copa committed
48
md5sums="" #generate with 'abuild checksum'