%if %( test -f /usr/X11R6/bin/imake && echo 1 || echo 0 ) %define HAVE_X 1 %else %define HAVE_X 0 %endif Name: ghostpdl Summary: Implementation of the PCL-5 and PCL-XL family of page description languages. Version: 1.51 Release: 4 Packager: Philip Gwyn License: GPL Group: Graphics/Libraries URL: http://www.artifex.com/downloads/ Provides: pcl6 Source: ghostpdl-%{version}.tar.bz2 Source1: http://mirror.cs.wisc.edu/pub/mirrors/ghost/AFPL/GhostPCL/urwfonts-1.41.tar.bz2 Patch0: ghostpdl-1.51-fontpath.patch Patch1: ghostpdl-1.51-with-tiff.patch Patch2: ghostpdl-1.51-noX.patch BuildRoot: %{_tmppath}/ghostpdl_%{version}-build BuildRequires: gcc /usr/bin/install libtiff-devel Obsoletes: GhostPCL %define src_dir ghostpdl-%version %description GhostPCL is Artifex Software's implementation of the PCL-5 and PCL-XL family of page description languages. For more information please see the documentation included with the source package. GhostPCL is PCL technology; it is not intended to be a finished software application but a collection of software components that will ultimately be included in a software application or a real time embedded system. Generally the GhostPCL languages are compliant with the Genoa (now QualityLogic) Functional Test Suite and the Genoa Application Test suite. Also each language should run the corresponding Genoa Comprehensive Evaluation Test (CET) without egregious errors. %prep cd $RPM_BUILD_DIR rm -fr %{src_dir} %{name}-%{version} /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/ghostpdl-1.51.tar.bz2 | tar -xvf - STATUS=$? if [ $STATUS -ne 0 ]; then exit $STATUS fi # mv %{src_dir} %{name}-%{version} cd %{name}-%{version} pwd %_fixowner %_fixgroup %_fixperms . %patch0 -p1 %patch1 -p1 /usr/bin/bzip2 -dc $RPM_SOURCE_DIR/urwfonts-1.41.tar.bz2 | tar -xvf - mv urwfonts-1.41 urwfonts %build cd %{name}-%{version} %if %{HAVE_X} # first make to build X version make -C main -f pcl6_gcc.mak mv main/obj/pcl6 main/obj/pcl6x # cleanup make -C main -f pcl6_gcc.mak clean %endif # patch, then build noX version cat $RPM_SOURCE_DIR/ghostpdl-1.51-noX.patch | patch -p1 -b make -C main -f pcl6_gcc.mak %install cd %{name}-%{version} mkdir -p $RPM_BUILD_ROOT/usr/bin/ mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/ mkdir -p $RPM_BUILD_ROOT/usr/share/fonts/default/TrueType/ if [ $(%{__id_u}) = '0' ] ; then install --owner=root --group=root --mode=0755 main/obj/pcl6 $RPM_BUILD_ROOT/usr/bin/ install --owner=root --group=root --mode=0755 main/obj/pcl6x $RPM_BUILD_ROOT/usr/bin/ install --owner=root --group=root --mode=0644 doc/ghostpcl.* $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/ install --owner=root --group=root --mode=0644 urwfonts/*.ttf $RPM_BUILD_ROOT/usr/share/fonts/default/TrueType/ else install --mode=0755 main/obj/pcl6 $RPM_BUILD_ROOT/usr/bin/ %if %{HAVE_X} install --mode=0755 main/obj/pcl6x $RPM_BUILD_ROOT/usr/bin/ %endif install --mode=0644 doc/ghostpcl.* $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/ install --mode=0644 urwfonts/*.ttf $RPM_BUILD_ROOT/usr/share/fonts/default/TrueType/ fi %files %defattr(-,root,root) /usr/bin/pcl6 %doc /usr/share/doc/%{name}-%{version}/* ################################################ %package fonts Summary: URW fonts in TTF format for ghostpdl License: AFPL Group: Graphics/Libraries Obsoletes: GhostPCL-fonts %description fonts URW fonts in TTF format for GhostPCL. Included in the archive are a set of the standard 80 TrueType fonts from URW, distributed under the same license. These are generally useful and are also available separately. The version number matches that of the corresponding GhostPCL release. %files fonts %defattr(-,root,root) /usr/share/fonts/default/TrueType/*.ttf %if %{HAVE_X} ################################################ %package X Summary: X client for GhostPCL Group: Graphics/Libraries Requires: ghostpdl Obsoletes: GhostPCL-X %description X X client for GhostPCL %files X %defattr(-,root,root) /usr/bin/pcl6x %endif %changelog * Wed Aug 10 2005 - philip@awale.qc.ca - First version