summaryrefslogtreecommitdiffstats
path: root/academic/fiji/fiji.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/fiji/fiji.SlackBuild')
-rw-r--r--academic/fiji/fiji.SlackBuild63
1 files changed, 35 insertions, 28 deletions
diff --git a/academic/fiji/fiji.SlackBuild b/academic/fiji/fiji.SlackBuild
index 41c118aaa9..137669d5c6 100644
--- a/academic/fiji/fiji.SlackBuild
+++ b/academic/fiji/fiji.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for fiji
-# Copyright 2018-2019 Petar Petrov slackalaxy@gmail.com
+# Copyright 2018-2023 Petar Petrov slackalaxy@gmail.com
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,40 +22,47 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=fiji
-DIRNAM=Fiji.app
-VERSION=${VERSION:-20190718}
+VERSION=${VERSION:-20230801_1717}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+DIRNAM=Fiji.app
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i386 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
+ ARCH=$( uname -m )
+fi
+
+# Stop if arch is not supported
+# 2023-05-16 DW: better if it's before PRINT_PACKAGE_NAME
+if [ "$ARCH" != "x86_64" ]; then
+ printf "\n$ARCH is not supported... \n"
+ exit 1
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-UPDATER=imagej-updater-0.9.3.jar
-
set -e
-# Stop if arch is not supported
-if [ "$ARCH" != "i386" ] && [ "$ARCH" != "x86_64" ]; then
- printf "\n\n$ARCH is not supported... \n"
- exit 1
-fi
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $DIRNAM
-tar xvf $CWD/${PRGNAM}-nojre.tar.gz
+#tar xvf $CWD/${PRGNAM}-linux64.tar.gz
+unzip $CWD/${PRGNAM}-linux64.zip
cd $DIRNAM
chown -R root:root .
find -L . \
@@ -65,11 +72,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Rename the binary we need
-if [ "$ARCH" = "x86_64" ]; then
- mv ImageJ-linux64 $PRGNAM
-else
- mv ImageJ-linux32 $PRGNAM
-fi
+mv ImageJ-linux64 $PRGNAM
# We will put here two tools, so they are not run at startup.
mkdir -p unused
@@ -84,21 +87,25 @@ mv ../plugins/Scripts/Plugins/AutoRun/Check_Required_Update_Sites.js .
# is your system, so if you want this functionality, then comment out
# the line below. You can always "enable" it, by placing it in the jars
# folder.
-mv ../jars/$UPDATER .
+mv ../jars/imagej-updater-* .
cd ..
# Update plugins, so that the latest are included in the package. This
# will download stuff during the package creation, something that is
-# against the policy of SlackBuilds.org. However, it is your system,
+# against the policy of SlackBuilds.org. However, it is _your_ system,
# so if you _really_ want this, uncomment the line below.
# ./$PRGNAM --update list-local-only
# Copy the folders, db.xml and the renamed binary to /opt
mkdir -p $PKG/opt/$PRGNAM
cp -a \
+ Contents \
images \
jars \
+ java \
+ lib \
+ licenses \
luts \
macros \
plugins \
@@ -118,7 +125,7 @@ $PKG/opt/$PRGNAM
cp $CWD/ImageJ2.desktop $PKG/opt/$PRGNAM
# Install the simple wrapper
-install -D -m755 $CWD/$PRGNAM $PKG/usr/bin/$PRGNAM
+install -D -m 755 $CWD/$PRGNAM $PKG/usr/bin/$PRGNAM
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -137,4 +144,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE