aboutsummaryrefslogtreecommitdiffstats
path: root/main/coreutils/APKBUILD
blob: 3b97357a62dffdd3bdd704a82ad3be34d1541e9b (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: Michael Mason <ms13sp@gmail.com> 
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=coreutils
pkgver=8.22
pkgrel=0
pkgdesc="The basic file, shell and text manipulation utilities"
url="http://www.gnu.org/software/coreutils/"
arch="all"
license="GPL3+"
depends=
makedepends="bash acl-dev"
install=
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="8fb0ae2267aa6e728958adc38f8163a2  coreutils-8.22.tar.xz"
sha256sums="5b3e94998152c017e6c75d56b9b994188eb71bf46d4038a642cb9141f6ff1212  coreutils-8.22.tar.xz"
sha512sums="2f14c2cab7001297309b4774bf3d610ecbaaec7d98d68e3792b24d2b52d319c4e30e55f803e56c48b9b9a1b76eb1c9636be5444fe1dc1dbcdd6150cfcb34847f  coreutils-8.22.tar.xz"