]> granicus.if.org Git - imagemagick/blob - ImageMagick.spec.in
AcquireQuantumPixel() now respects the memory-map and max-memory-request securit
[imagemagick] / ImageMagick.spec.in
1 %global VERSION  @PACKAGE_VERSION@
2 %global Patchlevel  @PACKAGE_RELEASE@
3
4
5 Name:           @PACKAGE_NAME@
6 Version:        %{VERSION}
7 Release:        %{Patchlevel}
8 Summary:        Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition resize, rotate, shear, distort and transform images.
9 Group:          Applications/Multimedia
10 License:        https://www.imagemagick.org/script/license.php
11 Url:            https://www.imagemagick.org/
12 Source0:        https://www.imagemagick.org/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2
13
14 Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
15
16 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
17 BuildRequires:  bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
18 BuildRequires:  libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1
19 BuildRequires:  perl-generators
20 BuildRequires:  ghostscript-devel, djvulibre-devel
21 BuildRequires:  libwmf-devel
22 BuildRequires:  libX11-devel, libXext-devel, libXt-devel
23 BuildRequires:  lcms2-devel, libxml2-devel, librsvg2-devel, OpenEXR-devel
24 BuildRequires:  fftw-devel, OpenEXR-devel, libwebp-devel
25 BuildRequires:  jbigkit-devel
26 BuildRequires:  openjpeg2-devel >= 2.1.0
27
28 %description
29 ImageMagick® 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.
30
31 The 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.
32
33 ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes.
34
35 ImageMagick 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.
36
37 The 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.
38
39 The authoritative ImageMagick web site is https://www.imagemagick.org. The authoritative source code repository is http://git.imagemagick.org/repos/ImageMagick. We maintain a source code mirror at GitHub.
40
41 %package devel
42 Summary: Library links and header files for ImageMagick application development
43 Group: Development/Libraries
44 Requires: %{name}%{?_isa} = %{version}-%{release}
45 Requires: libX11-devel, libXext-devel, libXt-devel, ghostscript-devel
46 Requires: bzip2-devel, freetype-devel, libtiff-devel, libjpeg-devel, lcms2-devel
47 Requires: libwebp-devel, OpenEXR-devel, openjpeg2-devel, pkgconfig
48 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
49
50 %description devel
51 ImageMagick-devel contains the library links and header files you'll
52 need to develop ImageMagick applications. ImageMagick is an image
53 manipulation program.
54
55 If you want to create applications that will use ImageMagick code or
56 APIs, you need to install ImageMagick-devel as well as ImageMagick.
57 You do not need to install it if you just want to use ImageMagick,
58 however.
59
60 %package libs
61 Summary: ImageMagick libraries to link with
62 Group: Applications/Multimedia
63
64 %description libs
65 This packages contains a shared libraries to use within other applications.
66
67 %package djvu
68 Summary: DjVu plugin for ImageMagick
69 Group: Applications/Multimedia
70 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
71
72 %description djvu
73 This packages contains a plugin for ImageMagick which makes it possible to
74 save and load DjvU files from ImageMagick and libMagickCore using applications.
75
76
77 %package doc
78 Summary: ImageMagick HTML documentation
79 Group: Documentation
80
81 %description doc
82 ImageMagick documentation, this package contains usage (for the
83 commandline tools) and API (for the libraries) documentation in HTML format.
84 Note this documentation can also be found on the ImageMagick website:
85 https://www.imagemagick.org/.
86
87
88 %package perl
89 Summary: ImageMagick perl bindings
90 Group: System Environment/Libraries
91 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
92 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
93
94
95 %description perl
96 Perl bindings to ImageMagick.
97
98 Install ImageMagick-perl if you want to use any perl scripts that use
99 ImageMagick.
100
101
102 %package c++
103 Summary: ImageMagick Magick++ library (C++ bindings)
104 Group: System Environment/Libraries
105 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
106
107 %description c++
108 This package contains the Magick++ library, a C++ binding to the ImageMagick
109 graphics manipulation library.
110
111 Install ImageMagick-c++ if you want to use any applications that use Magick++.
112
113
114 %package c++-devel
115 Summary: C++ bindings for the ImageMagick library
116 Group: Development/Libraries
117 Requires: %{name}-c++%{?_isa} = %{version}-%{release}
118 Requires: %{name}-devel%{?_isa} = %{version}-%{release}
119
120 %description c++-devel
121 ImageMagick-devel contains the static libraries and header files you'll
122 need to develop ImageMagick applications using the Magick++ C++ bindings.
123 ImageMagick is an image manipulation program.
124
125 If you want to create applications that will use Magick++ code
126 or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and
127 ImageMagick.
128
129 You don't need to install it if you just want to use ImageMagick, or if you
130 want to develop/compile applications using the ImageMagick C interface,
131 however.
132
133
134 %prep
135 %setup -q -n %{name}-%{VERSION}-%{Patchlevel}
136
137 # for %%doc
138 mkdir Magick++/examples
139 cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
140
141 %build
142 %configure --enable-shared \
143         --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-webp \
152         --with-openexr \
153         --with-rsvg \
154         --with-xml \
155         --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/MagickCore/.libs' LDDLFLAGS='-shared -L$PWD/MagickCore/.libs'" \
156         --without-dps \
157         --without-gcc-arch \
158         --with-jbig \
159         --with-openjp2
160
161 # Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild
162 make
163
164
165 %install
166 make %{?_smp_mflags} install DESTDIR=%{buildroot} INSTALL="install -p"
167 cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VERSION}
168 rm %{buildroot}%{_libdir}/*.la
169
170 # fix weird perl Magick.so permissions
171 chmod 755 %{buildroot}%{perl_vendorarch}/auto/Image/Magick/*/*.so
172
173 # perlmagick: fix perl path of demo files
174 %{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
175
176 # perlmagick: cleanup various perl tempfiles from the build which get installed
177 find %{buildroot} -name "*.bs" |xargs rm -f
178 find %{buildroot} -name ".packlist" |xargs rm -f
179 find %{buildroot} -name "perllocal.pod" |xargs rm -f
180
181 # perlmagick: build files list
182 echo "%defattr(-,root,root,-)" > perl-pkg-files
183 find %{buildroot}/%{_libdir}/perl* -type f -print \
184         | sed "s@^%{buildroot}@@g" > perl-pkg-files 
185 find %{buildroot}%{perl_vendorarch} -type d -print \
186         | sed "s@^%{buildroot}@%dir @g" \
187         | grep -v '^%dir %{perl_vendorarch}$' \
188         | grep -v '/auto$' >> perl-pkg-files 
189 if [ -z perl-pkg-files ] ; then
190     echo "ERROR: EMPTY FILE LIST"
191     exit -1
192 fi
193
194 # fix multilib issues: Rename provided file with platform-bits in name.
195 # Create platform independant file inplace of provided and conditionally include required.
196 # $1 - filename.h to process.
197 function multilibFileVersions(){
198 mv $1 ${1%%.h}-%{__isa_bits}.h
199
200 local basename=$(basename $1)
201
202 cat >$1 <<EOF
203 #include <bits/wordsize.h>
204
205 #if __WORDSIZE == 32
206 # include "${basename%%.h}-32.h"
207 #elif __WORDSIZE == 64
208 # include "${basename%%.h}-64.h"
209 #else
210 # error "unexpected value for __WORDSIZE macro"
211 #endif
212 EOF
213 }
214
215 multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore/magick-config.h
216 multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore/magick-baseconfig.h
217 multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore/version.h
218
219
220 %check
221 export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
222 make %{?_smp_mflags} check
223
224 %post libs -p /sbin/ldconfig
225
226 %post c++ -p /sbin/ldconfig
227
228 %postun libs -p /sbin/ldconfig
229
230 %postun c++ -p /sbin/ldconfig
231
232 %files
233 %doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt ChangeLog Platforms.txt
234 %{_bindir}/[a-z]*
235 %{_mandir}/man[145]/[a-z]*
236 %{_mandir}/man1/%{name}.*
237
238 %files libs
239 %doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
240 %{_libdir}/libMagickCore-7.Q16HDRI.so.*
241 %{_libdir}/libMagickWand-7.Q16HDRI.so.*
242 %{_libdir}/%{name}-%{VERSION}
243 %{_datadir}/%{name}-7
244 %exclude %{_libdir}/%{name}-%{VERSION}/modules-Q16HDRI/coders/djvu.*
245 %dir %{_sysconfdir}/%{name}-7
246 %config(noreplace) %{_sysconfdir}/%{name}-7/*.xml
247
248 %files devel
249 %{_bindir}/MagickCore-config
250 %{_bindir}/MagickWand-config
251 %{_libdir}/libMagickCore-7.Q16HDRI.so
252 %{_libdir}/libMagickWand-7.Q16HDRI.so
253 %{_libdir}/pkgconfig/MagickCore.pc
254 %{_libdir}/pkgconfig/MagickCore-7.Q16HDRI.pc
255 %{_libdir}/pkgconfig/ImageMagick.pc
256 %{_libdir}/pkgconfig/ImageMagick-7.Q16HDRI.pc
257 %{_libdir}/pkgconfig/MagickWand.pc
258 %{_libdir}/pkgconfig/MagickWand-7.Q16HDRI.pc
259 %dir %{_includedir}/%{name}-7
260 %{_includedir}/%{name}-7/MagickCore
261 %{_includedir}/%{name}-7/MagickWand
262 %{_mandir}/man1/MagickCore-config.*
263 %{_mandir}/man1/MagickWand-config.*
264
265 %files djvu
266 %{_libdir}/%{name}-%{VERSION}/modules-Q16HDRI/coders/djvu.*
267
268 %files doc
269 %doc %{_datadir}/doc/%{name}-7
270 %doc %{_datadir}/doc/%{name}-%{VERSION}
271 %doc LICENSE
272
273 %files c++
274 %doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
275 %doc www/Magick++/COPYING
276 %{_libdir}/libMagick++-7.Q16HDRI.so.*
277
278 %files c++-devel
279 %doc Magick++/examples
280 %{_bindir}/Magick++-config
281 %{_includedir}/%{name}-7/Magick++
282 %{_includedir}/%{name}-7/Magick++.h
283 %{_libdir}/libMagick++-7.Q16HDRI.so
284 %{_libdir}/pkgconfig/Magick++.pc
285 %{_libdir}/pkgconfig/Magick++-7.Q16HDRI.pc
286 %{_mandir}/man1/Magick++-config.*
287
288 %files perl -f perl-pkg-files
289 %{_mandir}/man3/*
290 %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
291
292 %changelog
293 * Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0
294 -  Port of Redhat's RPM script to support ImageMagick.