aboutsummaryrefslogtreecommitdiffstats
path: root/main/coreutils
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-02-15 14:44:24 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-02-15 14:45:08 +0000
commit7b0625bd69e00e6e594bf2ce2965d9c16b666e94 (patch)
tree4e948fa48014f135688e502671cfb91aa4379d92 /main/coreutils
parent2dc988afe817d030718ef338ffccbf81b28f4634 (diff)
main/coreutils: modernize, enable single-binary support
(cuts package size down by 4MiB)
Diffstat (limited to 'main/coreutils')
-rw-r--r--main/coreutils/APKBUILD33
1 files changed, 23 insertions, 10 deletions
diff --git a/main/coreutils/APKBUILD b/main/coreutils/APKBUILD
index a5160a061cd..a044c2a61f5 100644
--- a/main/coreutils/APKBUILD
+++ b/main/coreutils/APKBUILD
@@ -3,15 +3,16 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=coreutils
pkgver=8.29
-pkgrel=0
+pkgrel=1
pkgdesc="The basic file, shell and text manipulation utilities"
url="https://www.gnu.org/software/coreutils/"
arch="all"
license="GPL-3.0-or-later"
-makedepends="bash acl-dev perl"
+makedepends="bash acl-dev attr-dev perl"
subpackages="$pkgname-doc"
install="$pkgname.post-deinstall"
source="http://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz"
+options="!check"
builddir="$srcdir"/$pkgname-$pkgver
@@ -27,13 +28,13 @@ build() {
--disable-nls \
--without-gmp \
--enable-no-install-program=hostname,su,kill,uptime \
- || return 1
- make || return 1
+ --enable-single-binary=symlinks
+ make
}
package() {
cd "$builddir"
- make DESTDIR="$pkgdir" install || return 1
+ make DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/usr/lib/charset.alias
rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
@@ -42,12 +43,24 @@ package() {
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
+ local busybox_bin="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"
- mv chroot "$pkgdir"/usr/sbin/
+ # as these binaries live in /bin on busybox, we want to put them in /bin with coreutils
+ for i in $busybox_bin; do
+ rm "$pkgdir"/usr/bin/$i
+ ln -s ../usr/bin/coreutils "$pkgdir"/bin/$i
+ done
+
+ # chroot lives in /usr/sbin with busybox
+ rm "$pkgdir"/usr/bin/chroot
+ ln -s ../usr/bin/coreutils "$pkgdir"/usr/sbin/chroot
+}
+
+# XXX - some gnulib tests broken, find a way to patch out gnulib tests
+check() {
+ cd "$builddir"
+ make check
}
sha512sums="546bbcd5741beae7a68e7c4ca14d6d634f7c8be87feecdeddd00e226f4865bb89d503437c3a95622ba7bb0cb70addbb5bdf3767fa18d0b7410ab90ee53b29dfd coreutils-8.29.tar.xz"