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