summaryrefslogtreecommitdiff
path: root/development/arduino/arduino.SlackBuild
diff options
context:
space:
mode:
authorVliegendehuiskat <vliegendehuiskat [at] gmail [dot] com>2012-02-19 21:46:53 -0600
committerRobby Workman <rworkman@slackbuilds.org>2012-02-20 12:20:47 -0600
commitcb7c8f408d5cf54e3bfc38be2b172726d13397a2 (patch)
treeced594fe9b96092a5a2475b85ff59464033619d0 /development/arduino/arduino.SlackBuild
parent840861ce8814fd32ee5594f526d5dc8af177b668 (diff)
downloadslackbuilds-cb7c8f408d5cf54e3bfc38be2b172726d13397a2.tar.gz
development/arduino: wrapper script bugfixes wrt CPLUS_INCLUDE_PATH
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'development/arduino/arduino.SlackBuild')
-rw-r--r--development/arduino/arduino.SlackBuild19
1 files changed, 11 insertions, 8 deletions
diff --git a/development/arduino/arduino.SlackBuild b/development/arduino/arduino.SlackBuild
index dd52ecb035..89a845b8ce 100644
--- a/development/arduino/arduino.SlackBuild
+++ b/development/arduino/arduino.SlackBuild
@@ -15,7 +15,7 @@
PRGNAM=arduino
VERSION=${VERSION:-1.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -33,7 +33,7 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
LIBDIRSUFFIX=""
- SRCSUFFIX=""
+ SRCSUFFIX="-linux"
elif [ "$ARCH" = "i686" ]; then
LIBDIRSUFFIX=""
SRCSUFFIX="-linux"
@@ -52,11 +52,11 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
+rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
-rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$SOURCENAME
-cd $PRGNAM-$VERSION
-chown -R root:root .
+cd $PKG
+chown -R root:root $PKG $TMP/$PRGNAM-$VERSION
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
@@ -70,6 +70,9 @@ find . \
mkdir -p $PKG/usr/bin
cat << EOF > $PKG/usr/bin/$PRGNAM
#!/bin/sh
+if [ -n \${CPLUS_INCLUDE_PATH} ]; then
+ unset CPLUS_INCLUDE_PATH
+fi
cd \$HOME
if [ \$(echo \$PATH | grep java | wc -l) -lt 1 ]; then
export PATH=\$PATH:/usr/lib$LIBDIRSUFFIX/java/bin:/usr/lib$LIBDIRSUFFIX/java/jre/bin:/usr/lib$LIBDIRSUFFIX/java/bin;
@@ -79,17 +82,17 @@ EOF
chmod 0755 $PKG/usr/bin/$PRGNAM
mkdir -p $PKG/$SYSTEMFOLDER
-cp -a * $PKG/$SYSTEMFOLDER/
+cp -a ../$PRGNAM-$VERSION/* $PKG/$SYSTEMFOLDER/
install -D -m 644 $CWD/arduino.desktop $PKG/usr/share/applications/arduino.desktop
-install -D -m 644 reference/img/logo.png $PKG/usr/share/pixmaps/arduino.png
+install -D -m 644 $TMP/$PRGNAM-$VERSION/reference/img/logo.png $PKG/usr/share/pixmaps/arduino.png
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- revisions.txt \
+ ../$PRGNAM-$VERSION/revisions.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild