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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26