diff --git a/.gitignore b/.gitignore index 4723b59..26aacb8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ macros.zip /ij148e-src.zip /imagej-1.48-patch0.patch /imagej-1.48-patch1.patch -/imagej.png /ij150h-src.zip /ij153r-src.zip +/ij153v-src.zip +/ij154c-src.zip 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.png b/imagej.png new file mode 100644 index 0000000..e98d807 Binary files /dev/null and b/imagej.png differ diff --git a/imagej.spec b/imagej.spec index a6641cf..b2e64f1 100644 --- a/imagej.spec +++ b/imagej.spec @@ -1,11 +1,20 @@ Name: imagej -Version: 1.53r +Version: 1.54c Release: 1%{?dist} Summary: Image Processing and Analysis in Java -License: Public Domain -URL: https://rsbweb.nih.gov/ij/index.html -Source0: https://rsbweb.nih.gov/ij/download/src/ij%(echo '%{version}' | tr -d .)-src.zip +# From https://imagej.nih.gov/ij/disclaimer.html: +# ImageJ was developed at the National Institutes of Health by an employee of +# the Federal Government in the course of his official duties. Pursuant to +# Title 17, Section 105 of the United States Code, this software is not +# subject to copyright protection and is in the public domain. ImageJ is an +# experimental system. NIH assumes no responsibility whatsoever for its use +# by other parties, and makes no guarantees, expressed or implied, about its +# quality, reliability, or any other characteristic. +# https://gitlab.com/fedora/legal/fedora-license-data/-/commit/b216f9bcb1c3195b4ddb14674d95e299f669903a +License: LicenseRef-Fedora-Public-Domain +URL: https://imagej.net/ij/index.html +Source0: https://imagej.net/ij/download/src/ij%(echo '%{version}' | tr -d .)-src.zip Source1: imagej.desktop Source2: https://rsbweb.nih.gov/ij/macros/macros.zip Source3: https://rsb.info.nih.gov/ij/download/linux/unix-script.txt @@ -63,6 +72,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 +127,23 @@ desktop-file-install --vendor='' \ %changelog +* Fri Mar 10 2023 Benjamin A. Beasley - 1.54c-1 +- Update to 1.54c (close RHBZ#2175999) + +* Thu Dec 29 2022 Benjamin A. Beasley - 1.53v-1 +- Update to 1.53v (close RHBZ#2121261) + +* 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) diff --git a/sources b/sources index 88c24ec..7968760 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ -SHA512 (ij153r-src.zip) = 2f062754dcf37716a22f12e9af3969ee6ef7ccd26d85cf6df760225e44876ff787884016c5d9367fe390c48a688de89678d24bede4dcea702a3bc4adb28c31a5 -SHA512 (imagej.png) = 60c2ff73bcfc668931c59b0dfb299723a369b741601bdd591a407302e30fc58c6c626525b3f08b955a5dab37729d3f704db689317b42a94e7a3ccbfb72abc9b3 +SHA512 (ij154c-src.zip) = 392f134b05aef266e735e2936bddda9b92c952a935a679f279adb7691581cca41c5537ec8f3ce7a0698af639c2b1a23ad0568a2b75c50148fb2cf32bf9427d56 SHA512 (macros.zip) = 383dd4131c3bc9f810c297f2846105592bcf34a09cbaa590c5ffb8a71217bb6eba7b0cbab4ab259feb740ac87e05d439e19cfb17fc67c9150f60a1711657bfd3