File GraphicsMagick.spec of Package GraphicsMagick

#
# spec file for package GraphicsMagick (Version 1.2.5)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           GraphicsMagick
BuildRequires:  cups-client dcraw freetype2-devel gcc-c++ ghostscript-fonts-other ghostscript-fonts-std ghostscript-library liblcms-devel libtiff-devel libwmf-devel libxml2-devel pkgconfig
%if %suse_version > 1020
BuildRequires:  libjasper-devel
%else
BuildRequires:  libjasper
%endif
# Define Quantum depth
%define quant 8
%define base_version 1.2.5
Summary:        Viewer and Converter for Images
Version:        1.2.5
Release:        4.<RELEASE25>
License:        X11/MIT
Group:          Productivity/Graphics/Convertors
Source:         ftp://ftp.GraphicsMagick.org/pub/%{name}/%{name}-%{version}.tar.bz2
Patch2:         %{name}-%{version}-debian-fixed.patch
Patch4:         %{name}-%{version}-perl.patch
Patch10:        %{name}-%{version}-include.patch
Patch12:        %{name}-%{version}-CVE-2008-1097.patch
Patch13:        %{name}-%{version}-SA35216.patch
Url:            http://www.GraphicsMagick.org/
AutoReqProv:    on
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GraphicsMagick(TM) provides a powerful image manipulation
andtranslation utility. It is capable of displaying still images and
animations using the X Window system which provides a simple interface
forinteractively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick is one of your choices if
you need a program to manipulate and display images.It can read and
write over 88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM,
GIF, andPhoto CD. Besides it allows you to resize, rotate, sharpen,
color reduce, or add special effects to an image and to save the result
to any supported format. GraphicsMagick may be used to create animated
or transparent .gifs, to composite images, to create thumbnail images
and a lot more. If you want to develop your own applications which use
GraphicsMagick code or APIs, you need to install GraphicsMagick-devel
as well.

This package is compiled with Q8, which means that it provides better
performance on 8 bit images and less.



Authors:
--------
    see the AUTHORS file

%package -n libGraphicsMagick2
License:        X11/MIT
Summary:        Viewer and Converter for Images - runtime library
Group:          Productivity/Graphics/Convertors

%description -n libGraphicsMagick2
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.

GraphicsMagick is one of your choices if you need a program to
manipulate and display images. If you want to develop your own
applications which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.

This package is compiled with Q8, that means it provides better
performance on 8 and less bit images.



Authors:
--------
    see the AUTHORS file

%package -n libGraphicsMagickWand1
License:        X11/MIT
Summary:        Viewer and Converter for Images - runtime library
Group:          Productivity/Graphics/Convertors

%description -n libGraphicsMagickWand1
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.

GraphicsMagick is one of your choices if you need a program to
manipulate and display images. If you want to develop your own
applications which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.

This package is compiled with Q8, that means it provides better
performance on 8 and less bit images.



Authors:
--------
    see the AUTHORS file

%package devel
License:        X11/MIT
Summary:        Viewer and Converter for Images - files mandatory for development
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
# These comes from check in AB for 10.2
Requires:       liblcms-devel, freetype2-devel, xorg-x11-libXext-devel, xorg-x11-libSM-devel, xorg-x11-libICE-devel, xorg-x11-libX11-devel, xorg-x11-libXau-devel, xorg-x11-libXdmcp-devel, bzip2, zlib-devel, glibc-devel

%description devel
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.



Authors:
--------
    see the AUTHORS file

%package -n perl-GraphicsMagick
License:        X11/MIT
Summary:        Viewer and Converter for Images - perl interface
Group:          Development/Libraries/Perl
Requires:       %{name} = %{version} perl = %{perl_version}

%description -n perl-GraphicsMagick
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.

This package contains perl interface to GraphicsMagick library.



Authors:
--------
    see the AUTHORS file

%package -n libGraphicsMagick++2
License:        X11/MIT
Summary:        Viewer and Converter for Images - C++ interface
Group:          System/Libraries

%description -n libGraphicsMagick++2
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.

This subpackage contains C++ interface to GraphicsMagick library.



Authors:
--------
    see the AUTHORS file

%package -n libGraphicsMagick++-devel
License:        X11/MIT
Summary:        Viewer and Converter for Images - C++ interface - development files
Group:          Development/Libraries/C and C++
Provides:       GraphicsMagick-C++-devel 
Obsoletes:      GraphicsMagick-C++-devel <= 1.1.7 
Requires:       %{name} = %{version}, libGraphicsMagick++2 = %{version}
Requires:       %{name}-devel = %{version}
Requires:       c++_compiler

