cristy | ee74264 | 2011-02-26 02:49:59 +0000 | [diff] [blame] | 1 | %global VERSION 6.6.8 |
cristy | 37e0dfd | 2011-03-06 16:35:34 +0000 | [diff] [blame^] | 2 | %global Patchlevel 2 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3 | |
| 4 | Name: ImageMagick |
| 5 | Version: %{VERSION} |
| 6 | Release: %{Patchlevel} |
cristy | 7560861 | 2011-02-25 23:44:50 +0000 | [diff] [blame] | 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. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 8 | Group: Applications/Multimedia |
| 9 | License: http://www.imagemagick.org/script/license.php |
| 10 | Url: http://www.imagemagick.org/ |
cristy | c998d05 | 2011-03-04 17:16:02 +0000 | [diff] [blame] | 11 | Source0: ftp://ftp.imagemagick.org/pub/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 12 | |
| 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
| 14 | BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 15 | BuildRequires: libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 16 | BuildRequires: ghostscript-devel, djvulibre-devel |
| 17 | BuildRequires: libwmf-devel, jasper-devel, libtool-ltdl-devel |
| 18 | BuildRequires: libX11-devel, libXext-devel, libXt-devel |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 19 | BuildRequires: lcms-devel, libxml2-devel, librsvg2-devel, OpenEXR-devel |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 20 | |
| 21 | %description |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 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. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 28 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 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. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 37 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 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. |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 42 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 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 | |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 51 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 76 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 77 | %package doc |
| 78 | Summary: ImageMagick HTML documentation |
| 79 | Group: Documentation |
| 80 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 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 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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: |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 96 | http://www.imagemagick.org/. |
| 97 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 98 | |
cristy | aafc192 | 2011-03-04 16:59:40 +0000 | [diff] [blame] | 99 | %package perl |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 100 | Summary: ImageMagick perl bindings |
| 101 | Group: System Environment/Libraries |
cristy | 7560861 | 2011-02-25 23:44:50 +0000 | [diff] [blame] | 102 | Requires: perl-base |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 103 | Requires: %{name} = %{version}-%{release} |
| 104 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
| 105 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 106 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 107 | %description perl |
| 108 | Perl bindings to ImageMagick. |
| 109 | |
| 110 | Install ImageMagick-perl if you want to use any perl scripts that use |
| 111 | ImageMagick. |
| 112 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 113 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 114 | %package c++ |
| 115 | Summary: ImageMagick Magick++ library (C++ bindings) |
| 116 | Group: System Environment/Libraries |
| 117 | Requires: %{name} = %{version}-%{release} |
| 118 | |
| 119 | %description c++ |
| 120 | This package contains the Magick++ library, a C++ binding to the ImageMagick |
| 121 | graphics manipulation library. |
| 122 | |
| 123 | Install ImageMagick-c++ if you want to use any applications that use Magick++. |
| 124 | |
| 125 | |
| 126 | %package c++-devel |
| 127 | Summary: C++ bindings for the ImageMagick library |
| 128 | Group: Development/Libraries |
| 129 | Requires: %{name}-c++ = %{version}-%{release} |
| 130 | Requires: %{name}-devel = %{version}-%{release} |
| 131 | |
| 132 | %description c++-devel |
| 133 | ImageMagick-devel contains the static libraries and header files you'll |
| 134 | need to develop ImageMagick applications using the Magick++ C++ bindings. |
| 135 | ImageMagick is an image manipulation program. |
| 136 | |
| 137 | If you want to create applications that will use Magick++ code |
| 138 | or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and |
| 139 | ImageMagick. |
| 140 | |
| 141 | You don't need to install it if you just want to use ImageMagick, or if you |
| 142 | want to develop/compile applications using the ImageMagick C interface, |
| 143 | however. |
| 144 | |
| 145 | |
| 146 | %prep |
| 147 | %setup -q -n %{name}-%{VERSION}-%{Patchlevel} |
| 148 | sed -i 's/libltdl.la/libltdl.so/g' configure |
cristy | e99fd5c | 2009-12-02 01:54:25 +0000 | [diff] [blame] | 149 | iconv -f ISO-8859-1 -t UTF-8 README.txt > README.txt.tmp |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 150 | touch -r README.txt README.txt.tmp |
| 151 | mv README.txt.tmp README.txt |
cristy | f8d59ee | 2011-02-20 18:21:31 +0000 | [diff] [blame] | 152 | # for %%doc |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 153 | mkdir Magick++/examples |
| 154 | cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples |
| 155 | |
| 156 | %build |
| 157 | %configure --enable-shared \ |
| 158 | --disable-static \ |
| 159 | --with-modules \ |
| 160 | --with-perl \ |
| 161 | --with-x \ |
| 162 | --with-threads \ |
| 163 | --with-magick_plus_plus \ |
| 164 | --with-gslib \ |
| 165 | --with-wmf \ |
| 166 | --with-lcms \ |
| 167 | --with-rsvg \ |
| 168 | --with-xml \ |
cristy | 9cf4796 | 2011-02-26 22:02:10 +0000 | [diff] [blame] | 169 | --with-perl-options='INSTALLDIRS=vendor' \ |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 170 | --without-dps \ |
| 171 | --without-included-ltdl --with-ltdl-include=%{_includedir} \ |
| 172 | --with-ltdl-lib=%{_libdir} |
| 173 | # Disable rpath |
| 174 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
| 175 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 176 | # Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 177 | make |
| 178 | |
| 179 | |
| 180 | %install |
| 181 | rm -rf $RPM_BUILD_ROOT |
| 182 | |
| 183 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" |
| 184 | cp -a www/source $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{VERSION} |
| 185 | rm $RPM_BUILD_ROOT%{_libdir}/*.la |
| 186 | |
| 187 | # fix weird perl Magick.so permissions |
cristy | b6c017e | 2010-01-13 19:11:39 +0000 | [diff] [blame] | 188 | chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Image/Magick/Magick.so |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 189 | |
| 190 | # perlmagick: fix perl path of demo files |
| 191 | %{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl |
| 192 | |
| 193 | # perlmagick: cleanup various perl tempfiles from the build which get installed |
| 194 | find $RPM_BUILD_ROOT -name "*.bs" |xargs rm -f |
| 195 | find $RPM_BUILD_ROOT -name ".packlist" |xargs rm -f |
| 196 | find $RPM_BUILD_ROOT -name "perllocal.pod" |xargs rm -f |
| 197 | |
| 198 | # perlmagick: build files list |
| 199 | echo "%defattr(-,root,root,-)" > perl-pkg-files |
| 200 | find $RPM_BUILD_ROOT/%{_libdir}/perl* -type f -print \ |
| 201 | | sed "s@^$RPM_BUILD_ROOT@@g" > perl-pkg-files |
| 202 | find $RPM_BUILD_ROOT%{perl_vendorarch} -type d -print \ |
| 203 | | sed "s@^$RPM_BUILD_ROOT@%dir @g" \ |
| 204 | | grep -v '^%dir %{perl_vendorarch}$' \ |
| 205 | | grep -v '/auto$' >> perl-pkg-files |
| 206 | if [ -z perl-pkg-files ] ; then |
| 207 | echo "ERROR: EMPTY FILE LIST" |
| 208 | exit -1 |
| 209 | fi |
| 210 | |
| 211 | # These don't belong here, we include them in %%doc |
| 212 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}-%{VERSION}/{ChangeLog,LICENSE,NEWS.txt} |
| 213 | |
| 214 | # fix multilib issues |
| 215 | %ifarch x86_64 s390x ia64 ppc64 alpha sparc64 |
| 216 | %define wordsize 64 |
| 217 | %else |
| 218 | %define wordsize 32 |
| 219 | %endif |
| 220 | |
| 221 | mv $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h \ |
| 222 | $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config-%{wordsize}.h |
| 223 | |
| 224 | cat >$RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h <<EOF |
| 225 | #ifndef IMAGEMAGICK_MULTILIB |
| 226 | #define IMAGEMAGICK_MULTILIB |
| 227 | |
| 228 | #include <bits/wordsize.h> |
| 229 | |
| 230 | #if __WORDSIZE == 32 |
| 231 | # include "magick-config-32.h" |
| 232 | #elif __WORDSIZE == 64 |
| 233 | # include "magick-config-64.h" |
| 234 | #else |
| 235 | # error "unexpected value for __WORDSIZE macro" |
| 236 | #endif |
| 237 | |
| 238 | #endif |
| 239 | EOF |
| 240 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 241 | %clean |
| 242 | rm -rf $RPM_BUILD_ROOT |
| 243 | |
| 244 | |
| 245 | %post -p /sbin/ldconfig |
| 246 | |
| 247 | %post c++ -p /sbin/ldconfig |
| 248 | |
| 249 | %postun -p /sbin/ldconfig |
| 250 | |
| 251 | %postun c++ -p /sbin/ldconfig |
| 252 | |
| 253 | |
| 254 | %files |
| 255 | %defattr(-,root,root,-) |
| 256 | %doc QuickStart.txt ChangeLog Platforms.txt |
| 257 | %doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 258 | %{_libdir}/libMagickCore.so.4* |
| 259 | %{_libdir}/libMagickWand.so.4* |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 260 | %{_bindir}/[a-z]* |
| 261 | %{_libdir}/%{name}-%{VERSION} |
| 262 | %{_datadir}/%{name}-%{VERSION} |
| 263 | %{_mandir}/man[145]/[a-z]* |
| 264 | %{_mandir}/man1/%{name}.* |
cristy | 6c70aec | 2011-03-04 20:48:09 +0000 | [diff] [blame] | 265 | %exclude %{_libdir}/%{name}-%{VERSION}/modules-Q16/coders/djvu.* |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 266 | |
| 267 | |
| 268 | %files devel |
| 269 | %defattr(-,root,root,-) |
| 270 | %{_bindir}/MagickCore-config |
| 271 | %{_bindir}/Magick-config |
| 272 | %{_bindir}/MagickWand-config |
| 273 | %{_bindir}/Wand-config |
| 274 | %{_libdir}/libMagickCore.so |
| 275 | %{_libdir}/libMagickWand.so |
| 276 | %{_libdir}/pkgconfig/MagickCore.pc |
| 277 | %{_libdir}/pkgconfig/ImageMagick.pc |
| 278 | %{_libdir}/pkgconfig/MagickWand.pc |
| 279 | %{_libdir}/pkgconfig/Wand.pc |
| 280 | %dir %{_includedir}/%{name} |
| 281 | %{_includedir}/%{name}/magick |
| 282 | %{_includedir}/%{name}/wand |
| 283 | %{_mandir}/man1/Magick-config.* |
| 284 | %{_mandir}/man1/MagickCore-config.* |
| 285 | %{_mandir}/man1/Wand-config.* |
| 286 | %{_mandir}/man1/MagickWand-config.* |
| 287 | |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 288 | %files djvu |
| 289 | %defattr(-,root,root,-) |
cristy | be3c5be | 2011-03-05 17:35:07 +0000 | [diff] [blame] | 290 | %{_libdir}/%{name}-%{version}/modules-Q16/coders/djvu.* |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 291 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 292 | %files doc |
| 293 | %defattr(-,root,root,-) |
| 294 | %doc %{_datadir}/doc/%{name}-%{VERSION} |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 295 | %doc LICENSE |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 296 | |
| 297 | %files c++ |
| 298 | %defattr(-,root,root,-) |
| 299 | %doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README |
| 300 | %doc www/Magick++/COPYING |
cristy | 8ae77f5 | 2011-02-26 15:20:00 +0000 | [diff] [blame] | 301 | %{_libdir}/libMagick++.so.4* |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 302 | |
| 303 | %files c++-devel |
| 304 | %defattr(-,root,root,-) |
| 305 | %doc Magick++/examples |
| 306 | %{_bindir}/Magick++-config |
| 307 | %{_includedir}/%{name}/Magick++ |
| 308 | %{_includedir}/%{name}/Magick++.h |
| 309 | %{_libdir}/libMagick++.so |
| 310 | %{_libdir}/pkgconfig/Magick++.pc |
| 311 | %{_libdir}/pkgconfig/ImageMagick++.pc |
| 312 | %{_mandir}/man1/Magick++-config.* |
| 313 | |
| 314 | %files perl -f perl-pkg-files |
| 315 | %defattr(-,root,root,-) |
| 316 | %{_mandir}/man3/* |
| 317 | %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt |
| 318 | |
| 319 | |
| 320 | %changelog |
| 321 | * Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0 |
cristy | f8d59ee | 2011-02-20 18:21:31 +0000 | [diff] [blame] | 322 | - Port of Redhat's RPM script to support ImageMagick. |