summaryrefslogtreecommitdiff
path: root/community/binutils-avr/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/binutils-avr/PKGBUILD')
-rw-r--r--community/binutils-avr/PKGBUILD71
1 files changed, 71 insertions, 0 deletions
diff --git a/community/binutils-avr/PKGBUILD b/community/binutils-avr/PKGBUILD
new file mode 100644
index 000000000..6976cd203
--- /dev/null
+++ b/community/binutils-avr/PKGBUILD
@@ -0,0 +1,71 @@
+# $Id: PKGBUILD 37177 2011-01-12 01:51:26Z bfanella $
+# Maintainer: Brad Fanella <bradfanella@archlinux.us>
+# Contributor: Corrado Primier <bardo@aur.archlinux.org>
+# Contributor: danst0 <danst0@west.de>
+
+pkgname=binutils-avr
+pkgver=2.21
+pkgrel=1
+pkgdesc="A set of programs to assemble and manipulate binary and object files for the avr architecture"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/binutils/"
+license=('GPL')
+depends=('glibc>=2.12.1-5' 'zlib')
+options=('!libtool' '!distcc' '!ccache')
+source=(http://ftp.gnu.org/gnu/${pkgname/-avr}/${pkgname/-avr}-${pkgver}.tar.bz2)
+md5sums=('c84c5acc9d266f1a7044b51c85a823f5')
+
+build() {
+ cd ${srcdir}/${pkgname/-avr}-${pkgver}
+
+ mkdir build
+ cd build
+
+ CC="gcc -L$(pwd)/bfd/.libs/"
+ if [ "${CARCH}" = "x86_64" ]; then
+ ../configure --build=$(../config.guess) \
+ --disable-multilib \
+ --disable-nls \
+ --enable-64-bit-bfd \
+ --enable-install-libbfd \
+ --includedir=/usr/$(../config.guess)/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --target=avr
+ else
+ ../configure --build=$(../config.guess) \
+ --disable-nls \
+ --enable-install-libbfd \
+ --includedir=/usr/$(../config.guess)/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --mandir=/usr/share/man \
+ --prefix=/usr \
+ --target=avr
+ fi
+
+ # This checks the host environment and makes sure all the necessary tools are available to compile Binutils.
+ make configure-host
+
+ make tooldir=/usr
+}
+
+package() {
+ cd ${srcdir}/${pkgname/-avr}-${pkgver}
+
+ cd build
+ make DESTDIR=${pkgdir} tooldir=/usr install
+
+ rm -f ${pkgdir}/usr/lib/libiberty.a
+
+ for bin in addr2line ar as c++filt gprof ld nm objcopy objdump ranlib readelf size strings strip ; do
+ rm -f ${pkgdir}/usr/bin/${bin} || return 1
+ done
+
+ for info in as bfd binutils configure gprof ld standards; do
+ mv ${pkgdir}/usr/share/info/${info}.info ${pkgdir}/usr/share/info/avr-${info}.info
+ done
+}
+