aboutsummaryrefslogtreecommitdiffstats
path: root/main/monit/APKBUILD
blob: ff300f7dbae49701c6bb79783c7e307f62b769f7 (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.26.0
pkgrel=0
pkgdesc="Managing and monitoring on a UNIX system"
url="https://mmonit.com/monit/"
arch="all"
license="AGPL-3.0-or-later"
makedepends="openssl-dev zlib-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://mmonit.com/monit/dist/monit-$pkgver.tar.gz
	$pkgname.initd
	"

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

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

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="ae5bfc9f2e8cf2d2efa7a121f3bb865dc5b66b647e23e005349799f3f4384dfa1534ed88d0767ca41dac4cea2674fb82cfb51098129d350b470143df548c6900  monit-5.26.0.tar.gz
688711432aa072bf9a6fe55cec0202d54a5fac9a421efd41ebe3974e843f41a076945e65b3b53f968926e037ecb54049f42d99dc7a1a9f35a7e6d19ca5a4f019  monit.initd"