cristy | f934967 | 2011-01-01 21:55:15 +0000 | [diff] [blame] | 1 | %global VERSION 6.6.7 |
cristy | 7b07f44 | 2011-02-23 01:28:53 +0000 | [diff] [blame^] | 2 | %global Patchlevel 10 |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 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 |
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 |
| 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 | |
cristy | 935c86e | 2010-06-05 23:50:07 +0000 | [diff] [blame] | 26 | ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may freely use, copy, modify, and distribute in both open and proprietary applications. It is distributed under an Apache 2.0-style license, approved by the OSI. |
| 27 | |
| 28 | The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory and thread error detection to help prevent exploits.ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may freely use, copy, modify, and distribute in both open and proprietary applications. It is distributed under an Apache 2.0-style license, approved by the OSI. |
| 29 | |
| 30 | The ImageMagick development process ensures a stable API and ABI. Before each ImageMagick release, we perform a comprehensive security assessment that includes memory and thread error detection to help prevent exploits. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 31 | |
| 32 | %package devel |
| 33 | Summary: Library links and header files for ImageMagick application development |
| 34 | Group: Development/Libraries |
| 35 | Requires: %{name} = %{version}-%{release} |
| 36 | Requires: libX11-devel, libXext-devel, libXt-devel |
| 37 | Requires: ghostscript-devel |
| 38 | Requires: bzip2-devel |
| 39 | Requires: freetype-devel |
| 40 | Requires: libtiff-devel |
| 41 | Requires: libjpeg-devel |
| 42 | Requires: lcms-devel |
| 43 | Requires: jasper-devel |
| 44 | Requires: pkgconfig |
| 45 | |
| 46 | %description devel |
| 47 | ImageMagick-devel contains the library links and header files you'll |
| 48 | need to develop ImageMagick applications. ImageMagick is an image |
| 49 | manipulation program. |
| 50 | |
| 51 | If you want to create applications that will use ImageMagick code or |
| 52 | APIs, you need to install ImageMagick-devel as well as ImageMagick. |
| 53 | You do not need to install it if you just want to use ImageMagick, |
| 54 | however. |
| 55 | |
| 56 | %package doc |
| 57 | Summary: ImageMagick HTML documentation |
| 58 | Group: Documentation |
| 59 | |
| 60 | %description doc |
| 61 | ImageMagick documentation, this package contains usage (for the |
| 62 | commandline tools) and API (for the libraries) documentation in HTML format. |
| 63 | Note this documentation can also be found on the ImageMagick website: |
| 64 | http://www.imagemagick.org/ |
| 65 | |
| 66 | |
| 67 | %package perl |
| 68 | Summary: ImageMagick perl bindings |
| 69 | Group: System Environment/Libraries |
| 70 | Requires: %{name} = %{version}-%{release} |
| 71 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
| 72 | |
| 73 | %description perl |
| 74 | Perl bindings to ImageMagick. |
| 75 | |
| 76 | Install ImageMagick-perl if you want to use any perl scripts that use |
| 77 | ImageMagick. |
| 78 | |
| 79 | %package c++ |
| 80 | Summary: ImageMagick Magick++ library (C++ bindings) |
| 81 | Group: System Environment/Libraries |
| 82 | Requires: %{name} = %{version}-%{release} |
| 83 | |
| 84 | %description c++ |
| 85 | This package contains the Magick++ library, a C++ binding to the ImageMagick |
| 86 | graphics manipulation library. |
| 87 | |
| 88 | Install ImageMagick-c++ if you want to use any applications that use Magick++. |
| 89 | |
| 90 | |
| 91 | %package c++-devel |
| 92 | Summary: C++ bindings for the ImageMagick library |
| 93 | Group: Development/Libraries |
| 94 | Requires: %{name}-c++ = %{version}-%{release} |
| 95 | Requires: %{name}-devel = %{version}-%{release} |
| 96 | |
| 97 | %description c++-devel |
| 98 | ImageMagick-devel contains the static libraries and header files you'll |
| 99 | need to develop ImageMagick applications using the Magick++ C++ bindings. |
| 100 | ImageMagick is an image manipulation program. |
| 101 | |
| 102 | If you want to create applications that will use Magick++ code |
| 103 | or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and |
| 104 | ImageMagick. |
| 105 | |
| 106 | You don't need to install it if you just want to use ImageMagick, or if you |
| 107 | want to develop/compile applications using the ImageMagick C interface, |
| 108 | however. |
| 109 | |
| 110 | |
| 111 | %prep |
| 112 | %setup -q -n %{name}-%{VERSION}-%{Patchlevel} |
| 113 | sed -i 's/libltdl.la/libltdl.so/g' configure |
cristy | e99fd5c | 2009-12-02 01:54:25 +0000 | [diff] [blame] | 114 | iconv -f ISO-8859-1 -t UTF-8 README.txt > README.txt.tmp |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 115 | touch -r README.txt README.txt.tmp |
| 116 | mv README.txt.tmp README.txt |
cristy | f8d59ee | 2011-02-20 18:21:31 +0000 | [diff] [blame] | 117 | # for %%doc |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 118 | mkdir Magick++/examples |
| 119 | cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples |
| 120 | |
| 121 | %build |
| 122 | %configure --enable-shared \ |
| 123 | --disable-static \ |
| 124 | --with-modules \ |
| 125 | --with-perl \ |
| 126 | --with-x \ |
| 127 | --with-threads \ |
| 128 | --with-magick_plus_plus \ |
| 129 | --with-gslib \ |
| 130 | --with-wmf \ |
| 131 | --with-lcms \ |
| 132 | --with-rsvg \ |
| 133 | --with-xml \ |
| 134 | --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \ |
| 135 | --without-dps \ |
| 136 | --without-included-ltdl --with-ltdl-include=%{_includedir} \ |
| 137 | --with-ltdl-lib=%{_libdir} |
| 138 | # Disable rpath |
| 139 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
| 140 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
| 141 | make |
| 142 | |
| 143 | |
| 144 | %install |
| 145 | rm -rf $RPM_BUILD_ROOT |
| 146 | |
| 147 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" |
| 148 | cp -a www/source $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{VERSION} |
| 149 | rm $RPM_BUILD_ROOT%{_libdir}/*.la |
| 150 | |
| 151 | # fix weird perl Magick.so permissions |
cristy | b6c017e | 2010-01-13 19:11:39 +0000 | [diff] [blame] | 152 | chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Image/Magick/Magick.so |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 153 | |
| 154 | # perlmagick: fix perl path of demo files |
| 155 | %{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl |
| 156 | |
| 157 | # perlmagick: cleanup various perl tempfiles from the build which get installed |
| 158 | find $RPM_BUILD_ROOT -name "*.bs" |xargs rm -f |
| 159 | find $RPM_BUILD_ROOT -name ".packlist" |xargs rm -f |
| 160 | find $RPM_BUILD_ROOT -name "perllocal.pod" |xargs rm -f |
| 161 | |
| 162 | # perlmagick: build files list |
| 163 | echo "%defattr(-,root,root,-)" > perl-pkg-files |
| 164 | find $RPM_BUILD_ROOT/%{_libdir}/perl* -type f -print \ |
| 165 | | sed "s@^$RPM_BUILD_ROOT@@g" > perl-pkg-files |
| 166 | find $RPM_BUILD_ROOT%{perl_vendorarch} -type d -print \ |
| 167 | | sed "s@^$RPM_BUILD_ROOT@%dir @g" \ |
| 168 | | grep -v '^%dir %{perl_vendorarch}$' \ |
| 169 | | grep -v '/auto$' >> perl-pkg-files |
| 170 | if [ -z perl-pkg-files ] ; then |
| 171 | echo "ERROR: EMPTY FILE LIST" |
| 172 | exit -1 |
| 173 | fi |
| 174 | |
| 175 | # These don't belong here, we include them in %%doc |
| 176 | rm $RPM_BUILD_ROOT%{_datadir}/%{name}-%{VERSION}/{ChangeLog,LICENSE,NEWS.txt} |
| 177 | |
| 178 | # fix multilib issues |
| 179 | %ifarch x86_64 s390x ia64 ppc64 alpha sparc64 |
| 180 | %define wordsize 64 |
| 181 | %else |
| 182 | %define wordsize 32 |
| 183 | %endif |
| 184 | |
| 185 | mv $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h \ |
| 186 | $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config-%{wordsize}.h |
| 187 | |
| 188 | cat >$RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h <<EOF |
| 189 | #ifndef IMAGEMAGICK_MULTILIB |
| 190 | #define IMAGEMAGICK_MULTILIB |
| 191 | |
| 192 | #include <bits/wordsize.h> |
| 193 | |
| 194 | #if __WORDSIZE == 32 |
| 195 | # include "magick-config-32.h" |
| 196 | #elif __WORDSIZE == 64 |
| 197 | # include "magick-config-64.h" |
| 198 | #else |
| 199 | # error "unexpected value for __WORDSIZE macro" |
| 200 | #endif |
| 201 | |
| 202 | #endif |
| 203 | EOF |
| 204 | |
| 205 | |
| 206 | %clean |
| 207 | rm -rf $RPM_BUILD_ROOT |
| 208 | |
| 209 | |
| 210 | %post -p /sbin/ldconfig |
| 211 | |
| 212 | %post c++ -p /sbin/ldconfig |
| 213 | |
| 214 | %postun -p /sbin/ldconfig |
| 215 | |
| 216 | %postun c++ -p /sbin/ldconfig |
| 217 | |
| 218 | |
| 219 | %files |
| 220 | %defattr(-,root,root,-) |
| 221 | %doc QuickStart.txt ChangeLog Platforms.txt |
| 222 | %doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt |
| 223 | %{_libdir}/libMagickCore.so.* |
| 224 | %{_libdir}/libMagickWand.so.* |
| 225 | %{_bindir}/[a-z]* |
| 226 | %{_libdir}/%{name}-%{VERSION} |
| 227 | %{_datadir}/%{name}-%{VERSION} |
| 228 | %{_mandir}/man[145]/[a-z]* |
| 229 | %{_mandir}/man1/%{name}.* |
| 230 | |
| 231 | |
| 232 | %files devel |
| 233 | %defattr(-,root,root,-) |
| 234 | %{_bindir}/MagickCore-config |
| 235 | %{_bindir}/Magick-config |
| 236 | %{_bindir}/MagickWand-config |
| 237 | %{_bindir}/Wand-config |
| 238 | %{_libdir}/libMagickCore.so |
| 239 | %{_libdir}/libMagickWand.so |
| 240 | %{_libdir}/pkgconfig/MagickCore.pc |
| 241 | %{_libdir}/pkgconfig/ImageMagick.pc |
| 242 | %{_libdir}/pkgconfig/MagickWand.pc |
| 243 | %{_libdir}/pkgconfig/Wand.pc |
| 244 | %dir %{_includedir}/%{name} |
| 245 | %{_includedir}/%{name}/magick |
| 246 | %{_includedir}/%{name}/wand |
| 247 | %{_mandir}/man1/Magick-config.* |
| 248 | %{_mandir}/man1/MagickCore-config.* |
| 249 | %{_mandir}/man1/Wand-config.* |
| 250 | %{_mandir}/man1/MagickWand-config.* |
| 251 | |
| 252 | %files doc |
| 253 | %defattr(-,root,root,-) |
| 254 | %doc %{_datadir}/doc/%{name}-%{VERSION} |
| 255 | |
| 256 | %files c++ |
| 257 | %defattr(-,root,root,-) |
| 258 | %doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README |
| 259 | %doc www/Magick++/COPYING |
| 260 | %{_libdir}/libMagick++.so.* |
| 261 | |
| 262 | %files c++-devel |
| 263 | %defattr(-,root,root,-) |
| 264 | %doc Magick++/examples |
| 265 | %{_bindir}/Magick++-config |
| 266 | %{_includedir}/%{name}/Magick++ |
| 267 | %{_includedir}/%{name}/Magick++.h |
| 268 | %{_libdir}/libMagick++.so |
| 269 | %{_libdir}/pkgconfig/Magick++.pc |
| 270 | %{_libdir}/pkgconfig/ImageMagick++.pc |
| 271 | %{_mandir}/man1/Magick++-config.* |
| 272 | |
| 273 | %files perl -f perl-pkg-files |
| 274 | %defattr(-,root,root,-) |
| 275 | %{_mandir}/man3/* |
| 276 | %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt |
| 277 | |
| 278 | |
| 279 | %changelog |
| 280 | * Sun May 01 2005 Cristy <cristy@mystic.es.dupont.com> 1.0-0 |
cristy | f8d59ee | 2011-02-20 18:21:31 +0000 | [diff] [blame] | 281 | - Port of Redhat's RPM script to support ImageMagick. |