%description -n libGraphicsMagick++-devel
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.



Authors:
--------
    see the AUTHORS file

%prep
%setup -q
%patch2 -p1
%patch4
%patch10
%patch12
%patch13

%build
# do not run autoreconf
#autoreconf -fi
#if [ -z "`perl -v | grep 5.8`" ]; then
    export PERLOPTS="PREFIX=$RPM_BUILD_ROOT%{_prefix}"
#fi
# This shouldn't be there yet.
rm -f PerlMagick/Makefile.PL
CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
./configure --enable-shared --disable-static \
	--with-modules --enable-lzw \
	--with-frozenpaths \
	--without-perl \
	--with-magick-plus-plus \
	--with-quantum-depth=%{quant} \
	--prefix=%{_prefix} \
	--bindir=%{_bindir} \
	--datadir=%{_datadir} \
	--libdir=%{_libdir} \
	--mandir=%{_mandir} \
	--docdir=%{_defaultdocdir}/%{name} \
	--with-x \
	--x-libraries=/usr/%_lib \
	--x-includes=/usr/include
#	--with-perl-options="$PERLOPTS" \
make %{?jobs:-j%jobs}
cd PerlMagick
perl Makefile.PL
make %{?jobs:-j%jobs} LD_RUN_PATH="/usr/%{_lib}"

%install
make DESTDIR=$RPM_BUILD_ROOT install
cp ChangeLog* *.txt $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}
cd PerlMagick
make DESTDIR=$RPM_BUILD_ROOT LD_RUN_PATH="/usr/%{_lib}" install_vendor
%perl_process_packlist
# 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`
# perl modules are in lib even on 64 bit arch
rm -f `find $RPM_BUILD_ROOT/usr/lib/perl*/ -name perllocal.pod -type f`
rm -f `find $RPM_BUILD_ROOT/usr/lib/perl*/ -name .packlist -type f`
rm -f $RPM_BUILD_ROOT/var/adm/perl-modules/GraphicsMagick
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%post -n libGraphicsMagick2 -p /sbin/ldconfig

%postun -n libGraphicsMagick2 -p /sbin/ldconfig

%post -n libGraphicsMagickWand1 -p /sbin/ldconfig

%postun -n libGraphicsMagickWand1 -p /sbin/ldconfig

%post -n libGraphicsMagick++2 -p /sbin/ldconfig

