diff options
author | Håvard Pettersson | 2015-11-18 16:47:26 +0100 |
---|---|---|
committer | Håvard Pettersson | 2015-11-18 16:47:26 +0100 |
commit | e3409491785ab3978cffead8b81a6d1b3f88eea4 (patch) | |
tree | 424024633e28454330bb030a91192365b34e0df1 | |
download | aur-e3409491785ab3978cffead8b81a6d1b3f88eea4.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | simplicitystudio | 7 | ||||
-rw-r--r-- | simplicitystudio.patch | 34 |
4 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..910ff3396a09 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = simplicitystudio + pkgdesc = Design tools, documentation, software and support resources for EFM32™, EFM8™, 8051, Wireless MCUs and Wireless SoCs. + pkgver = 3.1 + pkgrel = 1 + url = http://www.silabs.com/products/mcu/Pages/simplicity-studio.aspx + arch = i686 + arch = x86_64 + license = unknown + options = !strip + source = http://www.silabs.com/Support%20Documents/Software/SimplicityStudio.tgz + source = simplicitystudio.patch + source = simplicitystudio + md5sums = 4202c5254e34331450e48a773767325e + md5sums = 8c316447fd415b6e3a87d8007ef7b9f7 + md5sums = 1265c0dc95aeb697be38eea0ed1cdbc9 + +pkgname = simplicitystudio + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..991d7bae9580 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Håvard Pettersson <mail@haavard.me> + +pkgname=simplicitystudio +pkgver=3.1 +pkgrel=1 +pkgdesc='Design tools, documentation, software and support resources for EFM32™, EFM8™, 8051, Wireless MCUs and Wireless SoCs.' +arch=(i686 x86_64) +url='http://www.silabs.com/products/mcu/Pages/simplicity-studio.aspx' + +license=('unknown') + +# should probably put something here but most dependencies are included +depends=() + +options=('!strip') + +source=(http://www.silabs.com/Support%20Documents/Software/SimplicityStudio.tgz + simplicitystudio.patch + simplicitystudio) +md5sums=('4202c5254e34331450e48a773767325e' + '8c316447fd415b6e3a87d8007ef7b9f7' + '1265c0dc95aeb697be38eea0ed1cdbc9') + +prepare() { + cd "$srcdir/SimplicityStudio_v3" + patch -p1 -i "$srcdir/simplicitystudio.patch" +} + +package() { + install -dm755 "$pkgdir/opt/" + install -dm755 "$pkgdir/usr/share/applications/" + install -dm755 "$pkgdir/etc/udev/rules.d" + + cp -r "$srcdir/SimplicityStudio_v3" "$pkgdir/opt/$pkgname" + + DESTDIR="$pkgdir" "$pkgdir/opt/$pkgname/setup.sh" + + # installation directory has to be writable + find "$pkgdir/opt/$pkgname" -type d -exec chmod a+w {} + + find "$pkgdir/opt/$pkgname" -type f -exec chmod a+w {} + + + install -Dm755 "$srcdir/simplicitystudio" "$pkgdir/usr/bin/$pkgname" + sed -i "s/^pkgname=.*/pkgname=$pkgname/" "$pkgdir/usr/bin/$pkgname" +} diff --git a/simplicitystudio b/simplicitystudio new file mode 100644 index 000000000000..d9bacb5555f1 --- /dev/null +++ b/simplicitystudio @@ -0,0 +1,7 @@ +#!/bin/sh + +pkgname=simplicitystudio # set by PKGBUILD + +cd "/opt/$pkgname" +exec ./studio "$@" + diff --git a/simplicitystudio.patch b/simplicitystudio.patch new file mode 100644 index 000000000000..d46b51f4b560 --- /dev/null +++ b/simplicitystudio.patch @@ -0,0 +1,34 @@ +diff -aur SimplicityStudio_v3/setup.sh SimplicityStudio_v3_patched/setup.sh +--- SimplicityStudio_v3/setup.sh 2015-10-20 22:24:35.000000000 +0200 ++++ SimplicityStudio_v3_patched/setup.sh 2015-11-18 16:09:49.410240104 +0100 +@@ -48,8 +48,8 @@ + chmod $mode "$folder/studio.desktop" + } + +-if [ -d "/usr/share/applications" ]; then +- create_desktop_file "/usr/share/applications" root 644 ++if [ -d "$DESTDIR/usr/share/applications" ]; then ++ create_desktop_file "$DESTDIR/usr/share/applications" root 644 + elif [ -d "$SUDO_HOME/.local/share/applications" ]; then + create_desktop_file "$SUDO_HOME/.local/share/applications" "$SUDO_USER" 755 + elif [ -d "$SUDO_HOME/Desktop" ]; then +@@ -61,8 +61,8 @@ + # Exit if /etc/udev/rules.d does not exist + # + +-if [ ! -d "/etc/udev/rules.d" ]; then +- echo ERROR /etc/udev/rules.d does not exist ++if [ ! -d "$DESTDIR/etc/udev/rules.d" ]; then ++ echo ERROR $DESTDIR/etc/udev/rules.d does not exist + exit 1 + fi + +@@ -77,7 +77,7 @@ + do + rules_file=`basename "$rules_path"` + echo "Installing $rules_file..."; +- cp "$rules_path" /etc/udev/rules.d ++ cp "$rules_path" "$DESTDIR/etc/udev/rules.d" + done + + # ------------------------------------------------------------------ |