aboutsummaryrefslogtreecommitdiffstats
path: root/main/coreutils/APKBUILD
blob: 13273999f0664b953091b8ded0aa1906e9c58c01 (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=coreutils
pkgver=8.26
pkgrel=0
pkgdesc="The basic file, shell and text manipulation utilities"
url="http://www.gnu.org/software/coreutils/"
arch="all"
license="GPL3+"
makedepends="bash acl-dev perl"
subpackages="$pkgname-doc"
install="$pkgname.post-deinstall"
source="http://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz"

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	LIBS="-lrt" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls \
		--without-gmp \
		--enable-no-install-program=hostname,su,kill,uptime \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1

	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null

	install -d "$pkgdir"/bin "$pkgdir"/usr/sbin
	cd "$pkgdir"/usr/bin/

	# binaries that busybox puts in /bin
	mv base64 cat chgrp chmod chown cp date dd df 'echo' false ln ls \
		mkdir mknod mktemp mv nice printenv pwd rm rmdir sleep stat \
		stty sync touch true uname \
		"$pkgdir"/bin

	mv chroot "$pkgdir"/usr/sbin/
}

md5sums="d5aa2072f662d4118b9f4c63b94601a6  coreutils-8.26.tar.xz"
sha256sums="155e94d748f8e2bc327c66e0cbebdb8d6ab265d2f37c3c928f7bf6c3beba9a8e  coreutils-8.26.tar.xz"
sha512sums="1ca7b32a1564855e672f64cb815f858619dd4308af1c9763959d06fab1ecd51385c4c61d987ceec7ff6baaaac699f2db10be4be7e40b2c6a6d4ffc3911180b03  coreutils-8.26.tar.xz"