#!/bin/bash # coreutils # # Douglas Thrift # # $Id$ name=coreutils version=6.7-1.1 revision=0 categories=(base sysutils textproc) description='Standard GNU file utilities, text utilities, and shell utilities' url='http://www.gnu.org/software/coreutils/' depends=('base/acl' 'base/autoconf') sources=(`site_gnu $name-${version%%-*}.tar.bz2` `site_gentoo distfiles/$name-${version%%-*}-patches-${version##*-}.tar.bz2`) sourcedir=$name-${version%%-*} function build() { cd $source/$sourcedir || return $? sed -e 's|^\([-+]\{3\} \)\(m4/acl.m4\)$|\1coreutils/\2|' -i $source/patch/acl/006_all_coreutils-acl-control.patch || return $? for patch in $source/patch/{acl,generic}/*.patch; do patch -p1 < $patch || return $? done aclocal -I m4 --verbose && autoconf -v && automake -v || return $? gnu_configure --prefix=/usr --bindir=/bin || return $? rm -v $package/{bin,usr/share/man/man1}/{groups,hostname,kill,su,uptime}?(.1) || return $? install -d $package/usr/{,s}bin || return $? mv -v $package/bin/!(cat|chgrp|chmod|chown|chroot|cp|date|dd|df|dir|echo|false|ln|ls|mkdir|mknod|mv|pwd|readlink|rm|rmdir|sleep|stty|sync|true|uname|vdir) $package/usr/bin || return $? mv -v $package/bin/chroot $package/usr/sbin || return $? cd $package/bin ln -sv `for file in *; do echo /bin/$file; done` $package/usr/bin }