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