Last active
December 24, 2015 18:49
-
-
Save BenBergman/6845455 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Will Price <[email protected]> | |
# Contributor: Andrew67 (.desktop file, icon, 64bit compatibility) | |
pkgname=energia | |
pkgver=10 | |
pkgrel=3 | |
pkgdesc="Energia is a Arduino IDE clone for use with the MSP430 launchpad" | |
arch=('i686' 'x86_64') | |
url="http://energia.nu/" | |
license=('GPL') | |
groups=() | |
depends=(java-runtime) | |
if test "$CARCH" == x86_64; then | |
depends+=(lib32-libusb-compat) | |
else | |
depends+=(libusb-compat) | |
fi | |
makedepends=() | |
optdepends=() | |
provides=() | |
conflicts=() | |
replaces=() | |
backup=() | |
options=(!strip) | |
source=('http://energia.nu/download/downloadv3.php?file=$pkgname-0101E$pkgver-linux.tgz' | |
'http://i.imgur.com/ukLwVaV.png') | |
md5sums=('25fa71d800e42b8131d9a03dec0dccc9' | |
'804083af43028c59fa957ab9f280effb') | |
# Don't compress, takes too long | |
PKGEXT='.pkg.tar' | |
build() { | |
if [[ $CARCH == "x86_64" ]]; then | |
# Fixing serial support | |
echo "x86_64 build is unsupported by Energia and untested by me, report bugs to AUR" | |
echo "if this energia complains when compiling code, try recompilling mspgcc." | |
echo "A script for this purpose is found at /opt/energia/hardware/tools/build-mspgcc" | |
echo "this will install mspgcc at /opt/mspgcc, which should be detected by energia" | |
echo "your path" | |
cd "$srcdir"/$pkgname-0101E$pkgver/lib/ | |
mv librxtxSerial64.so librxtxSerial.so | |
fi | |
} | |
package() { | |
mkdir -p "$pkgdir"{/opt/energia,/usr/{bin,share/applications}} | |
# Copy contents of archive to targets dirs | |
cd "$srcdir/$pkgname-0101E$pkgver" | |
cp -R . "$pkgdir/opt/energia" | |
cp "$srcdir/ukLwVaV.png" "$pkgdir/opt/energia/energia.png" | |
# Install links | |
ln -s /opt/energia/energia "$pkgdir/usr/bin/" | |
# Add desktop file | |
cat > "$pkgdir/usr/share/applications/energia.desktop" << EOF | |
[Desktop Entry] | |
Name=Energia | |
GenericName=Energia IDE | |
Comment=The open-source Arduino environment for MSP431 Launchpad | |
Exec=/opt/energia/energia | |
Icon=/opt/energia/energia.png | |
Type=Application | |
Terminal=false | |
Categories=Development;IDE;Application; | |
EOF | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment