%define gs_ver 8.64 %define gs_dot_ver 8.64 Summary: A PostScript(TM) interpreter and renderer. Name: ghostscript Version: %{gs_ver} Release: 1 License: AFPL (Aladdin Free Public License) URL: http://www.ghostscript.com/ Group: Applications/Publishing Source0: %{name}-%{gs_ver}.tar.bz2 Patch0: %{name}-%{version}-aix.patch Patch1: %{name}-runlibfileifexists.patch Patch2: %{name}-pksmraw.patch Patch3: %{name}-bitcmyk.patch Patch4: %{name}-CVE-2009-0583,0584.patch Patch5: %{name}-CVE-2009-0792.patch Patch6: %{name}-CVE-2009-0196.patch BuildRoot: %{_tmppath}/%{name}-%{gs_ver}-root BuildRequires: libjpeg-devel, libpng-devel >= 1.2.29, zlib-devel >= 1.2.3 BuildRequires: fontconfig-devel >= 2.5.0 BuildRequires: libpaper-devel >= 1.1.23 BuildRequires: cairo-devel >= 1.8.0 BuildRequires: make, patch Requires: libjpeg, libpng >= 1.2.29, zlib >= 1.2.3 Requires: fontconfig >= 2.5.0 Requires: libpaper >= 1.1.23 Requires: cairo >= 1.8.0 Requires: urw-fonts >= 2.4, ghostscript-fonts >= 8.11 %description Ghostscript is a set of software that provides a PostScript(TM) interpreter, a set of C procedures (the Ghostscript library, which implements the graphics capabilities in the PostScript language) and an interpreter for Portable Document Format (PDF) files. Ghostscript translates PostScript code into many common, bitmapped formats, like those understood by your printer or screen. Ghostscript is normally used to display PostScript files and to print PostScript files to non-PostScript printers. If you need to display PostScript files or print them to non-PostScript printers, you should install ghostscript. If you install ghostscript, you also need to install the ghostscript-fonts package. This package also includes the header files for developing applications that use ghostscript. %package doc Summary: Documentation for %{name}. Requires: %{name} = %{version}-%{release} Group: Documentation %description doc The documentation files that come with %{name}. %prep %setup -q export PATH=/opt/freeware/bin:$PATH # Define .runlibfileifexists. %patch1 -p1 # Fix pksmraw output (bug #308211). Still needed in 8.63. %patch2 -p1 -b .pksmraw # Fix bitcmyk driver (bug #486644). %patch3 -p1 -b .bitcmyk # Applied patch to fix CVE-2009-0583 (bug #487742) and CVE-2009-0584 # (bug #487744). %patch4 -p1 -b .CVE-2009-0583,0584 # Applied patch to fix CVE-2009-0792 (bug #491853). %patch5 -p1 -b .CVE-2009-0792 # Applied patch to fix CVE-2009-0196 (bug #493379). %patch6 -p1 -b .CVE-2009-0196 # after %patch4 and %patch5 this patch is needed for compilation on AIX5L V5.1 %patch0 %build export CC="xlc" export CFLAGS="-O" ./configure \ --prefix=%{_prefix} \ --with-ijs \ --with-jbig2dec \ --with-drivers=ALL cat Makefile | \ sed -e "s|SHARE_JPEG=0|SHARE_JPEG=1|" | \ sed -e "s|SHARE_LIBPNG=0|SHARE_LIBPNG=1|" | \ sed -e "s|SHARE_ZLIB=0|SHARE_ZLIB=1|" > Makefile.tmp mv Makefile.tmp Makefile gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake prefix=${RPM_BUILD_ROOT}%{_prefix} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # install header files mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name} cp base/errors.h ${RPM_BUILD_ROOT}%{_includedir}/%{name} cp base/gdevdsp.h ${RPM_BUILD_ROOT}%{_includedir}/%{name} cp psi/iapi.h ${RPM_BUILD_ROOT}%{_includedir}/%{name} cp psi/ierrors.h ${RPM_BUILD_ROOT}%{_includedir}/%{name} chmod 644 ${RPM_BUILD_ROOT}%{_includedir}/%{name}/* mkdir -p ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{gs_dot_ver} mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}/%{gs_dot_ver}/doc/* ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{gs_dot_ver} rmdir ${RPM_BUILD_ROOT}%{_datadir}/%{name}/%{gs_dot_ver}/doc/ mkdir -p ${RPM_BUILD_ROOT}%{_mandir} mv ${RPM_BUILD_ROOT}%{_datadir}/man/* ${RPM_BUILD_ROOT}%{_mandir} rm -rf ${RPM_BUILD_ROOT}%{_datadir}/man ( cd ${RPM_BUILD_ROOT} for dir in bin include 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) %{_bindir}/* %{_includedir}/* %{_mandir}/man?/* %{_datadir}/%{name}/%{gs_dot_ver} /usr/bin/* /usr/include/* %files doc %defattr(-,root,system) %doc %{_docdir}/%{name}-%{gs_dot_ver} %changelog * Tue Sep 15 2009 Michael Perzl - 8.64-1 - updated to version 8.64 * Tue Sep 15 2009 Michael Perzl - 8.62-3 - fixed some minor spec file issues * Wed Apr 23 2008 Michael Perzl - 8.62-2 - some minor spec file fixes * Wed Mar 05 2008 Michael Perzl - 8.62-1 - updated to version 8.62 * Thu Feb 21 2008 Michael Perzl - 8.61-1 - updated to version 8.61 * Fri Sep 28 2007 Michael Perzl - 8.60-1 - first version for AIX V5.1 and higher