Guest User

Untitled

a guest
Dec 5th, 2013
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _target=arm-linux-gnueabi
  2. pkgname=cross-${_target}-binutils
  3. pkgver=2.24
  4. pkgrel=1
  5. pkgdesc="A set of programs to assemble and manipulate binary and object files"
  6. arch=(i686 x86_64)
  7. license=(GPL)
  8. options=('!libtool' '!buildflags')
  9. url="http://sources.redhat.com/binutils"
  10. depends=('glibc')
  11. source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2)
  12. md5sums=('e0f71a7b2ddab0f8612336ac81d9636b')
  13.  
  14. build() {
  15. cd $srcdir/binutils-${pkgver}
  16.  
  17. [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr \
  18. --program-prefix=${_target}- \
  19. --enable-shared \
  20. --disable-multilib \
  21. --with-lib-path=/usr/lib/binutils/${_target} \
  22. --with-local-prefix=/usr/lib/${_target} \
  23. --disable-nls \
  24. --target=${_target} \
  25. --host=$CHOST \
  26. --build=$CHOST \
  27. --with-sysroot=/usr/$CHOST/${_target} \
  28. --disable-werror
  29.  
  30. make configure-host
  31. make tooldir=$pkgdir/usr
  32. }
  33.  
  34. package() {
  35. cd $srcdir/binutils-${pkgver}
  36.  
  37. make DESTDIR="$pkgdir/" install
  38. make prefix=$pkgdir/usr tooldir=$pkgdir/usr install
  39.  
  40. mkdir -p $pkgdir/usr/lib/binutils/${_target}
  41. cp -v include/libiberty.h $pkgdir/usr/lib/binutils/${_target}
  42. cp -v include/demangle.h $pkgdir/usr/lib/binutils/${_target}
  43.  
  44. rm -f $pkgdir/usr/man/man1/{dlltool,nlmconv,windres,windmc}*
  45. rm ${pkgdir}/usr/share/info/{configure,standards}.info
  46.  
  47. rm -f $pkgdir/usr/bin/ar
  48. rm -f $pkgdir/usr/bin/as
  49. rm -f $pkgdir/usr/bin/ld
  50. rm -f $pkgdir/usr/bin/nm
  51. rm -f $pkgdir/usr/bin/objdump
  52. rm -f $pkgdir/usr/bin/ranlib
  53. rm -f $pkgdir/usr/bin/strip
  54. rm -f $pkgdir/usr/bin/objcopy
  55. rm -f $pkgdir/usr/lib/libiberty.a
  56. rm -rf $pkgdir/usr/share
  57. rm -f ${pkgdir}/usr/lib/lib{bfd,opcodes}.so
  58. }
RAW Paste Data