summaryrefslogtreecommitdiff
path: root/system/procps/APKBUILD
blob: 65b740d6272625d50c1452ee0cb5333a2df8c380 (plain) (blame)
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
65
66
67
68
69
70
71
72
73
74
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=procps
pkgver=3.3.15
pkgrel=1
pkgdesc="Utilities for monitoring your system and processes on your system"
url="https://gitlab.com/procps-ng/procps"
arch="all"
license="GPL-2.0+ LGPL-2.0+"
depends=""
checkdepends="dejagnu"
makedepends_build="autoconf automake libtool gettext-tiny"
makedepends_host="ncurses-dev utmps-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang libproc"
source="https://gitlab.com/procps-ng/procps/-/archive/v$pkgver/procps-v$pkgver.tar.bz2
	0001-pt_BR-fix-translation-error.patch
	use-utmpx.patch"
builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	default_prepare
	printf "$pkgver" > .tarball-version
	./autogen.sh
}

build() {
	export LIBS="$LIBS -lutmps -lskarnet"
	export VERSION="$pkgver"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/ \
		--bindir=/bin \
		--sbindir=/sbin \
		--libdir=/lib \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		--docdir=/usr/share/doc \
		--datarootdir=/usr/share \
		--disable-static \
		--disable-rpath \
		--with-ncurses \
		ac_cv_func_malloc_0_nonnull=yes \
		ac_cv_func_realloc_0_nonnull=yes
	make
}

check() {
	# can't use `make check`; 'po' dir has no check target
	make check-TESTS
}

package() {
	make DESTDIR="$pkgdir" ldconfig=true install="install -D" \
		install

	# These binaries are identical.
	ln -sf pgrep "$pkgdir"/bin/pkill

	install -d "$pkgdir"/usr/lib
	mv "$pkgdir"/include "$pkgdir"/usr/ \
		&& mv "$pkgdir"/lib/pkgconfig "$pkgdir"/usr/lib/
}

libproc() {
	pkgdesc="Library for monitoring system and processes"
	license="LGPL-2.1+"

	install -d "$subpkgdir"/
	mv "$pkgdir"/lib "$subpkgdir"/
}

sha512sums="0c50ef0f19305f1b53089f20f29d8058b23dde20983dbed759ea0fe8128b22518fd137dec389c3630988b6bbf0cf485418a328153b89ec4e1dfbf6d89322c064  procps-v3.3.15.tar.bz2
d63c8df42f74f08f19276a8f4d0260624313801b138aa2b430a105328c3230427d3e81bc016ddde9fc995575e97961a3be8e4f5ded34c874cc613c645605a976  0001-pt_BR-fix-translation-error.patch
6683b94f64848721ebce8254461fbd70a3efd048bf9579c5bbe298bd1ec00594c05640327f0e03475e583607f1f7405139b93fc9f06592d5593174cbf6d4119f  use-utmpx.patch"