summaryrefslogtreecommitdiffstats
path: root/testing/sircbot/APKBUILD
blob: ba6a19d59f2bd2b7629e98f52f3ef5204ee30e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sircbot
pkgver=0.2
pkgrel=1
pkgdesc="Minimalistic IRC bot"
url="http://git.alpinelinux.org/cgit/sircbot/"
license="GPL-2"
pkgusers="sircbot"
pkggroups="sircbot"
depends=
makedepends="lua-dev"
install="$pkgname.pre-install"
subpackages="lua-sircbot:luamod"
source="http://git.alpinelinux.org/cgit/sircbot/snapshot/sircbot-$pkgver.tar.bz2
	sircbot.initd
	sircbot.confd
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	make install DESTDIR="$pkgdir" prefix=/usr
	install -o sircbot -g sircbot -d "$pkgdir"/var/run/sircbot
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

luamod() {
	pkgdesc="Luamodule for sirbot client"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}

md5sums="a9d16db48c97ebfa30e1c84f37e70838  sircbot-0.2.tar.bz2
494717b7824e271093511a48955e4a14  sircbot.initd
8443ac189030c7b8beb8e579dc16ebc7  sircbot.confd"