1%global VERSION @PACKAGE_VERSION@ 2%global Patchlevel @PACKAGE_RELEASE@ 3 4 5Name: @PACKAGE_NAME@ 6Version: %{VERSION} 7Release: %{Patchlevel} 8Summary: Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images. 9Group: Applications/Multimedia 10License: https://imagemagick.org/script/license.php 11Url: https://imagemagick.org/ 12Source0: https://imagemagick.org/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2 13 14Requires: %{name}-libs%{?_isa} = %{version}-%{release} 15 16BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 17BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel 18BuildRequires: libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1 19BuildRequires: perl-generators 20BuildRequires: ghostscript-devel, djvulibre-devel 21BuildRequires: libwmf-devel 22BuildRequires: libX11-devel, libXext-devel, libXt-devel 23BuildRequires: lcms2-devel, libxml2-devel, librsvg2-devel, OpenEXR-devel 24BuildRequires: fftw-devel, OpenEXR-devel, libwebp-devel 25BuildRequires: jbigkit-devel 26BuildRequires: openjpeg2-devel >= 2.1.0 27BuildRequires: autoconf automake libtool-ltdl-devel 28 29%description 30ImageMagick® 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 Bézier curves. 31 32The 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 34ImageMagick utilizes multiple computational threads to increase performance and can read, process, or write mega-, giga-, or tera-pixel image sizes. 35 36ImageMagick 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 38The 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 40The 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 43Summary: Library links and header files for ImageMagick application development 44Group: Development/Libraries 45Requires: %{name}%{?_isa} = %{version}-%{release} 46Requires: libX11-devel, libXext-devel, libXt-devel, ghostscript-devel 47Requires: bzip2-devel, freetype-devel, libtiff-devel, libjpeg-devel, lcms2-devel 48Requires: libwebp-devel, OpenEXR-devel, openjpeg2-devel, pkgconfig 49Requires: %{name}-libs%{?_isa} = %{version}-%{release} 50 51%description devel 52ImageMagick-devel contains the library links and header files you'll 53need to develop ImageMagick applications. ImageMagick is an image 54manipulation program. 55 56If you want to create applications that will use ImageMagick code or 57APIs, you need to install ImageMagick-devel as well as ImageMagick. 58You do not need to install it if you just want to use ImageMagick, 59however. 60 61%package libs 62Summary: ImageMagick libraries to link with 63Group: Applications/Multimedia 64 65%description libs 66This packages contains a shared libraries to use within other applications. 67 68%package djvu 69Summary: DjVu plugin for ImageMagick 70Group: Applications/Multimedia 71Requires: %{name}-libs%{?_isa} = %{version}-%{release} 72 73%description djvu 74This packages contains a plugin for ImageMagick which makes it possible to 75save and load DjvU files from ImageMagick and libMagickCore using applications. 76 77 78%package doc 79Summary: ImageMagick HTML documentation 80Group: Documentation 81 82%description doc 83ImageMagick documentation, this package contains usage (for the 84commandline tools) and API (for the libraries) documentation in HTML format. 85Note this documentation can also be found on the ImageMagick website: 86https://imagemagick.org/. 87 88 89%package perl 90Summary: ImageMagick perl bindings 91Group: System Environment/Libraries 92Requires: %{name}-libs%{?_isa} = %{version}-%{release} 93Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) 94 95 96%description perl 97Perl bindings to ImageMagick. 98 99Install ImageMagick-perl if you want to use any perl scripts that use 100ImageMagick. 101 102 103%package c++ 104Summary: ImageMagick Magick++ library (C++ bindings) 105Group: System Environment/Libraries 106Requires: %{name}-libs%{?_isa} = %{version}-%{release} 107 108%description c++ 109This package contains the Magick++ library, a C++ binding to the ImageMagick 110graphics manipulation library. 111 112Install ImageMagick-c++ if you want to use any applications that use Magick++. 113 114 115%package c++-devel 116Summary: C++ bindings for the ImageMagick library 117Group: Development/Libraries 118Requires: %{name}-c++%{?_isa} = %{version}-%{release} 119Requires: %{name}-devel%{?_isa} = %{version}-%{release} 120 121%description c++-devel 122ImageMagick-devel contains the static libraries and header files you'll 123need to develop ImageMagick applications using the Magick++ C++ bindings. 124ImageMagick is an image manipulation program. 125 126If you want to create applications that will use Magick++ code 127or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and 128ImageMagick. 129 130You don't need to install it if you just want to use ImageMagick, or if you 131want to develop/compile applications using the ImageMagick C interface, 132however. 133 134 135%prep 136%setup -q -n %{name}-%{VERSION}-%{Patchlevel} 137 138# for %%doc 139mkdir Magick++/examples 140cp -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 163make 164 165 166%install 167make %{?_smp_mflags} install DESTDIR=%{buildroot} INSTALL="install -p" 168cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VERSION} 169rm %{buildroot}%{_libdir}/*.la 170 171# fix weird perl Magick.so permissions 172chmod -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 178find %{buildroot} -name "*.bs" |xargs rm -f 179find %{buildroot} -name ".packlist" |xargs rm -f 180find %{buildroot} -name "perllocal.pod" |xargs rm -f 181 182# perlmagick: build files list 183echo "%defattr(-,root,root,-)" > perl-pkg-files 184find %{buildroot}/%{_libdir}/perl* -type f -print \ 185 | sed "s@^%{buildroot}@@g" > perl-pkg-files 186find %{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 190if [ -z perl-pkg-files ] ; then 191 echo "ERROR: EMPTY FILE LIST" 192 exit -1 193fi 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. 198function multilibFileVersions(){ 199mv $1 ${1%%.h}-%{__isa_bits}.h 200 201local basename=$(basename $1) 202 203cat >$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 213EOF 214} 215 216multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore/magick-config.h 217multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore/magick-baseconfig.h 218multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore/version.h 219 220 221%check 222export LD_LIBRARY_PATH=%{buildroot}/%{_libdir} 223make %{?_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@mystic.es.dupont.com> 1.0-0 295- Port of Redhat's RPM script to support ImageMagick. 296