%ifos darwin %define __defattr %defattr(-,root,wheel) %else %define __defattr %defattr(-,root,root) %endif # # "$Id: ghostscript.spec,v 1.20 2003/02/10 20:02:34 easysw Exp $" # # RPM "spec" file for ESP Ghostscript. # # Copyright 2000-2003 by Easy Software Products. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Please report all bugs and problems to "espgs@easysw.com". # %define gs_ver 7.05 %define espgs_ver 6 Summary: ESP Ghostscript Name: ghostscript Version: %{gs_ver}.%{espgs_ver} Release: 2a License: GPL Group: Applications/Publishing Source0: ftp://ftp.easysw.com/pub/ghostscript/espgs-%{version}-source.tar.gz Source1: ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200202.tar.gz Source2: ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz %define cjk_ver 6.51-cjk-M2-R3 Source9: ftp://ftp.gyve.org/pub/gs-cjk/M2/gs%{cjk_ver}.tar.gz # The CJK patch is for an older version of ghostscript; some patches don't # apply cleanly to the current one. Fixed versions here... Source100: lib_gs_cidcm.ps.patch Source101: lib_pdf_font.ps.patch %define vflib_ver gs704 Source15: ftp://ftp.u-aizu.ac.jp/pub/tex/ptex-win32/gs/%{vflib_ver}-j-vlib.zip Source20: CIDFnmap-cjk-20020627.tar.gz Patch0: localhost:/espgs-%{version}-macosx.patch Patch1: localhost:/espgs-macosx-jp.patch Patch2: localhost:/espgs-7.05.6-config.kfvflib.patch Patch3: localhost:/espgs-%{version}-gdevpdfw-macosx.patch Patch12: ghostscript-7.05-vflib.fixup.patch Url: http://www.cups.org/ghostscript.html %ifnos darwin Packager: Easy Software Products Vendor: Easy Software Products %endif BuildRequires: patchutils # use buildroot so as not to disturb the version already installed BuildRoot: %{_tmppath}/%{name}-root %description ESP Ghostscript is an enhanced version of GNU Ghostscript that includes new printer drivers and support for the Common UNIX Printing System. %package cups Summary: ESP Ghostscript Support for CUPS Group: Applications/Publishing %ifnos darwin Requires: ghostscript cups %else Requires: ghostscript %endif %description cups ESP Ghostscript support for the Common UNIX Printing System ("CUPS"). This package is required to support non-PostScript printers with CUPS. %package devel Summary: Files for developing applications that use ghostscript. Requires: %{name} = %{version} Group: Development/Libraries %description devel The header files for developing applications that use ghostscript. %package gtk Summary: A GTK-enabled PostScript(TM) interpreter and renderer. Requires: %{name} = %{version} Group: Applications/Publishing %description gtk A GTK-enabled version of Ghostscript, called 'gsx'. %prep %setup -n espgs-%{version} %ifos darwin %patch0 -p1 -b .macosx %patch1 -p1 -b .jp.macosx %patch3 -p1 -b .macosx %endif # Apply the gs-cjk patches tar -zxf %{SOURCE9} (cd gs%{cjk_ver}; cp -f %{SOURCE100} %{SOURCE101} . rm src_time_.h.patch \ src_unix-gcc.mak.patch \ lib_gs_res.ps.patch \ lib_pdf_ops.ps.patch \ src_zfont42.c.patch ) # Add the VFlib/jpdf patch # The unix-gcc.mak portions of this patch are in the config patch below mkdir vflib-source unzip %{SOURCE15} -d vflib-source patch vflib-source/gs7.04-j-vlib.diff -b -z .vflib.fixup -i %{PATCH12} # Ignore most of the patches to things in lib/ (they are bogus). (filterdiff -p1 -x 'lib/*' vflib-source/gs7.04-j-vlib.diff; filterdiff -p1 -i 'lib/gs_init.ps' vflib-source/gs7.04-j-vlib.diff) |\ patch -p1 -b -V simple -z .vflib %patch2 -p1 -b .config.kfvflib %build CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --bindir=%{_bindir} --mandir=%{_mandir} # If we got this far, all prerequisite libraries must be here. make make so %install # Make sure destination directories are there, since Ghostscript doesn't make them... mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 mkdir -p $RPM_BUILD_ROOT%{_docdir}/ghostscript mkdir -p $RPM_BUILD_ROOT%{_datadir}/ghostscript/7.05/examples make install soinstall prefix=$RPM_BUILD_ROOT%{_prefix} \ install_prefix=$RPM_BUILD_ROOT \ bindir=$RPM_BUILD_ROOT%{_bindir} \ datadir=$RPM_BUILD_ROOT%{_datadir} \ mandir=$RPM_BUILD_ROOT%{_mandir} \ docdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{gs_ver} mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/ghostscript/Resource/{Font,CIDFont} tar -zxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_prefix}/share/ghostscript/Resource tar -zxvf %{SOURCE2} -C $RPM_BUILD_ROOT%{_prefix}/share/ghostscript/Resource tar -zxvf gs%{cjk_ver}/install-cid.tar.gz -C $RPM_BUILD_ROOT%{_prefix}/share/ghostscript/Resource tar -zxvf %{SOURCE20} -C $RPM_BUILD_ROOT%{_prefix}/share/ghostscript/%{gs_ver}/lib MAIN_PWD=`pwd` (cd $RPM_BUILD_ROOT find .%{_datadir}/ghostscript/%{gs_ver}/lib/* | \ sed -e 's/\.//;' | grep -v lib/Fontmap* | grep -v gs_init.ps > $MAIN_PWD/rpm.sharelist find .%{_bindir}/ -type f | sed -e 's/\.//;' | \ grep -v 'gsx' >> $MAIN_PWD/rpm.sharelist ) mkdir -p $RPM_BUILD_ROOT%{_includedir}/ghostscript install -c -m 0644 src/iapi.h $RPM_BUILD_ROOT%{_includedir}/ghostscript install -c -m 0644 src/errors.h $RPM_BUILD_ROOT%{_includedir}/ghostscript install -c -m 0644 src/gdevdsp.h $RPM_BUILD_ROOT%{_includedir}/ghostscript rm -rf $RPM_BUILD_ROOT%{_mandir}/de %clean rm -rf $RPM_BUILD_ROOT %files -f rpm.sharelist %{__defattr} %dir %{_datadir}/ghostscript %dir %{_datadir}/ghostscript/%{gs_ver} %dir %{_datadir}/ghostscript/%{gs_ver}/lib %config %{_datadir}/ghostscript/%{gs_ver}/lib/gs_init.ps %config %{_datadir}/ghostscript/%{gs_ver}/lib/Fontmap* %{_datadir}/ghostscript/Resource %{_datadir}/ghostscript/%{gs_ver}/vflib %{_datadir}/ghostscript/%{gs_ver}/examples %{_libdir}/* %{_mandir}/man1/* %doc %{_docdir}/%{name}-%{gs_ver} %files cups %{__defattr} %{_sysconfdir}/cups/* %ifnos darwin %{_libdir}/cups/filter/* %else /usr/libexec/cups/filter/* %endif %files devel %{__defattr} %dir %{_includedir}/ghostscript %{_includedir}/ghostscript/*.h %files gtk %{__defattr} %{_bindir}/gsx %changelog * Mon Jan 5 2004 Keisuke Fujii 7.05.6-2a - 1st build on MacOS X 10.3. * Thu May 1 2003 Keisuke Fujii - 1st build on MacOS X 10.2. # # End of "$Id: ghostscript.spec,v 1.20 2003/02/10 20:02:34 easysw Exp $". #