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