/[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 234416 - (show annotations) (download)
Tue May 1 02:54:15 2012 UTC (7 years, 2 months ago) by luigiwalser
Original Path: cauldron/imagemagick/current/SPECS/imagemagick.spec
File size: 10914 byte(s)
- fix CVE-2012-0259, CVE-2012-0260, CVE-2012-1798, CVE-2012-1610 (from debian)

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

  ViewVC Help
Powered by ViewVC 1.1.26