1 # Contributor: DaNiMoTh <jjdanimoth@gmail.com>
2 pkgname=crossbinutils-ppc32
4 _target="powerpc-unknown-linux-gnu"
7 pkgdesc="A set of programs to assemble and manipulate binary and object files for PowerPC (32 bit) architecture"
8 url="http://www.gnu.org/software/binutils/"
12 source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2")
13 _sysroot="/usr/lib/cross-${_target}"
16 cd ${srcdir}/${_pkgname}-${pkgver}
19 "--prefix=${_sysroot}" \
20 "--bindir=/usr/bin" "--program-prefix=${_target}-" \
21 "--with-sysroot=${_sysroot}" \
22 "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
24 --with-gcc --with-gnu-as --with-gnu-ld \
25 --without-included-gettext \
29 make DESTDIR=${pkgdir} install || return 1
31 msg "Removing duplicit files..."
32 # remove these files as they are already in the system
33 # (with native binutils)
34 rm -Rf ${pkgdir}${_sysroot}/share/{man,info}
35 # remove conflicting binaries
36 find ${pkgdir}/usr/bin/ -type f -not -name 'powerpc-unknown-linux-gnu-*' -delete
38 msg "Creating out-of-path executables..."
39 # symlink executables to single directory with no-arch-prefix name
40 mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
41 cd ${pkgdir}/usr/bin/cross/${_target}/;
42 for bin in ${pkgdir}/usr/bin/${_target}-*; do
43 bbin=`basename "$bin"`;
44 ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
48 md5sums=('c84c5acc9d266f1a7044b51c85a823f5')