# Allow for selectively disabling from commandline %{!?quantum:%define quantum 16} %{!?perlmagick:%define perlmagick 1} %{!?magickpp:%define magickpp 1} %define base_version 6.1.6 # This is a one line description of the package. Summary: An X application for displaying and manipulating images. # This must be the name string from the rpm filename you plan to use. Name: ImageMagick # This must be the version string from the rpm filename you plan to use. Version: 6.1.6 # This is the release number for a package of the same version (ie. if # we make a package and find it to be slightly broken and need to make # it again, the next package would be release number 2). Release: 0 License: Apache-style # This is a group that the package belongs to in a higher level # package tool or the Red Hat installer. Group: X11/Applications/Graphics # This line points at the HOME location of the pristine source # file. It is used if you ever want to get the source again or check # for newer versions. Source: ftp://ftp.imagemagick.org/pub/%{name}/%{name}-%{version}.tar.bz2 Url: http://www.imagemagick.org/ # This line allows you to specify a directory as the "root" for # building and installing the new package. You can use this to help # test your package before having it installed on your machine. Buildroot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel BuildPrereq: libtiff-devel, zlib-devel, libtool-libs BuildPrereq: freetype-devel >= 2.0.1 Requires: bzip2, freetype, libjpeg, libpng, zlib %description ImageMagick is a robust collection of tools and libraries offered under a usage license to read, write, and manipulate an image in many image formats (over 89 major formats) including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick you can create images dynamically, making it suitable for Web applications. You can also resize, rotate, sharpen, color reduce, or add special effects to an image or image sequence and save your completed work in the same or differing image format. Image processing operations are available from the command line, or from the C, C++, Perl, Java, PHP, Python, or Ruby programming languages. A high-quality 2D renderer is included, which provides a subset of SVG capabilities. ImageMagick's focus is on performance, minimizing bugs, and providing stable APIs and ABIs. %package devel Summary: Static libraries and header files for ImageMagick application development. Group: X11/Development/Libraries Requires: %{name} = %{version}-%{release} %description devel ImageMagick-devel contains the static libraries and header files you'll need to develop ImageMagick applications. ImageMagick is an image manipulation program. If you want to create applications that will use ImageMagick code or APIs, you need to install ImageMagick-devel as well as ImageMagick. You do not need to install it if you just want to use ImageMagick, however. %if %{perlmagick} %package perl Summary: ImageMagick perl bindings Group: System Environment/Libraries BuildPrereq: perl >= 5.6.0 Requires: %{name} = %{version}-%{release}, perl >= 5.6.0 %description perl Perl bindings to ImageMagick. Install ImageMagick-perl if you want to use any perl scripts that use ImageMagick. %endif %if %{magickpp} %package c++ Summary: ImageMagick Magick++ library (C++ bindings) Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %description c++ This package contains the Magick++ library, a C++ binding to the ImageMagick graphics manipulation library. Install ImageMagick-c++ if you want to use any applications that use Magick++. %package c++-devel Summary: C++ bindings for the ImageMagick library Group: Development/Libraries Requires: %{name} = %{version}, %{name}-c++ = %{version} Requires: %{name}-devel = %{version}, bzip2-devel, freetype-devel Requires: libjpeg-devel, libpng-devel, libtiff-devel, zlib-devel, libxml2-devel %description c++-devel ImageMagick-devel contains the static libraries and header files you'll need to develop ImageMagick applications using the Magick++ C++ bindings. ImageMagick is an image manipulation program. If you want to create applications that will use Magick++ code or APIs, you'll need to install ImageMagick-c++-devel, ImageMagick-devel and ImageMagick. You don't need to install it if you just want to use ImageMagick, or if you want to develop/compile applications using the ImageMagick C interface, however. %endif %prep %setup -q %build # If you have trouble during the installation phase, then # uncomment the two lines below. You may be using an older # libtool that sometimes has trouble linking the files. #MAGICK=$RPM_BUILD_DIR/%{name}-%{version} #export LDFLAGS="-L$MAGICK/magick/.libs $LDFLAGS" %if %{perlmagick} # Maybe this will fix perl installation issues. if [ -z "`perl -v | grep 5.8`" ]; then export PERLOPTS="PREFIX=$RPM_BUILD_ROOT%{_prefix}" fi %endif # This shouldn't be there yet. rm -f PerlMagick/Makefile.PL %configure --enable-shared --disable-static \ --with-modules --with-frozenpaths --without-wmf \ --enable-libtool-verbose --enable-ltdl-convenience \ %if %{perlmagick} --with-perl \ --with-perl-options="$PERLOPTS" \ %else --without-perl \ %endif %if %{magickpp} --with-magick-plus-plus \ %else --without-magick-plus-plus \ %endif --with-quantumum-depth=%{quantum} make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %if %{perlmagick} # Remove unpackaged files. rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name perllocal.pod -type f` rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name .packlist -type f` %endif rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.*a rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.so.* %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644, root, root, 755) %doc ChangeLog QuickStart.txt LICENSE README.txt NEWS %doc %{_datadir}/%{name}-%{base_version} %{_libdir}/libMagick.so.* %{_libdir}/libWand.so.* %dir %{_libdir}/%{name}-%{base_version} %dir %{_libdir}/%{name}-%{base_version}/config %{_libdir}/%{name}-%{base_version}/config/*.xml %dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quantum} %dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quantum}/coders %dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quantum}/filters %{_libdir}/%{name}-%{base_version}/modules-Q%{quantum}/*/*.la %{_libdir}/%{name}-%{base_version}/modules-Q%{quantum}/*/*.so %attr(755, root, root) %{_bindir}/* %attr(644, root, man) %{_mandir}/man1/*.1.gz %attr(644, root, man) %{_mandir}/man4/*gz %attr(644, root, man) %{_mandir}/man5/*gz %files devel %defattr(644, root, root, 755) %dir %{_includedir}/wand %{_includedir}/wand/* %dir %{_includedir}/magick %{_includedir}/magick/* %{_libdir}/libWand.*a %{_libdir}/libMagick.*a %{_libdir}/libMagick.so %dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quantum} %{_libdir}/%{name}-%{base_version}/modules-Q%{quantum}/*/*.la %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/pkgconfig/Wand.pc %attr(644, root, man) %{_mandir}/man1/Magick-config.1.gz %attr(644, root, man) %{_mandir}/man1/Wand-config.1.gz %if %{perlmagick} %files perl %defattr(644, root, root, 755) %dir %{_libdir}/perl*/site_perl/*/*/Image %{_libdir}/perl*/site_perl/*/*/Image/Magick.pm %dir %{_libdir}/perl*/site_perl/*/*/auto/Image/Magick %{_libdir}/perl*/site_perl/*/*/auto/Image/Magick/* %attr(644, root, man) %{_mandir}/man3/*gz %endif %if %{magickpp} %files c++ %defattr(644, root, root, 755) %{_libdir}/libMagick++.so.* %files c++-devel %defattr(644, root, root, 755) %{_includedir}/Magick++.h %dir %{_includedir}/Magick++ %{_includedir}/Magick++/* %{_libdir}/libMagick++.*a %{_libdir}/libMagick++.so %{_libdir}/pkgconfig/%{name}++.pc %attr(644, root, man) %{_mandir}/man1/Magick++-config.1.gz %endif %changelog * Mon Jul 28 2003 Cristy 1.0-0 * Port of Troy Edwards' script to support ImageMagick. Thanks Troy.