summaryrefslogtreecommitdiffstats
path: root/main/atop/APKBUILD
blob: 7ad9bd27de64ce811430e5054c71262eb1f48b41 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=atop
pkgver=1.27_p3
_ver=${pkgver/_p/-}
pkgrel=0
pkgdesc="Resource-specific view of processes"
url="http://www.atcomputing.nl/Tools/atop"
arch="all"
license="GPL-2"
depends=
makedepends="zlib-dev ncurses-dev"
subpackages="$pkgname-doc"
source="http://www.atoptool.nl/download/atop-$_ver.tar.gz
	atop-bb-compat.patch
	atop.initd"

_builddir="$srcdir"/$pkgname-$_ver
prepare() {
	cd "$_builddir"
	patch -p1 -i "$srcdir"/atop-bb-compat.patch || return 1
	sed -i -e '/^CFLAGS/s: = -O : += :' \
		-e '/^LDFLAGS/s: = : += :' Makefile
	cp "$srcdir"/atop.initd atop.init
	chmod a+rx atop.init
}

build() {
	cd "$_builddir"
	make
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/var/log/atop "$pkgdir"/var/run
	make DESTDIR="$pkgdir" \
		INIPATH=/etc/init.d \
		SCRPATH=/etc/periodic/daily \
		install
	rm -f "$pkgdir"/etc/cron.d
	mv "$pkgdir"/etc/periodic/daily/atop.daily \
		"$pkgdir"/etc/periodic/daily/atop

}

md5sums="4a4e896ed6ec6979f80898d37938b8d9  atop-1.27-3.tar.gz
3b4c7d162eafcd3db6e2647269065823  atop-bb-compat.patch
06aba14ddeadbb1d0c3594536785213b  atop.initd"