aboutsummaryrefslogtreecommitdiffstats
path: root/main/monit/APKBUILD
blob: 41cb5457ddcec73e6bb710408647087703770d37 (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.20.0
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 libressl-dev zlib-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="769a44ee13b4e1f90156b58dc2f7ea7c  monit-5.20.0.tar.gz
ada1805dc5f01d1ce7b8592955607674  monit.initd"
sha256sums="ebac395ec50c1ae64d568db1260bc049d0e0e624c00e79d7b1b9a59c2679b98d  monit-5.20.0.tar.gz
aff2f2303aa15d6421dc9ace86099f2e1c46b7740421ebda1fbd28da8a0b3a4b  monit.initd"
sha512sums="653cba9d63fad42acf8c27ee9c050d047fc78e0b7e8cdb0f3d0a533d5b5e01ccf1b82d443cb6518d286547087a021e37a59cbffedbb3daf49ff8f95e8c64b884  monit-5.20.0.tar.gz
94d67a995c6028d48cb729a60157ab42f2a3c15d59284f1de56c35b44bf83929ba9c42a5cbfe3bb4df0def70465cf3dff0ad6e532b6a02805840dc57785e1cc9  monit.initd"