]> granicus.if.org Git - imagemagick/blob - ImageMagick.spec.in
(no commit message)
[imagemagick] / ImageMagick.spec.in
1 %global VERSION  @PACKAGE_VERSION@
2 %global Patchlevel  @PACKAGE_RELEASE@
3
4 Name:           @PACKAGE_NAME@
5 Version:        %{VERSION}
6 Release:        %{Patchlevel}
7 Summary:        Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition resize, rotate, shear, distort and transform images.
8 Group:          Applications/Multimedia
9 License:        http://www.imagemagick.org/script/license.php
10 Url:            http://www.imagemagick.org/
11 Source0:        http://www.imagemagick.org/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2
12
13 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14 BuildRequires:  bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
15 BuildRequires:  libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1
16 BuildRequires:  ghostscript-devel, djvulibre-devel
17 BuildRequires:  libwmf-devel, jasper-devel, libtool-ltdl-devel
18 BuildRequires:  libX11-devel, libXext-devel, libXt-devel
19 BuildRequires:  lcms-devel, libxml2-devel, librsvg2-devel, OpenEXR-devel
20
21 %description
22 ImageMagick is a software suite to create, edit, and compose bitmap images. It
23 can read, convert and write images in a variety of formats (about 100)
24 including DPX, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG,
25 and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear
26 and transform images, adjust image colors, apply various special effects,
27 or draw text, lines, polygons, ellipses and Bézier curves.
28
29 The functionality of ImageMagick is typically utilized from the command line
30 or you can use the features from programs written in your favorite programming
31 language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand
32 (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), nMagick
33 (Neko/haXe), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP
34 (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a
35 language interface, use ImageMagick to modify or create images automagically
36 and dynamically.
37
38 ImageMagick is free software delivered as a ready-to-run binary distribution
39 or as source code that you may freely use, copy, modify, and distribute in
40 both open and proprietary applications. It is distributed under an Apache
41 2.0-style license, approved by the OSI.
42
43 The ImageMagick development process ensures a stable API and ABI. Before
44 each ImageMagick release, we perform a comprehensive security assessment that
45 includes memory and thread error detection to help prevent exploits.ImageMagick
46 is free software delivered as a ready-to-run binary distribution or as source
47 code that you may freely use, copy, modify, and distribute in both open and
48 proprietary applications. It is distributed under an Apache 2.0-style license,
49 approved by the OSI.
50
51
52 %package devel
53 Summary: Library links and header files for ImageMagick application development
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
56 Requires: libX11-devel, libXext-devel, libXt-devel
57 Requires: ghostscript-devel
58 Requires: bzip2-devel
59 Requires: freetype-devel
60 Requires: libtiff-devel
61 Requires: libjpeg-devel
62 Requires: lcms-devel
63 Requires: jasper-devel
64 Requires: pkgconfig
65
66 %description devel
67 ImageMagick-devel contains the library links and header files you'll
68 need to develop ImageMagick applications. ImageMagick is an image
69 manipulation program.
70
71 If you want to create applications that will use ImageMagick code or
72 APIs, you need to install ImageMagick-devel as well as ImageMagick.
73 You do not need to install it if you just want to use ImageMagick,
74 however.
75
76
77 %package doc
78 Summary: ImageMagick HTML documentation
79 Group: Documentation
80
81
82 %package djvu
83 Summary: DjVu plugin for ImageMagick
84 Group: Applications/Multimedia
85 Requires: %{name} = %{version}-%{release}
86
87 %description djvu
88 This packages contains a plugin for ImageMagick which makes it possible to
89 save and load DjvU files from ImageMagick and libMagickCore using applications.
90
91
92 %description doc
93 ImageMagick documentation, this package contains usage (for the
94 commandline tools) and API (for the libraries) documentation in HTML format.
95 Note this documentation can also be found on the ImageMagick website:
96 http://www.imagemagick.org/.
97
98
99 %package perl
100 Summary: ImageMagick perl bindings
101 Group: System Environment/Libraries
102 Requires: %{name} = %{version}-%{release}
103 Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
104
105
106 %description perl
107 Perl bindings to ImageMagick.
108
109 Install ImageMagick-perl if you want to use any perl scripts that use
110 ImageMagick.
111
112
113 %package c++
114 Summary: ImageMagick Magick++ library (C++ bindings)
115 Group: System Environment/Libraries
116 Requires: %{name} = %{version}-%{release}
117
118 %description c++
119 This package contains the Magick++ library, a C++ binding to the ImageMagick
120 graphics manipulation library.
121
122 Install ImageMagick-c++ if you want to use any applications that use Magick++.
123
124
125 %package c++-devel
126 Summary: C++ bindings for the ImageMagick library
127 Group: Development/Libraries
128 Requires: %{name}-c++ = %{version}-%{release}
129 Requires: %{name}-devel = %{version}-%{release}
130
131 %description c++-devel
132 ImageMagick-devel contains the static libraries and header files you'll
133 need to develop ImageMagick applications using the Magick++ C++ bindings.
134 ImageMagick is an image manipulation program.
135
136 If you want to create applications that will use Magick++ code
137 or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and
138 ImageMagick.
139
140 You don't need to install it if you just want to use ImageMagick, or if you
141 want to develop/compile applications using the ImageMagick C interface,
142 however.
143
144
145 %prep
146 %setup -q -n %{name}-%{VERSION}-%{Patchlevel}
147 sed -i 's/libltdl.la/libltdl.so/g' configure
148 iconv -f ISO-8859-1 -t UTF-8 README.txt > README.txt.tmp
149 touch -r README.txt README.txt.tmp
150 mv README.txt.tmp README.txt
151 # for %%doc
152 mkdir Magick++/examples
153 cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
154
155 %build
156 %configure --enable-shared \
157            --disable-static \
158            --with-modules \
159            --with-perl \
160            --with-x \
161            --with-threads \
162            --with-magick_plus_plus \
163            --with-gslib \
164            --with-wmf \
165            --with-lcms \
166            --with-rsvg \
167            --with-xml \
168            --with-perl-options='INSTALLDIRS=vendor' \
169            --without-dps \
170            --without-included-ltdl --with-ltdl-include=%{_includedir} \
171            --with-ltdl-lib=%{_libdir}
172 # Disable rpath
173 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
174 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
175 # Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild
176 make
177
178
179 %install
180 rm -rf $RPM_BUILD_ROOT
181
182 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
183 cp -a www/source $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
184 rm $RPM_BUILD_ROOT%{_libdir}/*.la
185
186 # fix weird perl Magick.so permissions
187 chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Image/Magick/Magick.so
188
189 # perlmagick: fix perl path of demo files
190 %{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
191
192 # perlmagick: cleanup various perl tempfiles from the build which get installed
193 find $RPM_BUILD_ROOT -name "*.bs" |xargs rm -f
194 find $RPM_BUILD_ROOT -name ".packlist" |xargs rm -f
195 find $RPM_BUILD_ROOT -name "perllocal.pod" |xargs rm -f
196
197 # perlmagick: build files list
198 echo "%defattr(-,root,root,-)" > perl-pkg-files
199 find $RPM_BUILD_ROOT/%{_libdir}/perl* -type f -print \
200         | sed "s@^$RPM_BUILD_ROOT@@g" > perl-pkg-files 
201 find $RPM_BUILD_ROOT%{perl_vendorarch} -type d -print \
202         | sed "s@^$RPM_BUILD_ROOT@%dir @g" \
203         | grep -v '^%dir %{perl_vendorarch}$' \
204         | grep -v '/auto$' >> perl-pkg-files 
205 if [ -z perl-pkg-files ] ; then
206     echo "ERROR: EMPTY FILE LIST"
207     exit -1
208 fi
209
210 # fix multilib issues
211 %ifarch x86_64 s390x ia64 ppc64 alpha sparc64
212 %define wordsize 64
213 %else
214 %define wordsize 32
215 %endif
216
217 mv $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h \
218    $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config-%{wordsize}.h
219
220 cat >$RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h <<EOF
221 #ifndef IMAGEMAGICK_MULTILIB
222 #define IMAGEMAGICK_MULTILIB
223
224 #include <bits/wordsize.h>
225
226 #if __WORDSIZE == 32
227 # include "magick-config-32.h"
228 #elif __WORDSIZE == 64
229 # include "magick-config-64.h"
230 #else
231 # error "unexpected value for __WORDSIZE macro"
232 #endif
233
234 #endif
235 EOF
236
237 %clean
238 rm -rf $RPM_BUILD_ROOT
239
240
241 %post -p /sbin/ldconfig
242
243 %post c++ -p /sbin/ldconfig
244
245 %postun -p /sbin/ldconfig
246
247 %postun c++ -p /sbin/ldconfig
248
249
250 %files
251 %defattr(-,root,root,-)
252 %doc QuickStart.txt ChangeLog Platforms.txt
253 %doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt
254 %{_libdir}/libMagickCore.so*
255 %{_libdir}/libMagickWand.so*
256 %{_libdir}/%{name}-%{VERSION}
257 %{_bindir}/[a-z]*
258 %{_sysconfdir}/%{name}
259 %{_libdir}/%{name}-%{VERSION}
260 %{_datadir}/%{name}-%{VERSION}
261 %{_mandir}/man[145]/[a-zA-Z]*
262 %{_mandir}/man1/%{name}.*
263 %exclude %{_libdir}/%{name}-%{VERSION}/modules-Q16/coders/djvu.*
264
265
266 %files devel
267 %defattr(-,root,root,-)
268 %{_bindir}/MagickCore-config
269 %{_bindir}/MagickWand-config
270 %{_libdir}/libMagickCore.so*
271 %{_libdir}/libMagickWand.so*
272 %{_libdir}/pkgconfig/MagickCore.pc
273 %{_libdir}/pkgconfig/ImageMagick.pc
274 %{_libdir}/pkgconfig/MagickWand.pc
275 %dir %{_includedir}/%{name}
276 %{_includedir}/%{name}/MagickCore
277 %{_includedir}/%{name}/MagickWand
278 %{_mandir}/man1/MagickCore-config.*
279 %{_mandir}/man1/MagickWand-config.*
280
281 %files djvu
282 %defattr(-,root,root,-)
283 %{_libdir}/%{name}-%{version}/modules-Q16/coders/djvu.*
284
285 %files doc
286 %defattr(-,root,root,-)
287 %doc %{_datadir}/doc/%{name}
288 %doc LICENSE
289
290 %files c++
291 %defattr(-,root,root,-)
292 %doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
293 %doc www/Magick++/COPYING
294 %{_libdir}/libMagick++.so*
295
296 %files c++-devel
297 %defattr(-,root,root,-)
298 %doc Magick++/examples
299 %{_bindir}/Magick++-config
300 %{_includedir}/%{name}/Magick++
301 %{_includedir}/%{name}/Magick++.h
302 %{_libdir}/libMagick++.so*
303 %{_libdir}/pkgconfig/Magick++.pc
304 %{_libdir}/pkgconfig/ImageMagick++.pc
305 %{_mandir}/man1/Magick++-config.*
306
307 %files perl -f perl-pkg-files
308 %defattr(-,root,root,-)
309 %{_mandir}/man3/*
310 %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
311
312
313 %changelog
314 * Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0
315 -  Port of Redhat's RPM script to support ImageMagick.