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

  ViewVC Help
Powered by ViewVC 1.1.26