Blob Blame History Raw
%global VER 6.9.3
%global Patchlevel 10

Name:           compat-ImageMagick693
Version:        %{VER}.%{Patchlevel}
Release:        1%{?dist}
Summary:        Compat package with ImageMagick 6.9.3 libraries

License:        ImageMagick
Url:            https://www.imagemagick.org/
Source0:        https://www.imagemagick.org/download/releases/ImageMagick-%{VER}-%{Patchlevel}.tar.xz

BuildRequires:  bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
BuildRequires:  libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1
BuildRequires:  perl-generators
BuildRequires:  ghostscript-devel, djvulibre-devel
BuildRequires:  libwmf-devel, jasper-devel, libtool-ltdl-devel
BuildRequires:  libX11-devel, libXext-devel, libXt-devel
BuildRequires:  lcms2-devel, libxml2-devel, librsvg2-devel, OpenEXR-devel
BuildRequires:  fftw-devel, OpenEXR-devel, libwebp-devel
BuildRequires:  jbigkit-devel
BuildRequires:  openjpeg2-devel >= 2.1.0

%description
Compatibility package with ImageMagick 6.9.3 libraries.


%package libs
Summary: Compat package with ImageMagick 6.9.3 libraries
# Explicitly conflict with older ImageMagick packages that ship libraries
# with the same soname as this compat package
Conflicts: ImageMagick-libs < 6.9.9

%description libs
Compatibility package with ImageMagick 6.9.3 libraries.


%package c++
Summary: Compat package with Magick++ 6.9.3 libraries
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# Explicitly conflict with older ImageMagick packages that ship libraries
# with the same soname as this compat package
Conflicts: ImageMagick-c++ < 6.9.9

%description c++
Compatibility package with Magick++ 6.9.3 libraries.


%prep
%setup -q -n ImageMagick-%{VER}-%{Patchlevel}


%build
%configure \
	--enable-shared \
	--disable-static \
	--with-modules \
	--with-perl \
	--with-x \
	--with-threads \
	--with-magick_plus_plus \
	--with-gslib \
	--with-wmf \
	--with-webp \
	--with-openexr \
	--with-rsvg \
	--with-xml \
	--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
	--without-dps \
	--without-gcc-arch \
	--with-jbig \
	--with-openjp2

%make_build


%install
%make_install

# Delete *ONLY* _libdir/*.la files! .la files used internally to handle plugins - BUG#185237!!!
rm %{buildroot}%{_libdir}/*.la

# Remove files that aren't needed in a compat package
rm -rf %{buildroot}%{_sysconfdir}/ImageMagick-6/
rm -rf %{buildroot}%{_bindir}/*
rm -rf %{buildroot}%{_includedir}/ImageMagick-6/
rm -rf %{buildroot}%{_libdir}/*.so
rm -rf %{buildroot}%{_libdir}/perl5/
rm -rf %{buildroot}%{_libdir}/pkgconfig/
rm -rf %{buildroot}%{_datadir}/ImageMagick-6/
rm -rf %{buildroot}%{_defaultdocdir}/ImageMagick-6/
rm -rf %{buildroot}%{_mandir}/*


%post libs -p /sbin/ldconfig

%post c++ -p /sbin/ldconfig

%postun libs -p /sbin/ldconfig

%postun c++ -p /sbin/ldconfig


%files libs
%license LICENSE
%{_libdir}/libMagickCore-6.Q16.so.2*
%{_libdir}/libMagickWand-6.Q16.so.2*
%{_libdir}/ImageMagick-%{VER}

%files c++
%license www/Magick++/COPYING
%{_libdir}/libMagick++-6.Q16.so.6*


%changelog
* Mon Aug 28 2017 Peter Walter <pwalter@fedoraproject.org> - 6.9.3.0-10
- Initial ImageMagick 6.9.3 compat package