/[packages]/cauldron/imagemagick/current/SPECS/imagemagick.spec
ViewVC logotype

Contents of /cauldron/imagemagick/current/SPECS/imagemagick.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23775 - (show annotations) (download)
Wed Jan 19 08:04:54 2011 UTC (8 years, 10 months ago) by jquelin
File size: 11870 byte(s)
rebuild
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.6.6
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 4
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://gd.tuwien.ac.at/pub/graphics/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 Patch4: ImageMagick-6.4.8-9-includedir.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 Requires: %{libname} = %{version}
56 Obsoletes: ImageMagick < 6.3.2.9-6
57 Provides: ImageMagick = %{version}-%{release}
58 BuildRequires: XFree86-devel
59 BuildRequires: avahi-client-devel
60 BuildRequires: avahi-common-devel
61 BuildRequires: avahi-glib-devel
62 BuildRequires: bzip2-devel
63 BuildRequires: cairo-devel
64 BuildRequires: chrpath
65 BuildRequires: dbus-glib-devel
66 %if !%bootstrap
67 BuildRequires: djvulibre-devel
68 %endif
69 BuildRequires: expat-devel
70 BuildRequires: fontconfig-devel
71 BuildRequires: freetype2-devel >= 2.1.7
72 BuildRequires: gd-devel
73 BuildRequires: ghostscript
74 BuildRequires: glib2-devel
75 BuildRequires: gnome-vfs2-devel
76 BuildRequires: graphviz-devel >= 2.9.0
77 BuildRequires: lcms-devel >= 1.15
78 BuildRequires: libGConf2-devel
79 BuildRequires: libcroco0.6-devel
80 BuildRequires: libexif-devel
81 BuildRequires: libgdk_pixbuf2.0-devel
82 BuildRequires: libgsf-devel
83 BuildRequires: libjasper-devel
84 BuildRequires: libjbig-devel
85 BuildRequires: libltdl-devel >= 1.4.3-10
86 BuildRequires: librsvg-devel
87 BuildRequires: libwmf
88 BuildRequires: libwmf-devel
89 BuildRequires: libxml2-devel
90 BuildRequires: lqr-devel
91 BuildRequires: openssl-devel
92 BuildRequires: pango-devel
93 BuildRequires: perl-devel
94 BuildRequires: pixman-devel
95 BuildRequires: tiff-devel
96 BuildConflicts: %{develname}
97 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
98
99 %description
100 ImageMagick is a powerful image display, conversion and manipulation tool. It
101 runs in an X session. With this tool, you can view, edit and display a variety
102 of image formats.
103
104 ImageMagick can make use of the following delegate programs, available as
105 packages in Mandriva Linux: curl enscript ffmpeg ghostscript ghostscript-X gimp
106 gnuplot graphviz html2ps mplayer ncompress netpbm sane-backends tetex-dvips
107 transfig ufraw xdg-utils zip autotrace povray
108
109 %package desktop
110 Summary: ImageMagick menus
111 Group: Graphics
112 Requires: xterm
113 Obsoletes: ImageMagick-desktop < 6.3.2.9-6
114
115 %description desktop
116 This package contains the menu and .desktop entries to run the "display"
117 command from the menu.
118
119 %package -n %{libname}
120 Summary: ImageMagick libraries
121 Group: System/Libraries
122 # (Anssi 02/2008): Wrongly named at first, can be removed when major changes again:
123 Obsoletes: %{_lib}magick%{major}.0.0 < %{version}-%{release}
124
125 %description -n %{libname}
126 This package contains the libraries needed to run programs dynamically linked
127 with ImageMagick libraries.
128
129 %package -n %{develname}
130 Summary: Static libraries and header files for ImageMagick app development
131 Group: Development/C
132 Requires: %{libname} = %{version}
133 Provides: %{name}-devel = %{version}-%{release}
134 Provides: ImageMagick-devel = %{version}-%{release}
135 Provides: libmagick-devel = %{version}-%{release}
136 Provides: libMagick-devel = %{version}-%{release}
137 Obsoletes: ImageMagick-devel
138 Provides: libMagick5-devel = %{version}-%{release}
139 Obsoletes: libMagick5-devel
140 # 2006
141 Obsoletes: %{mklibname Magick 8.3.2 -d}
142 # 2007.0
143 Obsoletes: %{mklibname magick 10.4.0 -d} %{mklibname Magick 10.4.0 -d}
144 # 2007.1/2008.0
145 Obsoletes: %{mklibname magick 10.7.0 -d} %{mklibname Magick 10.7.0 -d}
146 # pre 2008.1
147 Obsoletes: %{mklibname magick 10.9.0 -d} %{mklibname Magick 10.9.0 -d}
148
149 %description -n %{develname}
150 If you want to create applications that will use ImageMagick code or APIs,
151 you'll need to install these packages as well as ImageMagick. These additional
152 packages aren't necessary if you simply want to use ImageMagick, however.
153
154 ImageMagick-devel is an addition to ImageMagick which includes static libraries
155 and header files necessary to develop applications.
156
157 %package -n perl-Image-Magick
158 Summary: Libraries and modules for access to ImageMagick from perl
159 Group: Development/Perl
160 Requires: %{name} = %{version}
161 Provides: perl-Magick = %{version}-%{release}
162 Obsoletes: perl-Magick
163 Requires: graphviz
164 Requires: libwmf
165
166 %description -n perl-Image-Magick
167 This is the ImageMagick perl support package. It includes perl modules and
168 support files for access to ImageMagick library from perl.
169
170 %package doc
171 Summary: %{name} Documentation
172 Group: Books/Other
173 Obsoletes: ImageMagick-doc < 6.3.2.9-6
174
175 %description doc
176 This package contains HTML/PDF documentation of %{name}.
177
178 %prep
179
180 %setup -q -n ImageMagick-%{rversion}-%minor_rev
181
182 %patch0 -p1 -b .docdir
183 #patch1 -p1
184 %patch4 -p1 -b .include
185 %patch7 -p0 -b .urw
186 %patch17 -p0 -b .fpx
187 %patch19 -p1 -b .libpath
188 %patch20 -p1 -b .ppc
189
190 bzcat %{SOURCE1} > ImageMagick.pdf
191 install -m 644 %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} .
192 libtoolize --copy --force; aclocal -I m4; autoconf; automake
193
194 %build
195 #gw the format-string patch is incomplete:
196 %define Werror_cflags %nil
197 export CFLAGS="%{optflags} -fno-strict-aliasing -fPIC"
198 export CXXFLAGS="%{optflags} -fno-strict-aliasing -fPIC"
199
200 # don't use icecream
201 export PATH=/bin:/usr/bin:/usr/X11R6/bin
202
203 %configure2_5x \
204 --docdir=%{_defaultdocdir}/imagemagick \
205 --with-pic \
206 --enable-shared \
207 --enable-fast-install \
208 --disable-ltdl-install \
209 --with-threads \
210 --with-magick_plus_plus \
211 --with-gslib \
212 --with-wmf \
213 --with-lcms \
214 --with-rsvg \
215 --with-xml \
216 --without-dps \
217 --without-windows-font-dir \
218 --without-modules \
219 --with-perl \
220 --with-perl-options="INSTALLDIRS=vendor CC='%{__cc} -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
221 --with-jp2 \
222 --with-gvc \
223 --with-lqr
224
225 # without the following, it doesn't build correctly with "make -j 4"
226 perl -lpi -e '$_ .= " magick/libMagickCore.la" if index($_, q($(PERLMAKEFILE))) == 0' Makefile
227
228 # Disable rpath
229 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
230 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
231
232 %make
233
234 %if %{build_test}
235 %check
236 # these tests require X
237 if [ -f PerlMagick/t/x11/read.t ]; then
238 mv PerlMagick/t/x11/read.t PerlMagick/t/x11/read.t.disabled
239 fi
240 if [ -f PerlMagick/t/x11/write.t ]; then
241 mv PerlMagick/t/x11/write.t PerlMagick/t/x11/write.t.disabled
242 fi
243 #dlname=`grep "^dlname" Magick++/lib/.libs/libMagick++.la | cut -d\' -f2`
244 #LD_PRELOAD="$PWD/Magick++/lib/.libs/$dlname" VERBOSE="1" make check
245 make check
246 %endif
247
248 %install
249 rm -rf %{buildroot}
250
251 # (Abel) set LD_RUN_PATH to null, to avoid adding rpath to perlmagick module
252 %makeinstall_std LD_RUN_PATH="" pkgdocdir=/installed_docs
253
254 # fix docs inclusion (fix an unknown new rpm bug)
255 rm -rf installed_docs; mv %{buildroot}/installed_docs .
256
257 # Remove unpackaged files
258 rm -f %{buildroot}%{_libdir}/ImageMagick-%{rversion}/modules-%{qlev}/coders/*.a \
259 %{buildroot}%{_libdir}/ImageMagick-%{rversion}/modules-%{qlev}/filters/*.a \
260 %{buildroot}%{_libdir}/libltdl*
261
262 %multiarch_binaries %{buildroot}%{_bindir}/Magick-config
263 %multiarch_binaries %{buildroot}%{_bindir}/Magick++-config
264 %multiarch_binaries %{buildroot}%{_bindir}/MagickCore-config
265 %multiarch_binaries %{buildroot}%{_bindir}/MagickWand-config
266 %multiarch_binaries %{buildroot}%{_bindir}/Wand-config
267 %multiarch_includes %{buildroot}%{_includedir}/ImageMagick/magick/magick-config.h
268
269 # nuke rpath
270 chrpath -d %{buildroot}%{perl_vendorarch}/auto/Image/Magick/Magick.so
271
272 # icons
273 install -m 755 -d %{buildroot}%{_liconsdir} \
274 %{buildroot}%{_iconsdir} \
275 %{buildroot}%{_iconsdir}/hicolor/64x64/apps \
276 %{buildroot}%{_miconsdir}
277 install -m 644 magick-icon_16x16.png %{buildroot}%{_miconsdir}/%{name}.png
278 install -m 644 magick-icon_32x32.png %{buildroot}%{_iconsdir}/%{name}.png
279 install -m 644 magick-icon_48x48.png %{buildroot}%{_liconsdir}/%{name}.png
280 install -m 644 magick-icon_64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png
281
282
283 install -m 755 -d %{buildroot}%{_datadir}/applications/
284 cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF
285 [Desktop Entry]
286 Name=ImageMagick
287 Comment=Views Graphics files
288 Exec=%{_bindir}/xterm -geometry 40x15 -title ImageMagick +sb -iconic -e %{_bindir}/display
289 Icon=%{name}
290 Terminal=false
291 Type=Application
292 Categories=X-MandrivaLinux-Office-Graphs;Graphics;Viewer;
293 EOF
294
295 %clean
296 rm -rf %{buildroot}
297
298 %files
299 %defattr(-,root,root)
300 %doc README.txt
301 %{_bindir}/animate
302 %{_bindir}/compare
303 %{_bindir}/composite
304 %{_bindir}/convert
305 %{_bindir}/conjure
306 %{_bindir}/display
307 %{_bindir}/identify
308 %{_bindir}/import
309 %{_bindir}/mogrify
310 %{_bindir}/montage
311 %{_bindir}/stream
312 %dir %{_libdir}/ImageMagick-%{rversion}
313 %dir %{_libdir}/ImageMagick-%{rversion}/modules-%{qlev}
314 %dir %{_libdir}/ImageMagick-%{rversion}/modules-%{qlev}/coders
315 %dir %{_libdir}/ImageMagick-%{rversion}/config
316 %{_datadir}/ImageMagick-%{rversion}
317 %{_libdir}/ImageMagick-%{rversion}/config/*.xml
318 #%{_libdir}/ImageMagick-%{rversion}/modules-%{qlev}/filters
319 #%{_libdir}/ImageMagick-%{rversion}/modules-%{qlev}/coders/*.so
320 #%{_libdir}/ImageMagick-%{rversion}/modules-%{qlev}/coders/*.la
321 %{_mandir}/man1/*
322 %{_mandir}/man3/*
323 %exclude %{_mandir}/man3/*::*.3pm*
324
325 %files desktop
326 %defattr(-,root,root)
327 %{_datadir}/applications/*
328 %{_iconsdir}/%{name}.png
329 %{_liconsdir}/%{name}.png
330 %{_miconsdir}/%{name}.png
331 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
332
333 %files -n %{libname}
334 %defattr(-,root,root,0755)
335 %{_libdir}/libMagick++.so.%{major}*
336 %{_libdir}/libMagickCore.so.%{major}*
337 %{_libdir}/libMagickWand.so.%{major}*
338
339 %files -n %{develname}
340 %defattr(-,root,root)
341 %{_includedir}/ImageMagick
342 %multiarch %{multiarch_bindir}/Magick-config
343 %multiarch %{multiarch_bindir}/Magick++-config
344 %multiarch %{multiarch_bindir}/MagickCore-config
345 %multiarch %{multiarch_bindir}/MagickWand-config
346 %multiarch %{multiarch_bindir}/Wand-config
347 %multiarch %dir %{multiarch_includedir}/ImageMagick
348 %multiarch %dir %{multiarch_includedir}/ImageMagick/magick
349 %multiarch %{multiarch_includedir}/ImageMagick/magick/magick-config.h
350 %{_bindir}/Magick-config
351 %{_bindir}/Magick++-config
352 %{_bindir}/MagickCore-config
353 %{_bindir}/MagickWand-config
354 %{_bindir}/Wand-config
355 %attr(0644,root,root) %{_libdir}/*.a
356 %attr(0644,root,root) %{_libdir}/*.la
357 %{_libdir}/*.so
358 %{_libdir}/pkgconfig/*.pc
359
360 %files -n perl-Image-Magick
361 %defattr(-,root,root)
362 %{perl_vendorarch}/Image
363 %{perl_vendorarch}/auto/Image
364 %{_mandir}/man3*/*::*.3pm*
365
366 %files doc
367 %defattr(-,root,root)
368 %doc ImageMagick.pdf ChangeLog LICENSE NEWS* NOTICE
369 %doc QuickStart.txt installed_docs/*
370
371

  ViewVC Help
Powered by ViewVC 1.1.26