From cb7c8f408d5cf54e3bfc38be2b172726d13397a2 Mon Sep 17 00:00:00 2001 From: Vliegendehuiskat Date: Sun, 19 Feb 2012 21:46:53 -0600 Subject: development/arduino: wrapper script bugfixes wrt CPLUS_INCLUDE_PATH Signed-off-by: Robby Workman --- development/arduino/arduino.SlackBuild | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'development/arduino/arduino.SlackBuild') diff --git a/development/arduino/arduino.SlackBuild b/development/arduino/arduino.SlackBuild index dd52ecb03597d..89a845b8ce0f1 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 -- cgit v1.2.3