gmic/gmic.spec
Marcus Rueckert 4382a30b8a - update to 2.5.1
https://discuss.pixls.us/t/release-of-gmic-2-5/9413
- refresh cmake-fixes.patch:
  only lowering of cmake version remains, all other changes are
  upstream

OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=15
2019-03-15 13:35:08 +00:00

284 lines
8.7 KiB
RPMSpec

#
# spec file for package gmic
#
# Copyright (c) 2014 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/
#
%global _gimpplugindir %(gimptool-2.0 --gimpplugindir)/plug-ins
%global zart_version 20180503git34f7e48
# The macro make_jobs gets overwritten by macros.qt5 => ninja doesn't work
#define __builder ninja
Name: gmic
Version: 2.5.1
Release: 0
URL: https://gmic.eu
# Git URL: https://framagit.org/dtschump/gmic
Source0: https://gmic.eu/files/source/gmic_%{version}.tar.gz
Source10: http://gmic.eu/gmic_reference.pdf
Patch: cmake-fixes.patch
Summary: GREYC's Magick for Image Computing (denoise and others)
License: CECILL-2.1
Group: Productivity/Graphics/Bitmap Editors
BuildRequires: cmake
BuildRequires: OpenEXR-devel
BuildRequires: fftw3-devel
BuildRequires: fftw3-threads-devel
BuildRequires: gcc-c++
BuildRequires: gimp-devel
BuildRequires: libGraphicsMagick++-devel
BuildRequires: libcurl-devel
BuildRequires: libjasper-devel
BuildRequires: libjpeg-devel
BuildRequires: libqt5-linguist-devel
BuildRequires: libqt5-qtbase-devel
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel
BuildRequires: ninja
BuildRequires: opencv-devel
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(eigen3)
%description
G'MIC is an open and full-featured framework for image processing, providing
several different user interfaces to convert/manipulate/filter/visualize
generic image datasets, from 1d scalar signals to 3d+t sequences of
multi-spectral volumetric images. Technically speaking, what it does is:
* Define a lightweight but powerful script language (the G'MIC language)
dedicated to the design of image processing operators and pipelines.
* Provide several user interfaces embedding the corresponding interpreter:
- A command-line executable gmic, to use the G'MIC framework from a shell.
In this setting, G'MIC may be seen as a serious (and friendly) competitor
of the ImageMagick or GraphicsMagick software suites.
- A gimp plug-in, to bring G'MIC capabilities to the GIMP image retouching
software. (gimp-plugin-gmic)
- A krita plug-in, to bring G'MIC capabilities to the krita digital painting
software. (krita-plugin-gmic)
- A web service G'MIC Online, to allow users applying image processing
algorithms directly in a web browser.
- A Qt-based interface ZArt, for real-time mainpulation of webcam images.
(gmic-zart)
- A C++ library libgmic, to be linked to third-party applications.
(libgmic1, gmic-devel)
G'MIC is focused on the design of possibly complex pipelines for converting,
manipulating, filtering and visualizing generic 1d/2d/3d multi-spectral image
datasets. This includes of course color images, but also more complex data as
image sequences or 3d(+t) volumetric float-valued datasets.
G'MIC is an open framework: the default language can be extended with custom
G'MIC-written commands, defining thus new available image filters or effects.
By the way, G'MIC already contains a substantial set of pre-defined image
processing algorithms and pipelines (more than 1000).
G'MIC has been designed with portability in mind and runs on different
platforms (Windows, Unix, MacOSX). It is distributed under the CeCILL license
(GPL-compatible). Since 2008, it is developed in the Image Team of the GREYC
laboratory, in Caen/France, by permanent researchers working in the field of
image processing on a daily basis.
G'MIC has superior denoising and sharpening capabilities.
%package -n libgmic1
Summary: Shared library that belongs to gmic
Group: Productivity/Graphics/Bitmap Editors
%package -n libgmic-devel
Summary: Header and library from gmic for use in other C++ projects
Group: Development/Libraries/C and C++
Requires: libgmic1 = %{version}
%description -n libgmic1
Shared library allows you to use gmic functionality from other
programs.
%description -n libgmic-devel
Header and library from gmic to needed to develop C++ code that
uses the gmic functionality provided by the gmic library.
%package -n gimp-plugin-gmic
Summary: GMIC plugin for gimp
Group: Productivity/Graphics/Bitmap Editors
License: GPL-3.0-or-later
Requires: gimp
Obsoletes: gmic-gimp
Provides: gmic-gimp
%description -n gimp-plugin-gmic
This is a plugin for gimp that exposes many of the nice gmic features
for interactive use in gimp.
%package -n krita-plugin-gmic
Summary: GMIC plugin for krita
Group: Productivity/Graphics/Bitmap Editors
License: GPL-3.0-or-later
Requires: krita
%description -n krita-plugin-gmic
This is a plugin for krita to provide gmic features.
%package doc
Summary: GMIC reference documentation
Group: Productivity/Graphics/Bitmap editors
License: GFDL-1.3-or-later
%description doc
This is the reference documentation for G'MIC in .pdf format.
%package zart
Summary: GMIC GUI for video streams
Group: Productivity/Graphics/Bitmap editors
%description zart
ZArt is a computer program whose purpose is to demonstrate the possibilities of
the G'MIC image processing language by offering the choice of several
manipulations on a video stream acquired from a webcam. In other words, ZArt is
a GUI for G'MIC real-time manipulations on the output of a webcam.
%prep
%autosetup -p1
cp %{SOURCE10} .
%build
# Build gmic
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DBUILD_LIB_STATIC=OFF \
|| cat CMakeFiles/CMakeError.log
%make_jobs
cd ..
# Create link for zart dynamic linking
ln -s ../build/libgmic.so src/libgmic.so
# Build gmic{_gimp|_krita}_qt
pushd gmic-qt
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DGMIC_PATH=%{_builddir}/%{name}-%{version}/src \
-DGMIC_LIB_PATH=%{_builddir}/%{name}-%{version}/build \
-DGMIC_QT_HOST=gimp \
|| cat CMakeFiles/CMakeError.log
%make_jobs
cd ..
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DGMIC_PATH=%{_builddir}/%{name}-%{version}/src \
-DGMIC_LIB_PATH=%{_builddir}/%{name}-%{version}/build \
-DGMIC_QT_HOST=krita \
|| cat CMakeFiles/CMakeError.log
%make_jobs
cd ..
%cmake \
-DENABLE_DYNAMIC_LINKING=ON \
-DGMIC_PATH=%{_builddir}/%{name}-%{version}/src \
-DGMIC_LIB_PATH=%{_builddir}/%{name}-%{version}/build \
-DGMIC_QT_HOST=none \
|| cat CMakeFiles/CMakeError.log
%make_jobs
popd
# Build zart
pushd zart
qmake-qt5 CONFIG+=release GMIC_DYNAMIC_LINKING=on GMIC_PATH=%{_builddir}/%{name}-%{version}/src zart.pro
make %{?_smp_mflags}
popd
%install
%cmake_install
install -d -m 0755 %{buildroot}%{_sysconfdir}/bash_completion.d
install -m 0644 build/resources/gmic_bashcompletion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/gmic
# Film color lookup tables
install -d -m 0755 %{buildroot}%{_gimpplugindir}
install -m 0644 resources/gmic_cluts.gmz %{buildroot}%{_gimpplugindir}/gmic_cluts.gmz
# qt_gmic
pushd gmic-qt
install -m 0755 build/gmic_qt %{buildroot}%{_bindir}/gmic_qt
# krita plugin
install -m 0755 build/gmic_krita_qt %{buildroot}%{_bindir}/gmic_krita_qt
# gimp plugin
install -d -m 0755 %{buildroot}%{_gimpplugindir}
install -m 0755 build/gmic_gimp_qt %{buildroot}%{_gimpplugindir}/gmic_gimp_qt
popd
# zart
pushd zart
install -m 0755 zart %{buildroot}%{_bindir}/zart
popd
%post -n libgmic1
%{run_ldconfig}
%postun -n libgmic1
%{run_ldconfig}
%files
%defattr(-,root,root)
%license COPYING
#license gmic-qt/COPYING
%doc README gmic-qt/README.md
%{_bindir}/gmic
%{_bindir}/gmic_qt
%{_mandir}/man1/gmic.1*
%config %attr(0644,root,root) /etc/bash_completion.d/gmic
%files doc
%defattr(-,root,root)
%doc gmic_reference.pdf
%files zart
%defattr(-,root,root)
#license zart/LICENSE
#doc zart/README
%{_bindir}/zart
%files -n gimp-plugin-gmic
%defattr(-,root,root)
#license gmic-qt/COPYING
%doc gmic-qt/README.md
%{_gimpplugindir}/gmic_gimp_qt
%{_gimpplugindir}/gmic_cluts.gmz
%files -n krita-plugin-gmic
%defattr(-,root,root)
#license gmic-qt/COPYING
%doc gmic-qt/README.md
%{_bindir}/gmic_krita_qt
%files -n libgmic1
%defattr(-,root,root)
%license COPYING
%{_libdir}/libgmic.so.*
%files -n libgmic-devel
%defattr(-,root,root)
%{_includedir}/gmic.h
%{_libdir}/libgmic.so
%{_libdir}/cmake/gmic/
%changelog