aboutsummaryrefslogtreecommitdiff
path: root/gis/josm/josm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/josm/josm.SlackBuild')
-rw-r--r--gis/josm/josm.SlackBuild22
1 files changed, 11 insertions, 11 deletions
diff --git a/gis/josm/josm.SlackBuild b/gis/josm/josm.SlackBuild
index bdf16fd7d6f86..e988611a32c7e 100644
--- a/gis/josm/josm.SlackBuild
+++ b/gis/josm/josm.SlackBuild
@@ -42,24 +42,24 @@ fi
set -e
rm -rf $PKG
-mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
-cp $CWD/$PRGNAM-tested.jar $TMP/$PRGNAM/
-cd $TMP/$PRGNAM
+mkdir -p $TMP $PKG $OUTPUT
if [ "$VERSION" = "tested" ]; then
- VERSION=$(java -jar $PRGNAM-tested.jar --version | sed -e 's/.*(//' -e 's/ .*//')
+ SRCVER=tested
+ VERSION=$(java -jar $CWD/$PRGNAM-tested.jar --version | sed -e 's/.*(//' -e 's/ .*//')
+else
+ SRCVER=snapshot-$VERSION
fi
-cat > $TMP/$PRGNAM/$PRGNAM << EOF
+mkdir -p $PKG/opt/$PRGNAM
+cp $CWD/$PRGNAM-$SRCVER.jar $PKG/opt/$PRGNAM/$PRGNAM.jar
+
+mkdir -p $PKG/usr/bin
+cat > $PKG/usr/bin/$PRGNAM << EOF
#!/bin/bash
java -jar /opt/$PRGNAM/$PRGNAM.jar
EOF
-chmod 755 $TMP/$PRGNAM/$PRGNAM
-
-mkdir -p $PKG/opt/$PRGNAM
-cp $TMP/$PRGNAM/$PRGNAM-tested.jar $PKG/opt/$PRGNAM/$PRGNAM.jar
-mkdir -p $PKG/usr/bin
-cp $TMP/$PRGNAM/$PRGNAM $PKG/usr/bin/
+chmod 755 $PKG/usr/bin/$PRGNAM
# cp KDE desktop icon
mkdir -p $PKG/usr/share/applications