From 61547d7d1dc34d9c204df25256421dbae57438f9 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 23 Jul 2014 11:35:02 +0100 Subject: [PATCH] Initial import after review (rhbz #1061801) Signed-off-by: Daniel P. Berrange --- .gitignore | 5 +++ gmic.spec | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 132 insertions(+) create mode 100644 gmic.spec diff --git a/.gitignore b/.gitignore index e69de29..7812a75 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,5 @@ +/gmic_1.5.9.4.tar.gz +*.src.rpm +/.build-*.log +*~ +x86_64/ diff --git a/gmic.spec b/gmic.spec new file mode 100644 index 0000000..5aaa355 --- /dev/null +++ b/gmic.spec @@ -0,0 +1,126 @@ +%global gimpplugindir %(gimptool --gimpplugindir)/plug-ins + +%define use_system_cimg 0 + +Summary: GREYC's Magic for Image Computing +Name: gmic +Version: 1.5.9.4 +Release: 1%{?dist} +Source: http://downloads.sourceforge.net/project/%{name}/%{name}_%{version}.tar.gz +License: CeCILL +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: gtk2-devel +BuildRequires: gimp-devel-tools +BuildRequires: hdf5-devel +BuildRequires: opencv-devel +BuildRequires: GraphicsMagick-c++-devel +BuildRequires: ilmbase-devel +BuildRequires: qt-devel + +%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} = %{version}-%{release} +Summary: Development files for G'MIC + +%package gimp +Requires: %{name} = %{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 + +%build +cd src +%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 + +# Setting FFMPEG flags to empty string to disable G'MIC's +# use of that library. It will fallback to exec'ing the +# CLI tools if they happen to be installed. +make %{?_smp_mflags} FFMPEG_CFLAGS= FFMPEG_LDFLAGS= OPT_CFLAGS="%{optflags}" + +%install +iconv -f iso8859-1 -t utf-8 COPYING > COPYING.conv && mv -f COPYING.conv COPYING + +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.1 +rm -f $RPM_BUILD_ROOT/%{_libdir}/libgmic.so.1.5 +ln -s libgmic.so.1.5.9 $RPM_BUILD_ROOT/%{_libdir}/libgmic.so.1 + +# 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 COPYING +%{_bindir}/gmic +%{_sysconfdir}/bash_completion.d/gmic +%{_libdir}/libgmic.so.* +%{_mandir}/man1/%{name}.1.gz +%{_mandir}/fr/man1/%{name}.1.gz + +%files devel +%defattr(-,root,root) +%{_prefix}/include/gmic.h +%{_libdir}/libgmic.so + +%files gimp +%defattr(-,root,root) +%{gimpplugindir}/gmic_gimp + +%changelog +* Wed Jul 23 2014 Daniel P. Berrange - 1.5.9.4-1 +- Initial Fedora package after review (rhbz #1061801) diff --git a/sources b/sources index e69de29..ae565b9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6694a0ae3ec65d6f5db1277715a0b744 gmic_1.5.9.4.tar.gz