summaryrefslogtreecommitdiffstats
path: root/coreutils/Pkgfile
blob: 23a4fd3060e8f918020e25705c197515852b1082 (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
# Description: Collection d'utilitaire pour le coeur du systeme GNU
# URL: http://www.gnu.org/software/coreutils/
# Maintainer: Jim Meyering meyering at redhat dot com
# Packager: thierryn1 at hispeed dot ch

name=coreutils
version=8.17
release=2
source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.xz
	http://www.linuxfromscratch.org/patches/lfs/development/coreutils-$version-i18n-1.patch)

build() {
	cd $name-$version

	patch -Np1 -i ../$name-$version-i18n-1.patch

	FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr \
		--libexecdir=/usr/lib \
		--enable-no-install-program=kill,uptime,hostname \
		--disable-acl \
		--disable-libcap
	make
	make DESTDIR=$PKG install 
    
	mkdir $PKG/{bin,usr/sbin}
	mv $PKG/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $PKG/bin
	mv $PKG/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,readlink,rm} $PKG/bin
	mv $PKG/usr/bin/{rmdir,stty,sync,true,uname} $PKG/bin
	mv -v $PKG/usr/bin/chroot $PKG/usr/sbin
	mkdir -p $PKG/usr/share/man/man8/
	mv -v $PKG/usr/share/man/man1/chroot.1 $PKG/usr/share/man/man8/chroot.8
	sed -i s/\"1\"/\"8\"/1 $PKG/usr/share/man/man8/chroot.8
	mv -v $PKG/usr/bin/{head,sleep,nice} $PKG/bin
	if [ -f $PKG/usr/share/info/dir ]; then
		rm $PKG/usr/share/info/dir
	fi
}