/[packages]/updates/3/imagemagick/current/SPECS/imagemagick.spec
ViewVC logotype

Contents of /updates/3/imagemagick/current/SPECS/imagemagick.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 595156 - (show annotations) (download)
Thu Feb 20 17:16:21 2014 UTC (5 years, 6 months ago) by luigiwalser
File size: 10984 byte(s)
add upstream patches to fix CVE-2014-2030 and CVE-2014-1958 (mga#12742)
1 %define build_test 0
2 %{?_with_test: %{expand: %%global build_test 1}}
3 %{?_without_test: %{expand: %%global build_test 0}}
4
5 %define bootstrap 1
6 %{?_without_bootstrap: %global bootstrap 0}
7 %{?_with_bootstrap: %global bootstrap 1}
8
9 # V E R S I O N P A R T S
10
11 # their "official" version
12 %define rversion 6.8.1
13
14 # their "minor" version
15 %define minor_rev 1
16
17 # some other funny version
18 # (aw) from the docs: Versions with Q8 in the name are 8 bits-per-pixel
19 # component (e.g. 8-bit red, 8-bit green, etc.), whereas, Q16 in the
20 # filename are 16 bits-per-pixel component. A Q16 version permits you
21 # to read or write 16-bit images without losing precision but requires
22 # twice as much resources as the Q8 version.
23 %define qlev Q16
24
25 # the full file version
26 %define dversion %{rversion}-%{minor_rev}
27
28 %define major 7
29
30 %define libname %mklibname magick %{major}
31 %define develname %mklibname magick -d
32
33 Summary: An X application for displaying and manipulating images
34 Name: imagemagick
35 Version: %{rversion}.%{minor_rev}
36 %define subrel 1
37 Release: %mkrel 2
38 License: BSD-like
39 Group: Graphics/Editors and Converters
40 URL: http://www.imagemagick.org/
41 Source0: http://www.imagemagick.org/download/ImageMagick-%{dversion}.tar.xz
42 Source1: ImageMagick.pdf.bz2
43 # re-scaled from ftp://ftp.imagemagick.org/pub/ImageMagick/images/magick-icon.png
44 Source10: magick-icon_16x16.png
45 Source11: magick-icon_32x32.png
46 Source12: magick-icon_48x48.png
47 Source13: magick-icon_64x64.png
48 Patch0: imagemagick-docdir.diff
49 #gw fix format strings, but it doesn't work for the perl-Magick
50 Patch1: ImageMagick-6.4.8-9-format-strings.patch
51 Patch2: ImageMagick-6.7.4-force-so.patch
52 Patch7: imagemagick-urw.diff
53 Patch17: imagemagick-fpx.diff
54 Patch19: ImageMagick-libpath.diff
55 Patch20: ImageMagick-6.7.7-9-fix-montageimages-test.patch
56 Patch21: imagemagick-CVE-2014-2030.patch
57 Patch22: imagemagick-CVE-2014-1958.patch
58
59 Requires: %{libname} = %{version}
60 Obsoletes: ImageMagick < 6.3.2.9-6
61 Provides: ImageMagick = %{version}-%{release}
62
63 BuildRequires: libx11-devel
64 BuildRequires: libxext-devel
65 BuildRequires: bzip2-devel
66 BuildRequires: cairo-devel
67 BuildRequires: fontconfig-devel
68 BuildRequires: freetype2-devel >= 2.1.7
69 BuildRequires: chrpath
70 BuildRequires: graphviz-devel >= 2.9.0
71 BuildRequires: libjasper-devel
72 BuildRequires: libjbig-devel
73 BuildRequires: libjpeg-devel
74 BuildRequires: libpng-devel
75 BuildRequires: zlib-devel
76 BuildRequires: lcms-devel
77 BuildRequires: lcms2-devel
78 BuildRequires: fftw-devel
79 BuildRequires: lqr-devel
80 BuildRequires: libltdl-devel
81 BuildRequires: perl-devel
82 BuildRequires: librsvg-devel
83 BuildRequires: tiff-devel
84 BuildRequires: libwmf-devel
85 BuildRequires: libxml2-devel
86 BuildRequires: lzma-devel
87 BuildRequires: pkgconfig(libwebp)
88 %if !%bootstrap
89 BuildRequires: djvulibre-devel
90 %endif
91 BuildRequires: ghostscript
92 BuildRequires: subversion
93 BuildConflicts: %{develname}
94
95 %description
96 ImageMagick is a powerful image display, conversion and manipulation tool. It
97 runs in an X session. With this tool, you can view, edit and display a variety
98 of image formats.
99
100 ImageMagick can make use of the following delegate programs, available as
101 packages in %{_vendor}: curl enscript ffmpeg ghostscript ghostscript-X gimp
102 gnuplot graphviz html2ps mplayer ncompress netpbm sane-backends texlive-texmf
103 transfig ufraw xdg-utils zip autotrace povray
104
105 %package desktop
106 Summary: ImageMagick menus
107 Group: Graphics/Editors and Converters
108 Requires: xterm
109 Obsoletes: ImageMagick-desktop < 6.3.2.9-6
110
111 %description desktop
112 This package contains the menu and .desktop entries to run the "display"
113 command from the menu.
114
115 %package -n %{libname}
116 Summary: ImageMagick libraries
117 Group: System/Libraries
118 Provides: %{_lib}magick = %{version}
119 # (Anssi 02/2008): Wrongly named at first, can be removed when major changes again:
120 Obsoletes: %{_lib}magick%{major}.0.0 < %{version}-%{release}
121
122 %description -n %{libname}
123 This package contains the libraries needed to run programs dynamically linked
124 with ImageMagick libraries.
125
126 %package -n %{develname}
127 Summary: Static libraries and header files for ImageMagick app development
128 Group: Development/C
129 Requires: %{libname} = %{version}
130 Provides: %{name}-devel = %{version}-%{release}
131 Provides: ImageMagick-devel = %{version}-%{release}
132 Provides: libmagick-devel = %{version}-%{release}
133 Provides: libMagick-devel = %{version}-%{release}
134 Obsoletes: ImageMagick-devel
135 Provides: libMagick5-devel = %{version}-%{release}
136 Obsoletes: libMagick5-devel
137 Conflicts: %{name} < 6.7.5.0-2
138 # 2006
139 Obsoletes: %{mklibname Magick 8.3.2 -d}
140 # 2007.0
141 Obsoletes: %{mklibname magick 10.4.0 -d} %{mklibname Magick 10.4.0 -d}
142 # 2007.1/2008.0
143 Obsoletes: %{mklibname magick 10.7.0 -d} %{mklibname Magick 10.7.0 -d}
144 # pre 2008.1
145 Obsoletes: %{mklibname magick 10.9.0 -d} %{mklibname Magick 10.9.0 -d}
146
147 %description -n %{develname}
148 If you want to create applications that will use ImageMagick code or APIs,
149 you'll need to install these packages as well as ImageMagick. These additional
150 packages aren't necessary if you simply want to use ImageMagick, however.
151
152 ImageMagick-devel is an addition to ImageMagick which includes static libraries
153 and header files necessary to develop applications.
154
155 %package -n perl-Image-Magick
156 Summary: Libraries and modules for access to ImageMagick from perl
157 Group: Development/Perl
158 Requires: %{name} = %{version}
159 Provides: perl-Magick = %{version}-%{release}
160 Obsoletes: perl-Magick
161
162 %description -n perl-Image-Magick
163 This is the ImageMagick perl support package. It includes perl modules and
164 support files for access to ImageMagick library from perl.
165
166 %package doc
167 Summary: %{name} Documentation
168 Group: Documentation
169 Obsoletes: ImageMagick-doc < 6.3.2.9-6
170 BuildArch: noarch
171
172 %description doc
173 This package contains HTML/PDF documentation of %{name}.
174
175 %prep
176
177 %setup -q -n ImageMagick-%{rversion}-%minor_rev
178
179 %patch0 -p1 -b .docdir
180 %patch2 -p0 -b .so
181 %patch7 -p0 -b .urw
182 %patch17 -p0 -b .fpx
183 %patch19 -p1 -b .libpath
184 %patch20 -p1 -b .ppc
185 %patch21 -p4 -b .CVE-2014-2030
186 %patch22 -p4 -b .CVE-2014-1958
187
188 bzcat %{SOURCE1} > ImageMagick.pdf
189 install -m 644 %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} .
190 autoreconf -fi
191
192 %build
193 #gw the format-string patch is incomplete:
194 %define Werror_cflags %nil
195 export CFLAGS="%{optflags} -fno-strict-aliasing -fPIC"
196 export CXXFLAGS="%{optflags} -fno-strict-aliasing -fPIC"
197
198 # don't use icecream
199 export PATH=/bin:/usr/bin
200
201 %configure2_5x \
202 --docdir=%{_defaultdocdir}/imagemagick \
203 --with-pic \
204 --enable-shared --disable-static \
205 --enable-fast-install \
206 --with-threads \
207 --with-magick_plus_plus \
208 --with-gslib \
209 --with-wmf \
210 --with-lcms \
211 --with-rsvg \
212 --with-xml \
213 --without-dps \
214 --without-windows-font-dir \
215 --with-modules \
216 --with-perl \
217 --with-perl-options="INSTALLDIRS=vendor CC='%{__cc} -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
218 --with-jp2 \
219 --with-gvc \
220 --with-lqr
221
222 # Disable rpath
223 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
224 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
225
226 %make
227
228 %if %{build_test}
229 %check
230 # these tests require X
231 if [ -f PerlMagick/t/x11/read.t ]; then
232 mv PerlMagick/t/x11/read.t PerlMagick/t/x11/read.t.disabled
233 fi
234 if [ -f PerlMagick/t/x11/write.t ]; then
235 mv PerlMagick/t/x11/write.t PerlMagick/t/x11/write.t.disabled
236 fi
237 #dlname=`grep "^dlname" Magick++/lib/.libs/libMagick++.la | cut -d\' -f2`
238 #LD_PRELOAD="$PWD/Magick++/lib/.libs/$dlname" VERBOSE="1" make check
239 make check
240 %endif
241
242 %install
243 # (Abel) set LD_RUN_PATH to null, to avoid adding rpath to perlmagick module
244 %makeinstall_std LD_RUN_PATH="" pkgdocdir=/installed_docs
245
246 # fix docs inclusion (fix an unknown new rpm bug)
247 rm -rf installed_docs; mv %{buildroot}/installed_docs .
248
249 # Remove unpackaged files
250 find %{buildroot} -name '*.la' -delete
251
252 # create compatible symlinks
253 ln -s libMagick++-%{qlev}.so %{buildroot}%{_libdir}/libMagick++.so
254 ln -s libMagickCore-%{qlev}.so %{buildroot}%{_libdir}/libMagickCore.so
255 ln -s libMagickWand-%{qlev}.so %{buildroot}%{_libdir}/libMagickWand.so
256
257 %multiarch_binaries %{buildroot}%{_bindir}/Magick-config
258 %multiarch_binaries %{buildroot}%{_bindir}/Magick++-config
259 %multiarch_binaries %{buildroot}%{_bindir}/MagickCore-config
260 %multiarch_binaries %{buildroot}%{_bindir}/MagickWand-config
261 %multiarch_binaries %{buildroot}%{_bindir}/Wand-config
262 %multiarch_includes %{buildroot}%{_includedir}/ImageMagick/magick/magick-config.h
263
264 # nuke rpath
265 chrpath -d %{buildroot}%{perl_vendorarch}/auto/Image/Magick/Magick.so
266
267 # icons
268 install -m 755 -d %{buildroot}%{_liconsdir} \
269 %{buildroot}%{_iconsdir} \
270 %{buildroot}%{_iconsdir}/hicolor/64x64/apps \
271 %{buildroot}%{_miconsdir}
272 install -m 644 magick-icon_16x16.png %{buildroot}%{_miconsdir}/%{name}.png
273 install -m 644 magick-icon_32x32.png %{buildroot}%{_iconsdir}/%{name}.png
274 install -m 644 magick-icon_48x48.png %{buildroot}%{_liconsdir}/%{name}.png
275 install -m 644 magick-icon_64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png
276
277
278 install -m 755 -d %{buildroot}%{_datadir}/applications/
279 cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF
280 [Desktop Entry]
281 Name=ImageMagick
282 Comment=Views Graphics files
283 Exec=%{_bindir}/xterm -geometry 40x15 -title ImageMagick +sb -iconic -e %{_bindir}/display
284 Icon=%{name}
285 Terminal=false
286 Type=Application
287 Categories=Graphics;Viewer;
288 EOF
289
290 %files
291 %doc README.txt
292 %{_sysconfdir}/ImageMagick
293 %{_bindir}/animate
294 %{_bindir}/compare
295 %{_bindir}/composite
296 %{_bindir}/convert
297 %{_bindir}/conjure
298 %{_bindir}/display
299 %{_bindir}/identify
300 %{_bindir}/import
301 %{_bindir}/mogrify
302 %{_bindir}/montage
303 %{_bindir}/stream
304 %{_libdir}/ImageMagick-%{rversion}
305 %{_datadir}/ImageMagick-%{rversion}
306 %{_mandir}/man1/*
307 %exclude %{_mandir}/man1/*-config.*
308
309 %files desktop
310 %{_datadir}/applications/*
311 %{_iconsdir}/%{name}.png
312 %{_liconsdir}/%{name}.png
313 %{_miconsdir}/%{name}.png
314 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
315
316 %files -n %{libname}
317 %{_libdir}/libMagick++-%{qlev}.so.%{major}*
318 %{_libdir}/libMagickCore-%{qlev}.so.%{major}*
319 %{_libdir}/libMagickWand-%{qlev}.so.%{major}*
320
321 %files -n %{develname}
322 %{_includedir}/ImageMagick
323 %multiarch %{multiarch_bindir}/Magick-config
324 %multiarch %{multiarch_bindir}/Magick++-config
325 %multiarch %{multiarch_bindir}/MagickCore-config
326 %multiarch %{multiarch_bindir}/MagickWand-config
327 %multiarch %{multiarch_bindir}/Wand-config
328 %multiarch %dir %{multiarch_includedir}/ImageMagick
329 %multiarch %dir %{multiarch_includedir}/ImageMagick/magick
330 %multiarch %{multiarch_includedir}/ImageMagick/magick/magick-config.h
331 %{_bindir}/Magick-config
332 %{_bindir}/Magick++-config
333 %{_bindir}/MagickCore-config
334 %{_bindir}/MagickWand-config
335 %{_bindir}/Wand-config
336 %{_libdir}/*.so
337 %{_libdir}/pkgconfig/*.pc
338 %{_mandir}/man1/*-config.*
339
340 %files -n perl-Image-Magick
341 %{perl_vendorarch}/Image
342 %{perl_vendorarch}/auto/Image
343 %{_mandir}/man3*/*::*.3pm*
344
345 %files doc
346 %doc ImageMagick.pdf ChangeLog LICENSE NEWS* NOTICE
347 %doc QuickStart.txt installed_docs/*

  ViewVC Help
Powered by ViewVC 1.1.26