# ImageMagick has adopted a new Version.Patchlevel version numbering system... # 5.4.0.3 is actually version 5.4.0, Patchlevel 3. %define VER 6.3.7 %define Patchlevel 0 Summary: An X application for displaying and manipulating images Name: ImageMagick %if "%{Patchlevel}" != "" Version: %{VER}.%{Patchlevel} %else Version: %{VER} %endif Release: 1.n0i.12%{?dist} Group: Applications/Multimedia License: ImageMagick URL: http://www.imagemagick.org/ %if "%{Patchlevel}" != "" Source: ftp://ftp.ImageMagick.org/pub/ImageMagick/ImageMagick-%{VER}-%{Patchlevel}.tar.bz2 %else Source: ftp://ftp.ImageMagick.org/pub/ImageMagick/ImageMagick-%{version}.tar.bz2 %endif Source1: magick_small.png Patch2: ImageMagick-6.3.7.0-multilib.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: rpm-build-reb00t-perl BuildRequires: perl >= 4:5.8.1 BuildRequires: automake >= 1.7 autoconf >= 2.58 libtool >= 1.5 BuildRequires: libX11-devel, libXext-devel, libXt-devel BuildRequires: pkgconfig BuildRequires: bzip2-devel BuildRequires: zlib-devel BuildRequires: freetype-devel >= 2.1 BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: libungif-devel %description ImageMagick(TM) is an image display and manipulation tool for the X Window System. ImageMagick can read and write JPEG, TIFF, PNM, GIF, and Photo CD image formats. It can resize, rotate, sharpen, color reduce, or add special effects to an image, and when finished you can either save the completed work in the original format or a different one. ImageMagick also includes command line programs for creating animated or transparent .gifs, creating composite images, creating thumbnail images, and more. ImageMagick is one of your choices if you need a program to manipulate and dis play images. If you want to develop your own applications which use ImageMagick code or APIs, you need to install ImageMagick-devel as well. %package devel Summary: Static libraries and header files for ImageMagick app development Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libX11-devel, libXext-devel, libXt-devel Requires: pkgconfig Requires: bzip2-devel Requires: zlib-devel Requires: freetype-devel >= 2.1 Requires: libjpeg-devel Requires: libpng-devel Requires: libtiff-devel Requires: libungif-devel %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. %package perl Summary: ImageMagick Perl bindings Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %{perl_req_compat} %description perl Perl bindings to ImageMagick. Install this package if you want to use any perl applications that use ImageMagick. %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}-c++ = %{version} Requires: %{name}-devel = %{version} %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. %prep %setup -q -n %{name}-%{VER} %patch2 -p1 %{fix_encoding -f iso-8859-1 README.txt www/Magick++/Drawable.html} %{__find} PerlMagick/demo/ Magick++/demo/ -type f -perm /a+x -exec %{__chmod} a-x {} \; %build %configure \ --disable-static \ --with-modules \ --with-x \ --without-windows-font-dir \ --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -lMagick -L$PWD/magick/.libs'" \ %{__make} %install %{__rm} -rf $RPM_BUILD_ROOT %{__make} install DESTDIR=$RPM_BUILD_ROOT # let autodep work %{__find} $RPM_BUILD_ROOT%{_libdir} \( -name '*.so' -o -name '*.so.*' \) \ -exec %{__chmod} 0755 {} \; # Perl bindings cleanup %{__rm} -rf $RPM_BUILD_ROOT%{perl_privlib} %{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Image/Magick/{Magick.bs,.packlist} # datadir cleanup %{__rm} -f $RPM_BUILD_ROOT%{_datadir}/%{name}-%{VER}/{ChangeLog,LICENSE,NEWS} # libtool cleanup %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la # doc installation fix %{__mv} $RPM_BUILD_ROOT/usr/share/doc/ImageMagick-%{VER} _htmldocs # Magick++ demos fix %{__rm} -rf Magick++/demo/.deps # fix multilib issues %ifarch x86_64 s390x ia64 ppc64 %define wordsize 64 %else %define wordsize 32 %endif %{__mv} $RPM_BUILD_ROOT%{_includedir}/magick/magick-config.h \ $RPM_BUILD_ROOT%{_includedir}/magick/magick-config-%{wordsize}.h %{__cat} << 'EOF' > $RPM_BUILD_ROOT%{_includedir}/magick/magick-config.h #ifndef ORBIT_MULTILIB #define ORBIT_MULTILIB #include #if __WORDSIZE == 32 # include "magick-config-32.h" #elif __WORDSIZE == 64 # include "magick-config-64.h" #else # error "unexpected value for __WORDSIZE macro" #endif #endif EOF # paranoid? not really %{_fixperms} $RPM_BUILD_ROOT %clean %{__rm} -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post c++ -p /sbin/ldconfig %postun c++ -p /sbin/ldconfig %files %defattr(-,root,root) %doc AUTHORS ChangeLog LICENSE NEWS NOTICE README.txt _htmldocs/* %{_bindir}/* %exclude %{_bindir}/*-config %{_libdir}/libMagick.so.* %{_libdir}/libWand.so.* %{_libdir}/%{name}-%{VER} %{_datadir}/%{name}-%{VER} %{_mandir}/man1/* %exclude %{_mandir}/man1/*-config.* %files devel %defattr(-,root,root) %{_bindir}/Magick-config %{_bindir}/Wand-config %{_libdir}/libMagick.so %{_libdir}/libWand.so %{_libdir}/pkgconfig/ImageMagick.pc %{_libdir}/pkgconfig/Wand.pc %{_includedir}/magick %{_includedir}/wand %{_mandir}/man1/Magick-config.* %{_mandir}/man1/Wand-config.* %files c++ %defattr(-,root,root) %doc Magick++/AUTHORS Magick++/COPYING Magick++/NEWS Magick++/README %{_libdir}/libMagick++.so.* %files c++-devel %defattr(-,root,root) %doc Magick++/ChangeLog Magick++/demo %{_bindir}/Magick++-config %{_includedir}/Magick++ %{_includedir}/Magick++.h %{_libdir}/libMagick++.so %{_libdir}/pkgconfig/ImageMagick++.pc %{_mandir}/man1/Magick++-config.* %files perl %defattr(-,root,root) %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt %{perl_vendorarch}/Image %{perl_vendorarch}/auto/Image %{_mandir}/man3/Image::Magick.* %changelog * Mon Nov 19 2007 Marius FERARU - 6.3.7.0-1.n0i.12 - version 6.3.7-0 - updated multilib patch * Fri Nov 16 2007 Marius FERARU - 6.3.6.10-1.n0i.11 - version 6.3.6-10 - disabled windows-font-dir support * Thu Nov 01 2007 Marius FERARU - 6.3.6.4-1.n0i.10 - version 6.3.6-4 * Mon Oct 29 2007 Marius FERARU - 6.3.6.3-1.n0i.9 - version 6.3.6-3 * Wed Oct 17 2007 Marius FERARU - 6.3.6.2-1.n0i.8 - version 6.3.6-2 - more spec cleanup - packaged more docs * Tue Oct 09 2007 Marius FERARU - 6.3.6.1-1.n0i.7 - version 6.3.6-1 - dropped obsolete open() patch * Sat Sep 22 2007 Marius FERARU - 6.3.5.10-1.n0i.6 - version 6.3.5-10 * Sat Sep 01 2007 Marius FERARU - 6.3.5.6-2.n0i.5 - proper documentation location * Thu Aug 30 2007 Marius FERARU - 6.3.5.6-1.n0i.4 - version 6.3.5-6 - updated multilib patch - baked a patch to fix open() call with O_CREAT (missing file mod) * Sat Aug 04 2007 Marius FERARU - 6.3.5.5-1.n0i.3 - version 6.3.5-5 - kludged multilib patch * Thu May 17 2007 Marius FERARU - 6.3.4.1-1.n0i.2 - version 6.3.4-1 - spec cleanups - disabled local doc patch - minimized BR (allowing more liberal building - auto deps) * Wed Mar 07 2007 Marius FERARU - 6.3.3.0-1.n0i.1 - version 6.3.3-0 - fixed PerlMagick LDDLFLAGS