%define perl_vendorarch %(eval "`%{_bindir}/perl -V:installvendorarch`"; echo $installvendorarch) %define perl_vendorarch64 %(eval "`%{_bindir}/perl_64bit -V:installvendorarch`"; echo $installvendorarch) %define real_name GraphicsMagick %define Quantum_Depth 16 Summary: An ImageMagick fork, offering faster image generation and better quality Name: %{real_name}-Q%{Quantum_Depth} Version: 1.3.23 Release: 1 License: MIT Group: Applications/Multimedia Source0: http://downloads.sourceforge.net/sourceforge/graphicsmagick/%{real_name}-%{version}.tar.bz2 URL: http://www.graphicsmagick.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: findutils, make, perl >= 5.8.8-2 BuildRequires: bzip2 >= 1.0.2-4 BuildRequires: freetype2-devel >= 2.5.3-1 BuildRequires: jasper-devel >= 1.900.1-2 BuildRequires: jbigkit-devel >= 2.1-1 BuildRequires: lcms-devel >= 1.19-1 BuildRequires: libjpeg-devel >= 9a-1 BuildRequires: libpng-devel >= 1.6.20-1 BuildRequires: libtiff-devel >= 4.0.3-1 BuildRequires: libxml2-devel >= 2.9.2-1 BuildRequires: zlib-devel >= 1.2.3-7 Requires: bzip2 >= 1.0.2-4 Requires: freetype2 >= 2.5.3-1 Requires: jasper >= 1.900.1-2 Requires: jbigkit-libs >= 2.1-1 Requires: lcms >= 1.19-1 Requires: libjpeg >= 9a-1 Requires: libpng >= 1.6.20-1 Requires: libtiff >= 4.0.3-1 Requires: libxml2 >= 2.9.2-1 Requires: urw-fonts Requires: zlib >= 1.2.3-7 %description GraphicsMagick is a comprehensive image processing package which is initially based on ImageMagick 5.5.2, but which has undergone significant re-work by the GraphicsMagick Group to significantly improve the quality and performance of the software. %package devel Summary: Libraries and header files for GraphicsMagick app development Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel GraphicsMagick-devel contains the Libraries and header files you'll need to develop GraphicsMagick applications. GraphicsMagick is an image manipulation program. If you want to create applications that will use GraphicsMagick code or APIs, you need to install GraphicsMagick-devel as well as GraphicsMagick. You do not need to install it if you just want to use GraphicsMagick, however. %package c++ Summary: GraphicsMagick Magick++ library (C++ bindings) Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %description c++ This package contains the GraphicsMagick++ library, a C++ binding to the GraphicsMagick graphics manipulation library. Install GraphicsMagick-c++ if you want to use any applications that use GraphicsMagick++. %package c++-devel Summary: C++ bindings for the GraphicsMagick library Group: Development/Libraries Requires: %{name}-c++ = %{version}-%{release} Requires: %{name}-devel = %{version}-%{release} %description c++-devel GraphicsMagick-devel contains the Libraries and header files you'll need to develop GraphicsMagick applications using the Magick++ C++ bindings. GraphicsMagick is an image manipulation program. If you want to create applications that will use Magick++ code or APIs, you'll need to install GraphicsMagick-c++-devel, ImageMagick-devel and GraphicsMagick. You don't need to install it if you just want to use GraphicsMagick, or if you want to develop/compile applications using the GraphicsMagick C interface, however. %package perl Summary: GraphicsMagick perl bindings Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Requires: perl >= 5.8.8-2 %description perl Perl bindings to GraphicsMagick. Install GraphicsMagick-perl if you want to use any perl scripts that use GraphicsMagick. %prep %setup -q -n %{real_name}-%{version} %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC=xlc_r export CXX=xlC_r ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --enable-static \ --with-quantum-depth=%{Quantum_Depth} \ --without-modules \ --with-magick_plus_plus \ --with-threads \ --without-perl \ --with-gs-font-dir=%{_datadir}/fonts/default/ghostscript \ --without-dps \ gmake %{?_smp_mflags} cd PerlMagick %{_bindir}/perl Makefile.PL INSTALLDIRS="vendor" gmake CC=gcc %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : mv -f ${RPM_BUILD_ROOT}%{_includedir}/%{real_name}/* ${RPM_BUILD_ROOT}%{_includedir}/ rmdir ${RPM_BUILD_ROOT}%{_includedir}/%{real_name} cd PerlMagick gmake CC=gcc DESTDIR=${RPM_BUILD_ROOT} install /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name .packlist -exec rm -f {} ';' /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name '*.bs' -empty -exec rm -f {} ';' /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type d -depth -exec rmdir {} 2>/dev/null ';' ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc Copyright.txt %doc README.txt %doc %{_datadir}/doc/%{real_name} %{_bindir}/gm %{_libdir}/libGraphicsMagick.a %{_libdir}/libGraphicsMagickWand.a %{_libdir}/GraphicsMagick* %{_datadir}/GraphicsMagick* %{_mandir}/man[1,4,5]/[a-z]* /usr/bin/gm /usr/lib/libGraphicsMagick.a /usr/lib/libGraphicsMagickWand.a /usr/lib/GraphicsMagick* %files devel %defattr(-,root,system,-) %{_bindir}/GraphicsMagick-config %{_bindir}/GraphicsMagickWand-config %{_libdir}/libGraphicsMagick.la %{_libdir}/libGraphicsMagickWand.la %{_libdir}/pkgconfig/GraphicsMagick.pc %{_libdir}/pkgconfig/GraphicsMagickWand.pc %{_includedir}/magick %{_includedir}/wand %{_mandir}/man1/GraphicsMagick-config.* %{_mandir}/man1/GraphicsMagickWand-config.* /usr/bin/GraphicsMagick-config /usr/bin/GraphicsMagickWand-config /usr/lib/libGraphicsMagick.la /usr/lib/libGraphicsMagickWand.la /usr/include/magick /usr/include/wand %files c++ %defattr(-,root,system,-) %{_libdir}/libGraphicsMagick++.a /usr/lib/libGraphicsMagick++.a %files c++-devel %defattr(-,root,system,-) %{_bindir}/GraphicsMagick++-config %{_includedir}/Magick++ %{_includedir}/Magick++.h %{_libdir}/libGraphicsMagick++*.la %{_libdir}/pkgconfig/GraphicsMagick++.pc %{_mandir}/man1/GraphicsMagick++-config.* /usr/bin/GraphicsMagick++-config /usr/include/Magick++ /usr/include/Magick++.h /usr/lib/libGraphicsMagick++.la %files perl %defattr(-,root,system,-) %doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt %{perl_vendorarch}/* %{_mandir}/man3/* %changelog * Wed Dec 23 2015 Michael Perzl - 1.3.23-1 - updated to version 1.3.23 * Wed Dec 23 2015 Michael Perzl - 1.3.22-1 - updated to version 1.3.22 * Thu Apr 02 2015 Michael Perzl - 1.3.21-1 - updated to version 1.3.21 * Mon Aug 25 2014 Michael Perzl - 1.3.20-1 - updated to version 1.3.20 * Thu Jan 02 2014 Michael Perzl - 1.3.19-1 - updated to version 1.3.19 * Wed Dec 04 2013 Michael Perzl - 1.3.18-1 - first version for AIX V5.1 and higher