aboutsummaryrefslogtreecommitdiffstats
path: root/main/monit/APKBUILD
blob: 86f70dace18c5691858852d23ff5ef3696903b3c (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
56
57
58
59
60
61
62
63
64
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=monit
pkgver=5.7
pkgrel=0
pkgdesc="Managing and monitoring on a UNIX system"
url="http://mmonit.com/monit/"
arch="all"
license="AGPL"
depends=""
depends_dev="openssl-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source="http://mmonit.com/monit/dist/monit-$pkgver.tar.gz
	musl-fix.patch
	$pkgname.initd"

_builddir="$srcdir"/$pkgname-$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"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--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
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="82f07274c129e1098afa27fd36786df6  monit-5.7.tar.gz
a2288c7bd06f98e85e81969115912ff4  musl-fix.patch
c3162a769081f3759e3fae2a672a8a61  monit.initd"
sha256sums="bb250ab011d805b5693972afdf95509e79bb3b390caa763275c9501f74b598a2  monit-5.7.tar.gz
92052d1642924e024a97158479138e83454e3ddbf1c4c9866691fd0664c52797  musl-fix.patch
78c013bb1258895a262c670a730e1319ea0f1140bbc3ca2f8dfc85ec02f923a1  monit.initd"
sha512sums="e76ee9d32b661f603fd24071f00d1ac26e64eed61a2246dcf4b1c6dc6654ab1304b1e6e4d18a100ad3802a1bb1adb2f4d8105e952ef1ae1049d5e6b0b0965368  monit-5.7.tar.gz
7718737ca30d5ff702b97789c7dd1cb45e5a23b9c86b761e10d8e66d382e45f87a1ee268cf64739b99ad8901417f0ab0d94ac47fef7ee5a6c6f77e38a9355ce5  musl-fix.patch
20fb54b251fd97e8014a35940a8cab1ca0de4c1ec3bcc05d2a9091585187759c1ce77cd5f872dde01fa91118d61e9ed3ec0650d09d7e767e78b42c68c1d35b64  monit.initd"