%global gimpplugindir %(gimptool --gimpplugindir)/plug-ins %global use_system_cimg 0 # As generated by new-snapshot.sh script %global zart_version 20180110git54bc6ec %global gmic_qt_version 20180110git6267a65 %global gmic_community_version 20180110git1ac6216 %define doc_license %{nil} %define doc_license 1 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} < 7 %define doc_license 0 %endif %else %if 0%{?fedora} < 19 %define doc_license 0 %endif %endif %endif %define license_files COPYING COPYING-gmic-qt COPYING-libcgmic Summary: GREYC's Magic for Image Computing Name: gmic Version: 2.2.0 Release: 3%{?dist} Source0: http://gmic.eu/files/source/%{name}_%{version}.tar.gz # GIT archive snapshot of https://github.com/c-koi/zart Source1: zart-%{zart_version}.tar.gz # GIT archive snapshot of https://github.com/c-koi/gmic-qt Source2: gmic-qt-%{gmic_qt_version}.tar.gz # GIT archive snapshot of https://github.com/dtschump/gmic-community Source3: gmic-community-%{gmic_community_version}.tar.gz License: (CeCILL or CeCILL-C) and GPLv3+ URL: http://gmic.sourceforge.net/index.shtml Buildroot: %{_tmppath}/%{name}-%{version}-root Group: Applications/Multimedia %if %{use_system_cimg} BuildRequires: CImg-devel %endif BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libtiff-devel BuildRequires: libpng-devel BuildRequires: libjpeg-devel BuildRequires: fftw-devel BuildRequires: OpenEXR-devel BuildRequires: zlib-devel BuildRequires: gimp-devel-tools BuildRequires: hdf5-devel BuildRequires: opencv-devel BuildRequires: GraphicsMagick-c++-devel BuildRequires: ilmbase-devel BuildRequires: qt5-qtbase-devel BuildRequires: libcurl-devel # The C library binding was mistakenly put in a -static # package despite being a shared library Obsoletes: gmic-static <= 2.1.8 %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. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Development files for G'MIC %package gimp Requires: %{name}%{?_isa} = %{version}-%{release} Summary: G'MIC plugin for GIMP %description devel 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. Provides files for building applications against the G'MIC API %description gimp 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. Provides a plugin for using G'MIC from GIMP %prep %setup -q -a 1 -a 2 -a 3 %build export CCACHE_DISABLE=1 cd src ln -fs ../gmic-community/libcgmic/gmic_libc.cpp . ln -fs ../gmic-community/libcgmic/gmic_libc.h . ln -fs ../gmic-community/libcgmic/use_libcgmic.c . %if %{use_system_cimg} # We want to build against the system installed CImg package. # G'MIC provides no way todo this, so we just copy the file # over what's there already mv CImg.h CImg.h.bak cp /usr/include/CImg.h CImg.h %endif make OPT_CFLAGS="%{optflags} -g" NOSTRIP=1 cli lib libc cd ../gmic-qt %{qmake_qt5} CONFIG+=release GMIC_PATH=../src HOST=gimp gmic_qt.pro && %{make_build} %{qmake_qt5} CONFIG+=release GMIC_PATH=../src HOST=none gmic_qt.pro && %{make_build} cd ../zart %{qmake_qt5} CONFIG+=release GMIC_PATH=../src zart.pro && %{make_build} %install mv gmic-qt/COPYING COPYING-gmic-qt mv gmic-community/libcgmic/COPYING COPYING-libcgmic iconv -f iso8859-1 -t utf-8 COPYING > COPYING.conv && mv -f COPYING.conv COPYING iconv -f iso8859-1 -t utf-8 COPYING-libcgmic > COPYING-libcgmic.conv && mv -f COPYING-libcgmic.conv COPYING-libcgmic cd src make DESTDIR="${RPM_BUILD_ROOT}" install # Makefile is not multilib aware if test "%{_prefix}/lib" != "%{_libdir}" then mv "${RPM_BUILD_ROOT}/%{_prefix}/lib"/* "${RPM_BUILD_ROOT}/%{_libdir}/" fi # Makefile creates too many intermediate symlinks for the library rm -f "${RPM_BUILD_ROOT}/%{_libdir}/libgmic.so.2" rm -f "${RPM_BUILD_ROOT}/%{_libdir}/libcgmic.so.2" ln -s "libgmic.so.%{version}" "${RPM_BUILD_ROOT}/%{_libdir}/libgmic.so.2" ln -s "libcgmic.so.%{version}" "${RPM_BUILD_ROOT}/%{_libdir}/libcgmic.so.2" # Sourced files shouldn't be executable chmod -x "${RPM_BUILD_ROOT}/%{_sysconfdir}/bash_completion.d/gmic" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc README %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %{_bindir}/gmic %{_bindir}/gmic_qt %{_bindir}/zart %{_sysconfdir}/bash_completion.d/gmic %{_libdir}/libgmic.so.* %{_libdir}/libcgmic.so.* %{_mandir}/man1/%{name}.1.gz %{_mandir}/fr/man1/%{name}.1.gz %files devel %defattr(-,root,root) %{_prefix}/include/gmic.h %{_prefix}/include/gmic_libc.h %{_libdir}/libgmic.so %{_libdir}/libcgmic.so %files gimp %defattr(-,root,root) %{gimpplugindir}/gmic_gimp_qt %{gimpplugindir}/gmic_film_cluts.gmz %changelog * Sat Apr 28 2018 Tomasz Tomasik - 2.2.0-3 - SPEC file cleanups - Use license macro - Rebuilt for EL7 * Mon Mar 05 2018 Adam Williamson - 2.2.0-2 - Rebuild for opencv soname bump * Thu Feb 22 2018 Daniel P. Berrange - 2.2.0-1 - Update to new 2.2.0 upstream release - Some parts now licensed under choice of CeCILL or CeCILL-C * Wed Feb 07 2018 Fedora Release Engineering - 2.1.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jan 11 2018 Daniel P. Berrange - 2.1.8-1 - Update to new 2.1.8 upstream release - Remove bogus -static sub-RPM which contained shared libs * Thu Jan 04 2018 josef radinger - 1.7.2-6 - Rebuilt for libopencv * Wed Aug 02 2017 Fedora Release Engineering - 1.7.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 1.7.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Thu Mar 2 2017 Fedora Release Engineering - 1.7.2-3 - Rebuild due to opencv soname change * Fri Feb 10 2017 Fedora Release Engineering - 1.7.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sat Jun 4 2016 josef radinger - 1.7.2-1 - bump version * Sun May 8 2016 josef radinger - 1.7.1-2 - rebuild for rawhide * Fri Apr 29 2016 josef radinger - 1.7.1-1 - bump version - update Patch1 - fix link on libgmic - remove smp_mflags (because of compile-errors) - split a *-static package * Fri Feb 5 2016 josef radinger - 1.6.9-1 - bump version - update Patch1 * Wed Feb 03 2016 Fedora Release Engineering - 1.6.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Dec 7 2015 josef radinger - 1.6.8-1 - bump version * Sat Oct 24 2015 josef radinger - 1.6.7-1 - bump version - new downloadurl * Tue Oct 13 2015 josef radinger - 1.6.6.1-1 - bump version * Tue Jun 23 2015 Daniel P. Berrange - 1.6.5.0-1 - Update to 1.6.5.0 release - Enable zart binary build * Wed Jun 17 2015 Fedora Release Engineering - 1.6.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun May 10 2015 Daniel P. Berrange - 1.6.2.0-1 - Update to 1.6.2.0 release * Sat May 02 2015 Kalev Lember - 1.6.1.0-2 - Rebuilt for GCC 5 C++11 ABI change * Fri Mar 20 2015 Daniel P. Berrange - 1.6.1.0-1 - Update to 1.6.1.0 release * Fri Feb 6 2015 Daniel P. Berrange - 1.6.0.4-1 - Update to 1.6.0.4 release * Fri Dec 19 2014 Daniel P. Berrange - 1.6.0.3-1 - Update to 1.6.0.3 release * Wed Nov 26 2014 Rex Dieter 1.6.0.1-2 - rebuild (openexr), s|qt-devel|qt4-devel|, tighten subpkg deps * Fri Oct 3 2014 Daniel P. Berrange - 1.6.0.1-1 - Update to 1.6.0.1 release * Mon Aug 25 2014 Daniel P. Berrange - 1.6.0.0-1 - Update to 1.6.0.0 release * Sat Aug 16 2014 Fedora Release Engineering - 1.5.9.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Wed Jul 23 2014 Daniel P. Berrange - 1.5.9.4-1 - Initial Fedora package after review (rhbz #1061801)