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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26