blob: 617efffd0945bf8e14d9564674b9a11a83601fa1 [file] [log] [blame]
cristy0b55dd32010-06-13 19:04:44 +00001%global VERSION @PACKAGE_VERSION@
2%global Patchlevel @PACKAGE_RELEASE@
cristy3ed852e2009-09-05 21:47:34 +00003
cristy3c9e6e52014-10-08 16:33:07 +00004
cristy32e78242012-03-06 02:42:46 +00005Name: @PACKAGE_NAME@
cristy3c9e6e52014-10-08 16:33:07 +00006Version: %{VERSION}
7Release: %{Patchlevel}
cristy32e78242012-03-06 02:42:46 +00008Summary: Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images.
9Group: Applications/Multimedia
10License: http://www.imagemagick.org/script/license.php
11Url: http://www.imagemagick.org/
12Source0: http://www.imagemagick.org/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2
cristy3ed852e2009-09-05 21:47:34 +000013
cristy88fa8ac2014-08-22 07:43:29 +000014Requires: %{name}-libs = %{version}-%{release}
15
cristy32e78242012-03-06 02:42:46 +000016BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
18BuildRequires: libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1
19BuildRequires: ghostscript-devel, djvulibre-devel
20BuildRequires: libwmf-devel, jasper-devel, libtool-ltdl-devel
21BuildRequires: libX11-devel, libXext-devel, libXt-devel
cristy88fa8ac2014-08-22 07:43:29 +000022BuildRequires: lcms2-devel, libxml2-devel, librsvg2-devel, OpenEXR-devel
23BuildRequires: fftw-devel, OpenEXR-devel, libwebp-devel
cristy3ed852e2009-09-05 21:47:34 +000024
25%description
Cristyf9d4d082015-12-21 09:14:43 -050026ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
cristy3ed852e2009-09-05 21:47:34 +000027
Cristya8a91092015-11-15 17:59:13 -050028The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.
cristy32e78242012-03-06 02:42:46 +000029
Cristya8a91092015-11-15 17:59:13 -050030ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
cristy32e78242012-03-06 02:42:46 +000031
Cristya8a91092015-11-15 17:59:13 -050032ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. It is distributed under the Apache 2.0 license.
cristy8ae77f52011-02-26 15:20:00 +000033
Cristya8a91092015-11-15 17:59:13 -050034The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory error and thread data race detection to prevent security vulnerabilities.
35
36The authoritative ImageMagick web site is http://www.imagemagick.org. The authoritative source code repository is http://git.imagemagick.org/repos/ImageMagick. We maintain a source code mirror at GitHub.
cristy4a478472010-06-05 01:59:10 +000037
cristy3ed852e2009-09-05 21:47:34 +000038%package devel
cristy32e78242012-03-06 02:42:46 +000039Summary: Library links and header files for ImageMagick application development
cristy3ed852e2009-09-05 21:47:34 +000040Group: Development/Libraries
41Requires: %{name} = %{version}-%{release}
cristy88fa8ac2014-08-22 07:43:29 +000042Requires: libX11-devel, libXext-devel, libXt-devel, ghostscript-devel
43Requires: bzip2-devel, freetype-devel, libtiff-devel, libjpeg-devel, lcms2-devel
44Requires: libwebp-devel, OpenEXR-devel, jasper-devel, pkgconfig
cristy72c167c2013-03-20 00:42:46 +000045Requires: %{name}-libs = %{version}-%{release}
cristy3ed852e2009-09-05 21:47:34 +000046
47%description devel
48ImageMagick-devel contains the library links and header files you'll
49need to develop ImageMagick applications. ImageMagick is an image
50manipulation program.
51
52If you want to create applications that will use ImageMagick code or
53APIs, you need to install ImageMagick-devel as well as ImageMagick.
54You do not need to install it if you just want to use ImageMagick,
55however.
56
cristy72c167c2013-03-20 00:42:46 +000057%package libs
58Summary: ImageMagick libraries to link with
59Group: Applications/Multimedia
60
61%description libs
62This packages contains a shared libraries to use within other applications.
63
cristy8ae77f52011-02-26 15:20:00 +000064%package djvu
65Summary: DjVu plugin for ImageMagick
66Group: Applications/Multimedia
67Requires: %{name} = %{version}-%{release}
68
69%description djvu
70This packages contains a plugin for ImageMagick which makes it possible to
71save and load DjvU files from ImageMagick and libMagickCore using applications.
72
73
cristy4e65ec22012-04-08 01:33:27 +000074%package doc
75Summary: ImageMagick HTML documentation
76Group: Documentation
77
cristy3ed852e2009-09-05 21:47:34 +000078%description doc
79ImageMagick documentation, this package contains usage (for the
cristy32e78242012-03-06 02:42:46 +000080commandline tools) and API (for the libraries) documentation in HTML format.
cristy3ed852e2009-09-05 21:47:34 +000081Note this documentation can also be found on the ImageMagick website:
cristy32e78242012-03-06 02:42:46 +000082http://www.imagemagick.org/.
cristy8ae77f52011-02-26 15:20:00 +000083
cristy3ed852e2009-09-05 21:47:34 +000084
cristyaafc1922011-03-04 16:59:40 +000085%package perl
cristy3ed852e2009-09-05 21:47:34 +000086Summary: ImageMagick perl bindings
87Group: System Environment/Libraries
88Requires: %{name} = %{version}-%{release}
89Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
90
cristy32e78242012-03-06 02:42:46 +000091
cristyaafc1922011-03-04 16:59:40 +000092%description perl
cristy3ed852e2009-09-05 21:47:34 +000093Perl bindings to ImageMagick.
94
95Install ImageMagick-perl if you want to use any perl scripts that use
96ImageMagick.
97
cristy8ae77f52011-02-26 15:20:00 +000098
cristy3ed852e2009-09-05 21:47:34 +000099%package c++
100Summary: ImageMagick Magick++ library (C++ bindings)
101Group: System Environment/Libraries
102Requires: %{name} = %{version}-%{release}
103
104%description c++
105This package contains the Magick++ library, a C++ binding to the ImageMagick
106graphics manipulation library.
107
108Install ImageMagick-c++ if you want to use any applications that use Magick++.
109
110
111%package c++-devel
112Summary: C++ bindings for the ImageMagick library
113Group: Development/Libraries
114Requires: %{name}-c++ = %{version}-%{release}
115Requires: %{name}-devel = %{version}-%{release}
116
117%description c++-devel
118ImageMagick-devel contains the static libraries and header files you'll
119need to develop ImageMagick applications using the Magick++ C++ bindings.
120ImageMagick is an image manipulation program.
121
122If you want to create applications that will use Magick++ code
123or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and
124ImageMagick.
cristy32e78242012-03-06 02:42:46 +0000125
cristy3ed852e2009-09-05 21:47:34 +0000126You don't need to install it if you just want to use ImageMagick, or if you
127want to develop/compile applications using the ImageMagick C interface,
128however.
129
130
131%prep
132%setup -q -n %{name}-%{VERSION}-%{Patchlevel}
133sed -i 's/libltdl.la/libltdl.so/g' configure
cristye99fd5c2009-12-02 01:54:25 +0000134iconv -f ISO-8859-1 -t UTF-8 README.txt > README.txt.tmp
cristy3ed852e2009-09-05 21:47:34 +0000135touch -r README.txt README.txt.tmp
136mv README.txt.tmp README.txt
cristy32e78242012-03-06 02:42:46 +0000137# for %%doc
cristy3ed852e2009-09-05 21:47:34 +0000138mkdir Magick++/examples
139cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
140
141%build
142%configure --enable-shared \
cristy88fa8ac2014-08-22 07:43:29 +0000143 --disable-static \
144 --with-modules \
145 --with-perl \
146 --with-x \
147 --with-threads \
148 --with-magick_plus_plus \
149 --with-gslib \
150 --with-wmf \
151 --with-lcms2 \
152 --with-webp \
153 --with-openexr \
154 --with-rsvg \
155 --with-xml \
Cristy8b3e1192015-12-16 19:20:39 -0500156 --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/MagickCore/.libs' LDDLFLAGS='-shared -L$PWD/MagickCore/.libs'" \
cristy88fa8ac2014-08-22 07:43:29 +0000157 --without-dps
158
cristy3ed852e2009-09-05 21:47:34 +0000159# Disable rpath
160sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
161sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
cristy8ae77f52011-02-26 15:20:00 +0000162# Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild
cristy3ed852e2009-09-05 21:47:34 +0000163make
164
165
166%install
cristy72182d82012-03-19 00:37:22 +0000167rm -rf %{buildroot}
cristy3ed852e2009-09-05 21:47:34 +0000168
cristy88fa8ac2014-08-22 07:43:29 +0000169make %{?_smp_mflags} install DESTDIR=%{buildroot} INSTALL="install -p"
cristy191c9a62014-08-22 12:14:30 +0000170cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VERSION}
cristy72182d82012-03-19 00:37:22 +0000171rm %{buildroot}%{_libdir}/*.la
cristy3ed852e2009-09-05 21:47:34 +0000172
173# fix weird perl Magick.so permissions
cristy10067ee2013-03-20 11:59:05 +0000174chmod 755 %{buildroot}%{perl_vendorarch}/auto/Image/Magick/*/*.so
cristy3ed852e2009-09-05 21:47:34 +0000175
176# perlmagick: fix perl path of demo files
177%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
178
179# perlmagick: cleanup various perl tempfiles from the build which get installed
cristy72182d82012-03-19 00:37:22 +0000180find %{buildroot} -name "*.bs" |xargs rm -f
181find %{buildroot} -name ".packlist" |xargs rm -f
182find %{buildroot} -name "perllocal.pod" |xargs rm -f
cristy3ed852e2009-09-05 21:47:34 +0000183
184# perlmagick: build files list
185echo "%defattr(-,root,root,-)" > perl-pkg-files
cristy72182d82012-03-19 00:37:22 +0000186find %{buildroot}/%{_libdir}/perl* -type f -print \
187 | sed "s@^%{buildroot}@@g" > perl-pkg-files
188find %{buildroot}%{perl_vendorarch} -type d -print \
189 | sed "s@^%{buildroot}@%dir @g" \
cristy3ed852e2009-09-05 21:47:34 +0000190 | grep -v '^%dir %{perl_vendorarch}$' \
191 | grep -v '/auto$' >> perl-pkg-files
192if [ -z perl-pkg-files ] ; then
193 echo "ERROR: EMPTY FILE LIST"
194 exit -1
195fi
196
cristy88fa8ac2014-08-22 07:43:29 +0000197%check
198export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
199make %{?_smp_mflags} check
200
cristy3ed852e2009-09-05 21:47:34 +0000201%clean
cristy72182d82012-03-19 00:37:22 +0000202rm -rf %{buildroot}
cristy3ed852e2009-09-05 21:47:34 +0000203
cristy72c167c2013-03-20 00:42:46 +0000204%post libs -p /sbin/ldconfig
cristy3ed852e2009-09-05 21:47:34 +0000205
206%post c++ -p /sbin/ldconfig
207
cristy72c167c2013-03-20 00:42:46 +0000208%postun libs -p /sbin/ldconfig
cristy3ed852e2009-09-05 21:47:34 +0000209
210%postun c++ -p /sbin/ldconfig
211
cristy3ed852e2009-09-05 21:47:34 +0000212%files
cristy88fa8ac2014-08-22 07:43:29 +0000213%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt ChangeLog Platforms.txt
cristy3ed852e2009-09-05 21:47:34 +0000214%{_bindir}/[a-z]*
cristybcbacef2012-04-08 01:57:35 +0000215%{_mandir}/man[145]/[a-z]*
cristy3ed852e2009-09-05 21:47:34 +0000216%{_mandir}/man1/%{name}.*
cristy32e78242012-03-06 02:42:46 +0000217
cristy88fa8ac2014-08-22 07:43:29 +0000218%files libs
219%defattr(-,root,root,-)
220%doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
Cristy15bc0d62015-12-17 12:36:54 -0500221%{_libdir}/libMagickCore-7.Q16HDRI.so.*
222%{_libdir}/libMagickWand-7.Q16HDRI.so.*
cristy88fa8ac2014-08-22 07:43:29 +0000223%{_libdir}/%{name}-%{VERSION}
224%{_datadir}/%{name}-7
Cristy15bc0d62015-12-17 12:36:54 -0500225%exclude %{_libdir}/%{name}-%{VERSION}/modules-Q16HDRI/coders/djvu.*
cristy88fa8ac2014-08-22 07:43:29 +0000226%{_sysconfdir}/%{name}-7
cristy3ed852e2009-09-05 21:47:34 +0000227
228%files devel
229%defattr(-,root,root,-)
230%{_bindir}/MagickCore-config
cristy3ed852e2009-09-05 21:47:34 +0000231%{_bindir}/MagickWand-config
Cristy15bc0d62015-12-17 12:36:54 -0500232%{_libdir}/libMagickCore-7.Q16HDRI.so
233%{_libdir}/libMagickWand-7.Q16HDRI.so
cristy88fa8ac2014-08-22 07:43:29 +0000234%{_libdir}/pkgconfig/MagickCore.pc
Cristy15bc0d62015-12-17 12:36:54 -0500235%{_libdir}/pkgconfig/MagickCore-7.Q16HDRI.pc
cristy88fa8ac2014-08-22 07:43:29 +0000236%{_libdir}/pkgconfig/ImageMagick.pc
Cristy15bc0d62015-12-17 12:36:54 -0500237%{_libdir}/pkgconfig/ImageMagick-7.Q16HDRI.pc
cristy88fa8ac2014-08-22 07:43:29 +0000238%{_libdir}/pkgconfig/MagickWand.pc
Cristy15bc0d62015-12-17 12:36:54 -0500239%{_libdir}/pkgconfig/MagickWand-7.Q16HDRI.pc
240%dir %{_includedir}/%{name}-7
cristy88fa8ac2014-08-22 07:43:29 +0000241%{_includedir}/%{name}-7/MagickCore
242%{_includedir}/%{name}-7/MagickWand
cristy3ed852e2009-09-05 21:47:34 +0000243%{_mandir}/man1/MagickCore-config.*
cristy3ed852e2009-09-05 21:47:34 +0000244%{_mandir}/man1/MagickWand-config.*
245
cristy8ae77f52011-02-26 15:20:00 +0000246%files djvu
247%defattr(-,root,root,-)
Cristy15bc0d62015-12-17 12:36:54 -0500248%{_libdir}/%{name}-%{VERSION}/modules-Q16HDRI/coders/djvu.*
cristy8ae77f52011-02-26 15:20:00 +0000249
cristy3ed852e2009-09-05 21:47:34 +0000250%files doc
251%defattr(-,root,root,-)
cristy88fa8ac2014-08-22 07:43:29 +0000252%doc %{_datadir}/doc/%{name}-7
253%doc %{_datadir}/doc/%{name}-%{VERSION}
cristy8ae77f52011-02-26 15:20:00 +0000254%doc LICENSE
cristy3ed852e2009-09-05 21:47:34 +0000255
256%files c++
257%defattr(-,root,root,-)
258%doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
259%doc www/Magick++/COPYING
Cristy15bc0d62015-12-17 12:36:54 -0500260%{_libdir}/libMagick++-7.Q16HDRI.so.*
cristy3ed852e2009-09-05 21:47:34 +0000261
262%files c++-devel
263%defattr(-,root,root,-)
264%doc Magick++/examples
265%{_bindir}/Magick++-config
cristy88fa8ac2014-08-22 07:43:29 +0000266%{_includedir}/%{name}-7/Magick++
267%{_includedir}/%{name}-7/Magick++.h
Cristy15bc0d62015-12-17 12:36:54 -0500268%{_libdir}/libMagick++-7.Q16HDRI.so
cristy88fa8ac2014-08-22 07:43:29 +0000269%{_libdir}/pkgconfig/Magick++.pc
Cristy15bc0d62015-12-17 12:36:54 -0500270%{_libdir}/pkgconfig/Magick++-7.Q16HDRI.pc
cristy3ed852e2009-09-05 21:47:34 +0000271%{_mandir}/man1/Magick++-config.*
272
273%files perl -f perl-pkg-files
274%defattr(-,root,root,-)
275%{_mandir}/man3/*
276%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
277
cristy3ed852e2009-09-05 21:47:34 +0000278%changelog
279* Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0
cristyf8d59ee2011-02-20 18:21:31 +0000280- Port of Redhat's RPM script to support ImageMagick.