aboutsummaryrefslogtreecommitdiffstats
path: root/main/monit/APKBUILD
blob: c8448799b29839b8269576e5a888377f2e514e1f (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: Łukasz Jendrysik
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=monit
pkgver=5.22.0
pkgrel=0
pkgdesc="Managing and monitoring on a UNIX system"
url="http://mmonit.com/monit/"
arch="all"
license="AGPL"
makedepends="libressl-dev zlib-dev"
subpackages="$pkgname-doc"
source="http://mmonit.com/monit/dist/monit-$pkgver.tar.gz
	$pkgname.initd"
builddir="$srcdir"/$pkgname-$pkgver

check() {
	cd "$builddir"
	make check
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-pam
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
        install -Dm 755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -Dm 644 "$builddir"/monitrc \
		"$pkgdir"/etc/monitrc
	sed -i '/allow @monit/s/^/#/' \
		"$pkgdir"/etc/monitrc
	sed -i '/allow @users readonly/s/^/#/' \
		"$pkgdir"/etc/monitrc

	# monit checks for strict permissions of monitrc at startup
	chmod 600 "$pkgdir"/etc/monitrc
}

sha512sums="d7325d463f92eb5e1d6c8cdae01cbf787c23799ac4dd79e66931fe47960d69dba0ed76afb0715be2e877dc42bf77cd73886f5080e10b87084cce4e0da5f71961  monit-5.22.0.tar.gz
94d67a995c6028d48cb729a60157ab42f2a3c15d59284f1de56c35b44bf83929ba9c42a5cbfe3bb4df0def70465cf3dff0ad6e532b6a02805840dc57785e1cc9  monit.initd"