diff --git a/imagej-1.53r-unix-script.patch b/imagej-1.53r-unix-script.patch index edf6cb0..1d4b75e 100644 --- a/imagej-1.53r-unix-script.patch +++ b/imagej-1.53r-unix-script.patch @@ -1,6 +1,6 @@ diff -Naur old/imagej.sh new/imagej.sh ---- old/imagej.sh 2022-05-30 08:40:52.860341530 -0400 -+++ new/imagej.sh 2022-05-30 09:23:56.439575119 -0400 +--- old/imagej.sh 2022-05-31 09:41:01.115425825 -0400 ++++ new/imagej.sh 2022-05-31 11:03:48.189864410 -0400 @@ -9,6 +9,9 @@ # Last modified date: $Date: 2008-09-17 10:31:27 +0100 (Wed, 17 Sep 2008) $ # $Revision: 51 $ @@ -48,7 +48,7 @@ diff -Naur old/imagej.sh new/imagej.sh # LOG FILE #ij_log="${ij_tmp}/log.txt" # default behaviour when an ImageJ window is already open -@@ -84,44 +81,45 @@ +@@ -84,44 +81,57 @@ declare -i max_mem declare -i free_mem @@ -110,13 +110,25 @@ diff -Naur old/imagej.sh new/imagej.sh +# Make symbolic links from shared plugins, macros and luts +for x in plugins macros luts +do -+ for p in "${ij_data_path}/${x}"/* -+ do -+ if [[ ! -e "${ij_user_path}/${x}/$(basename "${p}")" ]] -+ then -+ ln -s "${p}" "${ij_user_path}/${x}/" -+ fi -+ done ++ # Add new symlinks ++ find "${ij_data_path}/${x}" -mindepth 1 -maxdepth 1 | ++ while read -r p ++ do ++ if [[ ! -e "${ij_user_path}/${x}/$(basename "${p}")" ]] ++ then ++ ln -vs "${p}" "${ij_user_path}/${x}/" ++ fi ++ done ++ # Clean up broken symlinks into the shared directory ++ find "${ij_user_path}/${x}" -mindepth 1 -maxdepth 1 -type l -printf '%p %l\n' | ++ while read -r p l ++ do ++ if [[ ! -e "${p}" ]] && \ ++ [[ "$(dirname "${l}")" = "${ij_data_path}/${x}" ]] ++ then ++ rm -vf "${p}" ++ fi ++ done +done + +# enable plugins to be compiled with imageJ @@ -125,7 +137,7 @@ diff -Naur old/imagej.sh new/imagej.sh # End Site specific variables --------------------------------------------------------- # other variables -@@ -320,7 +318,7 @@ +@@ -320,7 +330,7 @@ # Resolving ij.jar path. If ij.jar is a symbolic link to ij_.jar # this allows updating ij.jar without crashing running sessions @@ -134,7 +146,7 @@ diff -Naur old/imagej.sh new/imagej.sh for mod_jar in ${ij_path}/lib/*jar ; do modules="${modules:-}${modules+:}$mod_jar" -@@ -470,9 +468,9 @@ +@@ -470,9 +480,9 @@ fi if (( $verbosity > 0 )) ; then diff --git a/imagej.spec b/imagej.spec index a6641cf..7019457 100644 --- a/imagej.spec +++ b/imagej.spec @@ -1,6 +1,6 @@ Name: imagej Version: 1.53r -Release: 1%{?dist} +Release: 3%{?dist} Summary: Image Processing and Analysis in Java License: Public Domain @@ -63,6 +63,14 @@ sed -r -i \ -e 's#@PKGDATADIR@#%{_datadir}/imagej#' \ imagej.sh +# Make sure the upstream version number is set correctly, and use the initial +# numeric field of the Release as the BUILD. +%global pkgrel %(echo '%{release}' | sed -r 's/[^[:digit:]].*$//') +sed -r -i \ + -e 's/(public static final String VERSION = )"[^"]+";/\1"%{version}";/' \ + -e 's/(public static final String BUILD = )"[^"]+";/\1"%{pkgrel}";/' \ + source/ij/ImageJ.java + %build cd source @@ -110,6 +118,17 @@ desktop-file-install --vendor='' \ %changelog +* Tue May 31 2022 Benjamin A. Beasley - 1.53r-3 +- Make sure the upstream VERSION is set correctly +- Use the initial numeric field of the Release as the BUILD + +* Tue May 31 2022 Benjamin A. Beasley - 1.53r-2 +- Fix regression in launcher script +- Symlinks called “*” will not be created when there are no shared plugins or + luts +- Broken symlinks into shared directories will be removed +- Symlink changes will be printed to the terminal + * Mon May 30 2022 Benjamin A. Beasley - 1.53r-1 - Adjust versioning scheme - Update to 1.53r (close RHBZ#1609549)