aboutsummaryrefslogtreecommitdiffstats
path: root/testing/icli/APKBUILD
blob: 4fc0d25fe4f8663eb6b01fe56b369cfbe9d65bce (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
46
47
48
49
50
51
52
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=icli
_realname=App-Icli
pkgver=0.48
pkgrel=0
pkgdesc="Icinga Command Line Interface"
url="http://finalrewind.org/projects/App-Icli/"
arch="noarch"
license="custom"
depends="perl-datetime perl-datetime-format-strptime perl-datetime-timezone 
	perl-list-moreutils perl-term-size"
depends_dev=""
makedepends="$depends_dev perl-module-build perl-test-compile 
	perl-test-pod perl-test-command"
install=""
subpackages="$pkgname-doc"
source="http://finalrewind.org/projects/${_realname}/${_realname}-${pkgver}.tar.gz"

_builddir="$srcdir"/$_realname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	perl Build.PL installdirs=vendor destdir="${pkgdir}" \
	    --icli-object-file=/var/spool/icinga/objects.cache \
	    --icli-status-file=/var/spool/icinga/status.dat    \
	    --icli-command-file=/var/spool/icinga/rw/icinga.cmd
	./Build
}

check() {
	cd "$_builddir"
	./Build test
}

package() {
	cd "$_builddir"
	./Build install
	install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
}
md5sums="bc8a49aa80784553cd880ecafe059597  App-Icli-0.48.tar.gz"
sha256sums="f5dfd9c67a1e458d4d895be05d36e61f00b03eb8315e0942dbf6069593afb3ce  App-Icli-0.48.tar.gz"
sha512sums="b3f5b9a626a3eea9406f63cbb7c06e6415d57ca9c3cb2ad5890e182a385842d819cd35b186e16ed5d78ce1eeba32bba4f0cfb3abff401f292aa64dfbb46686bf  App-Icli-0.48.tar.gz"