Commit eb1e352d authored by Mateusz Krawczuk's avatar Mateusz Krawczuk
Browse files

Added gcc-avr, binutils-avr, avr-libc and avrdude

parent adfd491c
pkgname=avr-libc
pkgver=1.7.1
pkgrel=1
pkgdesc="The C runtime library for the AVR family of microcontrollers"
arch=('any')
url="http://savannah.nongnu.org/projects/avr-libc/"
license=('custom')
depends=('gcc-avr')
source=(http://savannah.nongnu.org/download/avr-libc/${pkgname}-${pkgver}.tar.bz2)
md5sums=('8608061dcff075d44d5c59cb7b6a6f39')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure --build=$(./config.guess) --host=avr --prefix=/usr
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
}
pkgname=avrdude
pkgver=5.10
pkgrel=1
pkgdesc="Download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers"
arch=('i686' 'x86_64')
url="http://www.nongnu.org/avrdude/"
license=('GPL')
depends=('libusb-compat' 'readline')
source=(http://download.savannah.gnu.org/releases/avrdude/${pkgname}-${pkgver}.tar.gz)
md5sums=('69b082683047e054348088fd63bad2ff')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
./configure --mandir=/usr/share/man --prefix=/usr --sysconfdir=/etc
make
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
}
\ No newline at end of file
pkgname=binutils-avr
pkgver=2.21.1
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=('a22801a9cad45c85e9ff6afc10537d72')
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
}
pkgname=gcc-avr
pkgver=4.6.1
pkgrel=1
pkgdesc="The GNU avr Compiler Collection"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'custom')
url="http://gcc.gnu.org/"
depends=('binutils-avr>=2.21' 'cloog' 'ppl' 'gcc-libs>=4.6.0' 'libmpc')
options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
source=(http://ftp.gnu.org/gnu/gcc/${pkgname/-avr}-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2)
build() {
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
cd "${srcdir}/${pkgname/-avr}-${pkgver}"
mkdir build
cd build
../configure --disable-libssp \
--disable-nls \
--enable-languages=c,c++ \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--mandir=/usr/share/man \
--prefix=/usr \
--target=avr \
--with-gnu-as \
--with-gnu-ld \
--with-as=/usr/bin/avr-as \
--with-ld=/usr/bin/avr-ld
make
}
package() {
cd "${srcdir}/${pkgname/-avr}-${pkgver}"
cd build
make -j1 DESTDIR=${pkgdir} install
install -Dm644 "${srcdir}/${pkgname/-avr}-${pkgver}/COPYING.RUNTIME" \
"${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION"
rm -f ${pkgdir}/usr/lib/libiberty.a
rm -rf ${pkgdir}/usr/share/man/man7
rm -rf ${pkgdir}/usr/share/info
}
md5sums=('0c0e7e35d2215e19de9c97efba507553'
'0d75ca7ca35b1e7f252223f9d23a6ad1')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment