void-packages/srcpkgs/arduino/template

55 lines
1.8 KiB
Bash
Raw Normal View History

2015-06-10 08:19:23 +02:00
# Template file for 'arduino'
pkgname=arduino
2015-12-15 10:13:59 +01:00
version=1.6.7
2015-11-05 11:59:36 +01:00
revision=1
2015-06-10 08:19:23 +02:00
makedepends="openjdk"
hostmakedepends="apache-ant unzip ImageMagick"
depends="virtual?java-runtime avr-binutils avr-gcc avr-libc avrdude"
short_desc="IDE for the arduino open-source electronics prototyping platform"
maintainer="Enno Boland <gottox@voidlinux.eu>"
license="GPL-2, LGPL-2"
homepage="http://arduino.cc/"
distfiles="
https://github.com/arduino/Arduino/archive/${version}.tar.gz
2015-06-10 08:19:23 +02:00
${SOURCEFORGE_SITE}/astyle/astyle_2.05.1_linux.tar.gz"
2015-12-15 10:13:59 +01:00
checksum="fbbbe3bad6d85fe3243ecdb5248b52e3b609cc03d649a2e16684194d4f9db85f
2015-06-10 08:19:23 +02:00
fbdfc6f1966a972d19a215927266c76d4183eee235ed1e2bd7ec551c2a270eac"
nostrip=yes
wrksrc=Arduino-$version
do_build() {
. /etc/profile.d/apache-ant.sh
. /etc/profile.d/10_openjdk.sh
export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/lib/jvm/openjdk/include/linux"
export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/lib/jvm/openjdk/include"
2015-06-10 08:19:23 +02:00
mkdir -p build/linux/work/lib
cd ../astyle/build/gcc
make ${makejobs} java
cp bin/libastyle-2.05.1j.so \
../../../Arduino-$version/build/linux/work/lib/libastylej.so
cd ../../../Arduino-$version/build
ant linux-build package-library-index-json-bundle
2015-06-10 08:19:23 +02:00
sed -i -e "s#{runtime\.tools\.[^.]*\.path}#/usr#g" \
-e "s#\(tools\.avrdude\.config\.path=\).*#\1/etc/avrdude.conf#" \
2015-11-05 17:03:03 +01:00
linux/work/hardware/arduino/avr/platform.txt
2015-06-10 08:19:23 +02:00
convert linux/work/lib/arduino_icon.ico icon.png
}
do_install() {
vmkdir usr/lib
vmkdir usr/bin
vcopy build/linux/work usr/lib/arduino
ln -sf /usr/lib/arduino/arduino ${DESTDIR}/usr/bin/arduino
for i in build/icon*.png; do
2015-06-17 10:06:27 +02:00
size=$(identify $i | cut -d' ' -f 3)
2015-06-10 08:19:23 +02:00
case $size in
16x16|32x32|48x48|256x256)
vinstall $i 644 usr/share/icons/hicolor/${size}/apps arduino.png
;;
esac
done
vinstall ${FILESDIR}/arduino.desktop 644 usr/share/applications
}