aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--development/Arduino/Arduino.SlackBuild165
-rw-r--r--development/Arduino/Arduino.info56
-rw-r--r--development/Arduino/README10
-rw-r--r--development/Arduino/doinst.sh3
-rw-r--r--development/Arduino/slack-desc19
5 files changed, 253 insertions, 0 deletions
diff --git a/development/Arduino/Arduino.SlackBuild b/development/Arduino/Arduino.SlackBuild
new file mode 100644
index 000000000000..de5e4aaf3f73
--- /dev/null
+++ b/development/Arduino/Arduino.SlackBuild
@@ -0,0 +1,165 @@
+#!/bin/sh
+
+# Slackware build script for Arduino
+
+# Copyright 2015 Mario Preksavec, Zagreb, Croatia
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=Arduino
+VERSION=${VERSION:-1.6.5}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+REFERENCE=${REFERENCE:-1.6.0}
+GALILEO=${GALILEO:-1.6.2}
+EDISON=${EDISON:-1.6.2}
+FIRMATA=${FIRMATA:-2.4.3}
+TEMBOO=${TEMBOO:-1.1.2}
+LIBASTYLEJ=${LIBASTYLEJ:-2.05}
+
+AVRLIBC=${AVRLIBC:-1.8.0}
+AVRHEADERS=${AVRHEADERS:-6.2.0.469}
+AVRDUDE=${AVRDUDE:-6.0.1}
+BINUTILS=${BINUTILS:-2.24}
+GMP=${GMP:-5.0.2}
+MPFR=${MPFR:-3.0.0}
+MPC=${MPC:-0.9}
+GCC=${GCC:-4.8.1}
+GDB=${GDB:-7.8}
+LIBUSB=${LIBUSB:-1.0.18}
+LIBUSBCOMPAT=${LIBUSBCOMPAT:-0.1.5}
+AUTOCONF=${AUTOCONF:-2.64}
+AUTOMAKE=${AUTOMAKE:-1.11.1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Use already present toolchain requirements
+tar xvf $CWD/avr-gcc-$GCC-avrdude-$AVRDUDE-arduino5.tar.gz
+cp $CWD/avr-libc-$AVRLIBC.tar.bz2 \
+ $CWD/avr8-headers-$AVRHEADERS.zip \
+ $CWD/avrdude-$AVRDUDE.tar.gz \
+ $CWD/binutils-$BINUTILS.tar.bz2 \
+ $CWD/gmp-$GMP.tar.bz2 \
+ $CWD/mpfr-$MPFR.tar.bz2 \
+ $CWD/mpc-$MPC.tar.gz \
+ $CWD/gcc-$GCC.tar.bz2 \
+ $CWD/gdb-$GDB.tar.xz \
+ $CWD/libusb-$LIBUSB.tar.bz2 \
+ $CWD/libusb-compat-$LIBUSBCOMPAT.tar.bz2 \
+ $CWD/autoconf-$AUTOCONF.tar.bz2 \
+ $CWD/automake-$AUTOMAKE.tar.bz2 \
+ toolchain-avr-avr-gcc-$GCC-avrdude-$AVRDUDE-arduino5/
+
+# Build toolchain
+( cd toolchain-avr-avr-gcc-$GCC-avrdude-$AVRDUDE-arduino5 ; ./build.all.bash )
+
+# Copy toolchain to where it can be found (`mv` will preserve some space)
+mkdir -p build/linux/work/hardware/tools/
+mv toolchain-avr-avr-gcc-$GCC-avrdude-$AVRDUDE-arduino5/avr/ \
+ build/linux/work/hardware/tools/
+cp -r toolchain-avr-avr-gcc-$GCC-avrdude-$AVRDUDE-arduino5/avrdude-$AVRDUDE/* \
+ build/linux/work/hardware/tools/avr/
+echo -e "arduino.avrdude=$AVRDUDE-arduino5\narduino.avr-gcc=$GCC-arduino5" \
+ > build/linux/work/hardware/tools/avr/builtin_tools_versions.txt
+
+# Use already present toolchain and library bundles
+sed -e '/<antcall target="avr-toolchain-bundle">/,/<\/antcall>/d' \
+ -e '/<antcall target="package-library-index-json-bundle"\/>/d' \
+ -i build/build.xml
+
+# Copy documentation, help and libraries
+cp $CWD/reference-$REFERENCE.zip \
+ $CWD/Galileo_help_files-$GALILEO.zip \
+ $CWD/Edison_help_files-$EDISON.zip \
+ build/shared/
+cp $CWD/v$FIRMATA.zip build/Firmata-$FIRMATA.zip
+cp $CWD/$TEMBOO.zip build/Temboo-$TEMBOO.zip
+cp $CWD/libastylej-$LIBASTYLEJ.zip build/
+
+# Unpack library bundles
+mkdir -p build/linux/work/dist/
+cp $CWD/package_index.json.sig build/linux/work/dist/
+gunzip -c $CWD/package_index.json.gz > build/linux/work/dist/package_index.json
+gunzip -c $CWD/library_index.json.gz > build/linux/work/dist/library_index.json
+
+# Finally, build Arduino
+( cd build ; ant )
+
+# Manual install ensues
+mkdir $PKG/opt
+mv build/linux/work $PKG/opt/$PRGNAM
+rm -rf $PKG/opt/$PRGNAM/hardware/tmp/
+
+# Make it a bit more user friendly
+mkdir -p $PKG/usr/{bin,share/applications}
+sed -i "s/FULL_PATH/\/opt\/$PRGNAM/" $PKG/opt/$PRGNAM/arduino.desktop
+mv $PKG/opt/$PRGNAM/arduino.desktop $PKG/usr/share/applications/
+ln -s /opt/$PRGNAM/arduino $PKG/usr/bin/
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.md license.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/Arduino/Arduino.info b/development/Arduino/Arduino.info
new file mode 100644
index 000000000000..b859f8cd1fa9
--- /dev/null
+++ b/development/Arduino/Arduino.info
@@ -0,0 +1,56 @@
+PRGNAM="Arduino"
+VERSION="1.6.5"
+HOMEPAGE="http://www.arduino.cc/"
+DOWNLOAD="https://github.com/arduino/Arduino/archive/1.6.5.tar.gz \
+ http://downloads.arduino.cc/reference-1.6.0.zip \
+ http://downloads.arduino.cc/Galileo_help_files-1.6.2.zip \
+ http://downloads.arduino.cc/Edison_help_files-1.6.2.zip \
+ https://github.com/arduino-libraries/Firmata/archive/v2.4.3.zip \
+ https://github.com/temboo/Temboo/archive/1.1.2.zip \
+ http://downloads.arduino.cc/libastylej-2.05.zip \
+ http://downloads.arduino.cc/packages/package_index.json.gz \
+ http://downloads.arduino.cc/packages/package_index.json.sig \
+ http://downloads.arduino.cc/libraries/library_index.json.gz \
+ https://github.com/arduino/toolchain-avr/archive/avr-gcc-4.8.1-avrdude-6.0.1-arduino5.tar.gz \
+ http://download.savannah.gnu.org/releases/avr-libc/avr-libc-1.8.0.tar.bz2 \
+ http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.4.5/avr8-headers-6.2.0.469.zip \
+ http://download.savannah.gnu.org/releases/avrdude/avrdude-6.0.1.tar.gz \
+ http://mirror.switch.ch/ftp/mirror/gnu/binutils/binutils-2.24.tar.bz2 \
+ http://mirror.switch.ch/ftp/mirror/gnu/gmp/gmp-5.0.2.tar.bz2 \
+ http://mirror.switch.ch/ftp/mirror/gnu/mpfr/mpfr-3.0.0.tar.bz2 \
+ http://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz \
+ http://mirror.switch.ch/ftp/mirror/gnu/gcc/gcc-4.8.1/gcc-4.8.1.tar.bz2 \
+ http://mirror.switch.ch/ftp/mirror/gnu/gdb/gdb-7.8.tar.xz \
+ http://download.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.18/libusb-1.0.18.tar.bz2 \
+ http://download.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-0.1.5/libusb-compat-0.1.5.tar.bz2 \
+ http://mirror.switch.ch/ftp/mirror/gnu/autoconf/autoconf-2.64.tar.bz2 \
+ http://mirror.switch.ch/ftp/mirror/gnu/automake/automake-1.11.1.tar.bz2"
+MD5SUM="b340a595fb024da1636eb396342b011d \
+ e95c906955bbdefcf31751633b289d48 \
+ dfa93daedbe9188f20f00308f64f4908 \
+ c97d466ee23021ffb0d57c222d93e96f \
+ edbdc40caceef0841843df661c2e7483 \
+ 96797ddb8f7b252fedc029e22f76bb8d \
+ 22787c4d0910a628b0ed71cdd40d8c13 \
+ c6af2f221f2830a50c2a17817500733a \
+ fe1dd73e5baaef2432a29feb5c5455b2 \
+ 8feb8fcf526a4ed25e25d150b002b0ad \
+ 573b7840861c311e8eafbf07e37c0786 \
+ 54c71798f24c96bab206be098062344f \
+ 3719aca9af4d0d3a0855a8d43c92a4ae \
+ 346ec2e46393a54ac152b95abf1d9850 \
+ e0f71a7b2ddab0f8612336ac81d9636b \
+ 0bbaedc82fb30315b06b1588b9077cd3 \
+ f45bac3584922c8004a10060ab1a8f9f \
+ 0d6acab8d214bd7d1fbbc593e83dd00d \
+ 3b2386c114cd74185aa3754b58a79304 \
+ bd958fe9019d7c7896f29f6724a764ed \
+ 4a6d049923efc6496f1d383054dac1a6 \
+ 2780b6a758a1e2c2943bdbf7faf740e4 \
+ ef400d672005e0be21e0d20648169074 \
+ c2972c4d9b3e29c03d5f2af86249876f"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="apache-ant"
+MAINTAINER="Mario Preksavec"
+EMAIL="mario at slackware dot hr"
diff --git a/development/Arduino/README b/development/Arduino/README
new file mode 100644
index 000000000000..320ad525358a
--- /dev/null
+++ b/development/Arduino/README
@@ -0,0 +1,10 @@
+The open-source Arduino Software (IDE) makes it easy to write code and upload
+it to the board. It runs on Windows, Mac OS X, and Linux. The environment
+is written in Java and based on Processing and other open-source software.
+This software can be used with any Arduino board.
+
+NOTE: This script no longer uses binary packages from the upstream, and
+it's a complete rewrite from scratch. Currently, the upstream compiles on a
+system which uses libraries not found in stock Slackware packages, namely
+libtinfo from ncurses. This change affects both compile taking longer and
+a free space requirement now being close to 1GB.
diff --git a/development/Arduino/doinst.sh b/development/Arduino/doinst.sh
new file mode 100644
index 000000000000..5fb28930db0b
--- /dev/null
+++ b/development/Arduino/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
diff --git a/development/Arduino/slack-desc b/development/Arduino/slack-desc
new file mode 100644
index 000000000000..cbf4a9fd8d0b
--- /dev/null
+++ b/development/Arduino/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+Arduino: Arduino (IDE)
+Arduino:
+Arduino: The open-source Arduino Software (IDE) makes it easy to write code
+Arduino: and upload it to the board. It runs on Windows, Mac OS X, and Linux.
+Arduino: The environment is written in Java and based on Processing and other
+Arduino: open-source software.
+Arduino: This software can be used with any Arduino board.
+Arduino:
+Arduino: Homepage: http://www.arduino.cc/
+Arduino:
+Arduino: