SHA256
1
0
forked from pool/imagej
imagej/imagej.spec

93 lines
4.1 KiB
RPMSpec

#
# spec file for package imagej
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%define SrcVersion 147n
Name: imagej
Version: 1.47n
Release: 0
License: SUSE-Public-Domain
Summary: Public domain Java image processing program
Url: http://rsbweb.nih.gov/ij/
Group: Productivity/Graphics/Convertors
Source: http://rsbweb.nih.gov/ij/download/src/ij%{SrcVersion}-src.zip
Source1: %{name}.in
Source2: %{name}.desktop
BuildRequires: ant
BuildRequires: java-devel
BuildRequires: ImageMagick
BuildRequires: unzip
BuildRequires: update-desktop-files
Requires: java >= 1.6.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
ImageJ is a public domain Java image processing program inspired by NIH Image for the Macintosh. It runs, either as an online applet or as a downloadable application, on any computer with a Java 1.4 or later virtual machine. Downloadable distributions are available for Windows, Mac OS, Mac OS X and Linux.
It can display, edit, analyze, process, save and print 8-bit, 16-bit and 32-bit images. It can read many image formats including TIFF, GIF, JPEG, BMP, DICOM, FITS and "raw". It supports "stacks", a series of images that share a single window. It is multithreaded, so time-consuming operations such as image file reading can be performed in parallel with other operations.
It can calculate area and pixel value statistics of user-defined selections. It can measure distances and angles. It can create density histograms and line profile plots. It supports standard image processing functions such as contrast manipulation, sharpening, smoothing, edge detection and median filtering.
It does geometric transformations such as scaling, rotation and flips. Image can be zoomed up to 32:1 and down to 1:32. All analysis and processing functions are available at any magnification factor. The program supports any number of windows (images) simultaneously, limited only by available memory.
Spatial calibration is available to provide real world dimensional measurements in units such as millimeters. Density or gray scale calibration is also available.
ImageJ was designed with an open architecture that provides extensibility via Java plugins. Custom acquisition, analysis and processing plugins can be developed using ImageJ's built in editor and Java compiler. User-written plugins make it possible to solve almost any image processing or analysis problem.
%prep
%setup -n source
%build
%ant build
%install
install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -m 755 ij.jar %{buildroot}%{_datadir}/%{name}/%{name}.jar
# startscript
cat > %{name} << 'EOF'
#!/bin/sh
#
# imagej startscript
#
# Source functions library
echo Starting %{name} version %{version} ...
echo with options : ${@}
java -jar %{_datadir}/%{name}/imagej.jar ${@}
EOF
install -d -m 755 %{buildroot}%{_bindir}
install -m 755 %{name} %{buildroot}%{_bindir}/
# Icon
convert build/microscope.gif build/%{name}.png
install -Dm 644 build/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
# Desktop menu entry
install -d -m 755 %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/%{name}.desktop
%suse_update_desktop_file %{name}
%files
%defattr(-,root,root)
%doc release-notes.html
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/%{name}/*.jar
#%{_datadir}/%{name}/lib/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog