talimat 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Description: Utilities for showing and setting the basic system characteristics
  2. # URL: http://www.gnu.org/software/coreutils/
  3. # Maintainer: Jim Meyering meyering at redhat dot com
  4. # Packager: milisarge@gmail.com
  5. name=coreutils
  6. version=8.25
  7. release=2
  8. source=(http://ftp.gnu.org/gnu/$name/$name-$version.tar.xz
  9. http://www.linuxfromscratch.org/patches/downloads/$name/$name-$version-i18n-2.patch
  10. )
  11. build()
  12. {
  13. cd $name-$version
  14. patch -Np1 -i ../$name-$version-i18n-2.patch
  15. FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr \
  16. --libexecdir=/lib --bindir=/bin --sbindir=/sbin \
  17. --enable-no-install-program=kill,uptime
  18. FORCE_UNSAFE_CONFIGURE=1 make || FORCE_UNSAFE_CONFIGURE=1 make -j1
  19. if [ -f /tools/bin/su ];then
  20. make NON_ROOT_USERNAME=nobody check-root
  21. echo "dummy:x:1000:nobody" >> /etc/group
  22. chown -Rv nobody .
  23. su-tools nobody -s /bin/bash -c "make -k RUN_EXPENSIVE_TESTS=yes check"||true
  24. sed -i '/dummy/d' /etc/group
  25. fi
  26. make DESTDIR=$PKG install
  27. mkdir $PKG/sbin
  28. mkdir -p $PKG/usr/share/man/man8
  29. mv -v $PKG/bin/chroot $PKG/sbin
  30. mv -v $PKG/usr/share/man/man1/chroot.1 $PKG/usr/share/man/man8/chroot.8
  31. sed -i s/\"1\"/\"8\"/1 $PKG/usr/share/man/man8/chroot.8
  32. rm -rf $PKG/usr/share/info/dir
  33. mkdir -p $PKG/usr/bin
  34. mv $PKG/bin/env $PKG/usr/bin
  35. mv $PKG/bin/install $PKG/usr/bin
  36. }