diff options
author | kyak | 2015-08-11 18:06:41 +0300 |
---|---|---|
committer | kyak | 2015-08-11 18:06:41 +0300 |
commit | 768fbc2386b0ffc6a7d789feb00f4d4e6be2e05b (patch) | |
tree | 37ef2a04682fa7816c8b02e4c899bdcb8666ee29 | |
download | aur-768fbc2386b0ffc6a7d789feb00f4d4e6be2e05b.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 61 |
2 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..eb98670b8d40 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = cross-mipsel-linux-gnu-binutils + pkgdesc = A set of programs to assemble and manipulate binary and object files for the MIPS architecture + pkgver = 2.24 + pkgrel = 1 + url = http://www.gnu.org/software/binutils/ + arch = i686 + arch = x86_64 + license = GPL + depends = zlib + source = ftp://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2 + md5sums = e0f71a7b2ddab0f8612336ac81d9636b + +pkgname = cross-mipsel-linux-gnu-binutils + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..73532eb47116 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz> +pkgname=cross-mipsel-linux-gnu-binutils +_pkgname=binutils +_target="mipsel-linux-gnu" +pkgver=2.24 +pkgrel=1 +pkgdesc="A set of programs to assemble and manipulate binary and object files for the MIPS architecture" +url="http://www.gnu.org/software/binutils/" +arch=('i686' 'x86_64') +license=('GPL') +depends=('zlib') +source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2") +md5sums=('e0f71a7b2ddab0f8612336ac81d9636b') +_sysroot="/usr/lib/cross-${_target}" + +prepare() { + cd ${srcdir}/${_pkgname}-${pkgver} + + # Hack - see native package for details + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure +} + + +build() { + + cd ${srcdir}/${_pkgname}-${pkgver} + + ./configure \ + "--prefix=${_sysroot}" \ + "--bindir=/usr/bin" "--program-prefix=${_target}-" \ + "--with-sysroot=${_sysroot}" \ + "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \ + --disable-werror \ + "--disable-nls" \ + --with-gcc --with-gnu-as --with-gnu-ld \ + --without-included-gettext + + make all +} + +package() { + cd ${srcdir}/${_pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install + + msg "Removing duplicit files..." + # remove these files as they are already in the system + # (with native binutils) + rm -Rf ${pkgdir}${_sysroot}/share/{man,info} + # remove conflicting binaries + find ${pkgdir}/usr/bin/ -type f -not -name 'mipsel-linux-gnu-*' -delete + + msg "Creating out-of-path executables..." + # symlink executables to single directory with no-arch-prefix name + mkdir -p ${pkgdir}/usr/bin/cross/${_target}/; + cd ${pkgdir}/usr/bin/cross/${_target}/; + for bin in ${pkgdir}/usr/bin/${_target}-*; do + bbin=`basename "$bin"`; + ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`; + done +} |