%postun -n libGraphicsMagick++2 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644, root, root, 755)
%docdir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}
%doc %{_datadir}/%{name}-%{base_version}
%exclude %{_datadir}/%{name}-%{base_version}/config
%attr(755, root, root) %{_bindir}/gm
%doc %{_mandir}/man1/gm.1.gz
%doc %{_mandir}/man4/*gz
%doc %{_mandir}/man5/*gz

%files -n libGraphicsMagick2
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}.so.*
%dir %{_libdir}/%{name}-%{base_version}
%dir %{_libdir}/%{name}-%{base_version}/config
%{_libdir}/%{name}-%{base_version}/config/*.mgk
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/coders
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/filters
%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.so
%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.la
%dir %{_datadir}/%{name}-%{base_version}
%{_datadir}/%{name}-%{base_version}/config

%files -n libGraphicsMagickWand1
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}Wand.so.*

%files devel
%defattr(644, root, root, 755)
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}/wand
%{_includedir}/%{name}/wand/*
%dir %{_includedir}/%{name}/magick
%{_includedir}/%{name}/magick/*
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}Wand.so
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}Wand.pc
%attr(755, root, root) %{_bindir}/%{name}-config
%attr(755, root, root) %{_bindir}/%{name}Wand-config
%doc %{_mandir}/man1/%{name}-config.1.gz
%doc %{_mandir}/man1/%{name}Wand-config.1.gz

%files -n perl-GraphicsMagick
%defattr(644, root, root, 755)
%dir %{perl_vendorarch}/Graphics
%dir %{perl_vendorarch}/auto/Graphics
%dir %{perl_vendorarch}/auto/Graphics/Magick
%{perl_vendorarch}/Graphics/Magick.pm
%{perl_vendorarch}/auto/Graphics/Magick/*
%doc %{_mandir}/man3/*gz

%files -n libGraphicsMagick++2
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}++.so.*

%files -n libGraphicsMagick++-devel
%defattr(644, root, root, 755)
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}/Magick++
%{_includedir}/%{name}/Magick++.h
%{_includedir}/%{name}/Magick++/*
%{_libdir}/lib%{name}++.so
%{_libdir}/pkgconfig/%{name}++.pc
%attr(755, root, root) %{_bindir}/%{name}++-config
%doc %{_mandir}/man1/%{name}++-config.1.gz

%changelog
* Thu Jun 04 2009 nadvornik@suse.cz
- fixed integer overflow in XMakeImage [SA35216, bnc#507728]
* Wed Oct 15 2008 nadvornik@suse.cz
- renamed libGraphicsMagick1 -> libGraphicsMagick2
* Fri Sep 12 2008 nadvornik@suse.cz
-  updated to 1.2.5
  * many fixes and improvements
  * see NEWS.txt for details
- renamed libGraphicsMagickWand0 -> libGraphicsMagickWand1
- renamed libGraphicsMagick++1 -> libGraphicsMagick++2
* Fri May 23 2008 nadvornik@suse.cz
- fixed CVE-2008-1097 PCX buffer overflow [bnc#391366]
- fixed CVE-2008-1096 XCF Buffer overflow [bnc#391364]
* Tue Mar 11 2008 nadvornik@suse.cz
- updated to 1.1.11:
  * security fixes merged upstream
  * BMP, DIB: Support large files
  * TIFF: Endian option (-endian) now controls TIFF byte endian
  order rather than bit fill order
* Tue Oct 23 2007 nadvornik@suse.cz
- updated to 1.1.10:
  Bugs Fixed:
  o Image rotate by -90/270 degrees was producing wrong output.
  o In mogrify command, don't remove file name based on random junk in
  memory.
  o Fixed memory leak when reading MPC files.
  o Fixed crash when writing MIFF format and depth is not expected 8/16/32/.
  o In mogrify command, don't leak memory in the case where the image
  file contains multiple frames.
  o Fixed crash in PNG and JPEG coders when the image to be written is
  part of an image list.
  o PNG reader errors are now properly reported to the user.
  o TIFF output can now be written to a pipe or other non-seekable
  destination.
  o Support writing PDF with CCITT compression.
  Feature Improvements:
  o Added a new 'benchmark' command which can be used to perform
  benchmarking on any other command.
  o Image rotate in clockwise (90 degrees) or counter-clockwise (270
  degrees) direction is now 2-9X faster than before.
  o The -version option now includes a list of supported features.
- fixed interger overflows: CVE-2007-4985, CVE-2007-4986,
  CVE-2007-4988 [#327021]
- fixed to build with GCC 4.3
* Mon Aug 06 2007 nadvornik@suse.cz
- updated to 1.1.8:
  * security fixes merged upstream
  * a lot of other bugfixes
* Wed Jul 25 2007 nadvornik@suse.cz
- adjusted to Shared Library Policy:
  * new subpackages libGraphicsMagick1, libGraphicsMagickWand0
  * GraphicsMagick-c++ -> libGraphicsMagick++1
  * GraphicsMagick-c++-devel -> libGraphicsMagick++-devel
- fixed to build
* Thu Apr 19 2007 nadvornik@suse.cz
- fixed various crashes on malformed input, including
  CVE-2007-1797 and CVE-2007-1667 [#258253]
- adjusted BuildRequires for libjasper-devel
* Tue Feb 27 2007 dmueller@suse.de
- reduce buildrequires
* Thu Feb 22 2007 nadvornik@suse.cz
- fixed patch for palm codec CVE-2006-5456 [#215685]
- fixed palm patch for palm codec [#215685]
- fixed PerlMagic module library dependencies [#243002]
- fixed broken code that caused compiler warnings [#243012]
* Thu Nov 16 2006 dmueller@suse.de
- fix c++-devel package requires
* Mon Oct 30 2006 nadvornik@suse.cz
- applied debian patch for CVE-2006-5456, CVE-2006-3743,
  CVE-2006-3744, CAN-2005-0397, CVE-2005-4601
* Thu Sep 21 2006 nadvornik@suse.cz
- minor adjustments in spec file
* Thu Sep 14 2006 lmichnovic@suse.cz
- initial version 1.1.7
openSUSE Build Service is sponsored by