1 # Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
2 pkgname=cross-sparc64-linux-gnu-binutils
4 _target="sparc64-linux-gnu"
7 pkgdesc="A set of programs to assemble and manipulate binary and object files for the Sparc64 architecture"
8 url="http://www.gnu.org/software/binutils/"
12 source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2")
13 md5sums=('ee0f10756c84979622b992a4a61ea3f5')
14 _sysroot="/usr/lib/cross-${_target}"
17 cd ${srcdir}/${_pkgname}-${pkgver}
20 "--prefix=${_sysroot}" \
21 "--bindir=/usr/bin" "--program-prefix=${_target}-" \
22 "--with-sysroot=${_sysroot}" \
23 "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
25 --with-gcc --with-gnu-as --with-gnu-ld \
26 --without-included-gettext
32 cd ${srcdir}/${_pkgname}-${pkgver}
34 make DESTDIR=${pkgdir} install
36 msg "Removing duplicit files..."
37 # remove these files as they are already in the system
38 # (with native binutils)
39 rm -Rf ${pkgdir}${_sysroot}/share/{man,info}
40 # remove conflicting binaries
41 find ${pkgdir}/usr/bin/ -type f -not -name "${_target}-*" -delete
43 msg "Creating out-of-path executables..."
44 # symlink executables to single directory with no-arch-prefix name
45 mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
46 cd ${pkgdir}/usr/bin/cross/${_target}/;
47 for bin in ${pkgdir}/usr/bin/${_target}-*; do
48 bbin=`basename "$bin"`;
49 ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;