aboutsummaryrefslogtreecommitdiffstats
path: root/main/coreutils/APKBUILD
blob: 8d9a63441a58e76c968254b0a2a05c3d91015054 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=coreutils
pkgver=8.24
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 perl"
install=
subpackages="$pkgname-doc"
install="$pkgname.post-deinstall"
source="http://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz
	coreutils-8.22-shuf-segfault.patch"

_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="40efdbce865d2458d8da0a9dcee7c16c  coreutils-8.24.tar.xz
94f7e6f373f37beb236caabed8fcdb52  coreutils-8.22-shuf-segfault.patch"
sha256sums="a2d75286a4b9ef3a13039c2da3868a61be4ee9f17d8ae380a35a97e506972170  coreutils-8.24.tar.xz
3d9074964b3be7ccf2a384de4a48ef372db13fd77c2fc7316d5a94f3fdcae17e  coreutils-8.22-shuf-segfault.patch"
sha512sums="b42bb233340353647bb9a1c3d9122c1a5379cf3602ba9197c3c935fc899897e7d4685148dfaf93eccc096bee0a9b03416d79dc9bb81d5d2dea6e04ed134a3d1b  coreutils-8.24.tar.xz
1e2ff3b4d32c3c833ee7b4fb29d7509bebfb3c8c5ea0c2bcfff48d221d03d3a6da47be6be5f723d792a26c66063a99293ab9a7b609726357bc45fb2a01bad844  coreutils-8.22-shuf-segfault.patch"