# Description: Fiji is Just ImageJ, with extras # URL: https://fiji.sc/ # Maintainer: Petar Petrov, slackalaxy at gmail dot com # Depends on: jdk8-bin libglvnd xorg-libxdamage xorg-libxxf86vm name=fiji version=20240418_1417 release=1 source=(https://downloads.imagej.net/fiji/archive/${version/_/-}/fiji-nojre.zip ImageJ2.desktop $name.sh) build() { cd Fiji.app # Rename the binary we need mv ImageJ-linux64 $name # Update plugins, so that the latest are included in the package. This # will download stuff during the package creation, so if you _really_ # want this, uncomment the line below. ./$name --update list-local-only # We will put here two tools, so they are not run at startup. mkdir -p unused cd unused # Remove the check for required updates. If you want it, comment out # the next line. You can "enable" it any time by just placing it in the # plugins/Scripts/Plugins/AutoRun/ folder. mv ../plugins/Scripts/Plugins/AutoRun/Check_Required_Update_Sites.js . # We do not want updates when the program is installed. As above, it # 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/imagej-updater-* . cd .. # Copy the folders, db.xml and the renamed binary to /usr/lib mkdir -p $PKG/usr/lib/$name cp -a \ Contents \ images \ jars \ lib \ licenses \ luts \ macros \ plugins \ retro \ scripts \ db.xml.gz \ $name \ $PKG/usr/lib/$name # If a file called "ImageJ2.desktop" is not present in the directory # of fiji, it will create (and re-create it if you delete it) the file # "~/.local/share/applications/ImageJ2.desktop" upon start. So, let it # have its desktop file. This is a very stupid workaround, but it is # really the best I could think of. At first I thought that deleting # "plugins/Scripts/Plugins/Utilities/Create_Desktop_Icon.bsh" will do # the trick, but no... cp $SRC/ImageJ2.desktop $PKG/usr/lib/$name # Install the simple wrapper install -D -m755 $SRC/$name.sh $PKG/usr/bin/$name mkdir -p $PKG/usr/share/{applications,pixmaps} cp $SRC/ImageJ2.desktop $PKG/usr/share/applications cp images/icon.png $PKG/usr/share/pixmaps/$name.png }