aboutsummaryrefslogtreecommitdiffstats
path: root/main/acct/APKBUILD
blob: 3b665ea853a1f2a61a88d9c8eeb92b03184fccfe (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
65
66
67
68
69
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Contributor: Dermot Bradley <dermot_bradley@yahoo.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=acct
pkgver=6.6.4
pkgrel=1
pkgdesc="The GNU Accounting Utilities"
url="https://www.gnu.org/software/acct/"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	linux-headers
	"
options="!check" # compares build utils with host utils so may fail
subpackages="
	$pkgname-doc
	$pkgname-openrc
	"
source="
	https://ftp.gnu.org/gnu/acct/acct-$pkgver.tar.gz
	initd
	logrotate
	"

prepare() {
	default_prepare
	update_config_sub
	sed -i -e '/gets is a/d' \
		"$builddir"/lib/stdio.in.h

	# correct the path to the wtmp file
	sed -i -e 's|, WTMP_FILE|, "/var/log/wtmp"|' \
		configure
}

build() {
	# seems like this makefile does not respect DESTDIR
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir="$pkgdir"/usr/share/man \
		--infodir="$pkgdir"/usr/share/info \
		--enable-linux-multiformat
	make LDADD="-lm lib/libgnu.la"
}

package() {
	make prefix="$pkgdir/usr" install

	# last is provided by util-linux-login
	rm "$pkgdir"/usr/bin/last "$pkgdir"/usr/share/man/man1/last.1

	install -m755 \
		-D \
		"$srcdir"/initd \
		"$pkgdir"/etc/init.d/acct

	install -m644 \
		-D \
		"$srcdir"/logrotate \
		"$pkgdir"/etc/logrotate.d/acct
}

sha512sums="
413aa446caece8fd773c92e2995bbaa034f63dd0ced521815a676c49f118e02982862b9c0ab7e60be5212c87d1e82ba6325bda212cf4857392a068d359a1e2c2  acct-6.6.4.tar.gz
ccde27aeb9e21199c151fdd528dc195aefe4919d61996cdaf5321d488210e727f09a8d65a01b07e5d4cbd69bdc2ed4e8b75538dbcf4e6464474ed3fb5b62f9a4  initd
4be87c186fc9898cc1d1096cfb37616954fd992cdb40f1dde8b5ddaf94794235015ea2bbd0fccd32f1f33798ea557186bb93d1da1c9105e8d328a6e2965d58fe  logrotate
"