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

_builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--without-pam \
		|| return 1
	make || return 1
}

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

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

md5sums="a1bfac0fbb83439435f8616200d2364d  monit-5.18.tar.gz
ada1805dc5f01d1ce7b8592955607674  monit.initd"
sha256sums="75ccb85fa2ac1f44c9c95c5a6b539a254b0a1d64e16a36ec9eeb867484a4fcaf  monit-5.18.tar.gz
aff2f2303aa15d6421dc9ace86099f2e1c46b7740421ebda1fbd28da8a0b3a4b  monit.initd"
sha512sums="448f0d2cb0a18e6b4ead051918677414157f7feac5697888f667db4cf5411b922058a36fc57247c6b8ff9b6f23382305c8c69fc6ec1fcd247b01f4a8bccaa42c  monit-5.18.tar.gz
94d67a995c6028d48cb729a60157ab42f2a3c15d59284f1de56c35b44bf83929ba9c42a5cbfe3bb4df0def70465cf3dff0ad6e532b6a02805840dc57785e1cc9  monit.initd"