Summary: CUPS DDK - Driver Development Kit Name: cupsddk Version: 1.2.3 Release: 2lsb3.2 License: GPL Group: Applications/System URL: http://www.cups.org/ %define supplier cupsddk %define drivername cupsddk BuildRequires: lsb-build-cc, lsb-build-c++, lsb-appchk BuildRequires: perl, gzip Requires: lsb >= 3.2 Requires: %{name}-drivers = %{version} Source0: cupsddk-%{version}-source.tar.bz2 # Add the full CUPS package for static linking, as CUPS DDK uses parts of # CUPS which are not covered by the LSB Source1: http://ftp.easysw.com/pub/cups/1.3.7/cups-1.3.7-source.tar.bz2 BuildRoot: %_tmppath/%name-%version-%release-root %package drivers Summary: CUPS DDK - PCL and ESC/P drivers Group: Applications/System %description The CUPS Driver Development Kit (DDK) provides a suite of standard drivers, a PPD file compiler, and other utilities that can be used to develop printer drivers for CUPS and other printing environments. CUPS provides a portable printing layer for UNIX(r)-based operating systems. The CUPS DDK provides the means for mass-producing PPD files and drivers/filters for CUPS-based printer drivers. This package should be installed for creating PPD files and for developing printer drivers. %description drivers The CUPS DDK drivers provide support for all HP PCL/RTL and Epson ESC/P2 devices. This package is needed to use the PPD files for non-PostScript printers available on www.cups.org. # Packaging settings %install_into_opt %has_bin_executables %has_man_pages %uses_libcups_and_libcupsimage %prep # remove old directory rm -rf $RPM_BUILD_DIR/%{name}-%{version} %setup -q -n %{name}-%{version} %setup -q -T -D -a 1 -n %{name}-%{version} # Add missing "#include " to source files perl -p -i -e 's/(\#include\s+\"driver\.h\")/$1\n\#include /g' cups/rgb.c # Additions to make the CUPS library build # Remove non-LSB function "getpass()" perl -p -i -e 's/return\s*\(getpass\(prompt\)\)/NULL/g' cups*/cups/usersys.c # Add definitions for additional IOCTLs perl -p -i -e 's/(\#include\s+\"http-private\.h\")/#define _SYS_IOCTL_H\n#include \n$1/' cups/getifaddrs.c # Make the correct header files for our statically linked CUPS image library # being used perl -p -i -e 's/(\#\s*include\s+.?)cups(\/raster\.h.?)/$1filter$2/' */*.[ch]* # Let's look at the compilation command lines perl -p -i -e "s,^.SILENT:,," cups-*/Makedefs.in Makedefs.in %build cupssrc=`ls -d cups-*` cupslibs=" -L`pwd`/$cupssrc `pwd`/$cupssrc/cups/libcups.a -lpthread -lcrypt -lz" cupsdrvlibs=" -L`pwd`/$cupssrc `pwd`/$cupssrc/cups/libcups.a `pwd`/$cupssrc/filter/libcupsimage.a -lpthread -lcrypt -lz" cd cups-* %configure --enable-static --without-shared --disable-dbus --without-php \ --disable-slp --disable-gssapi --disable-ldap --disable-ssl \ --disable-cdsassl --disable-gnutls --disable-openssl --disable-pam \ --disable-dnssd --disable-launchd cd cups %make libcups.a cd .. cd filter %make LINKCUPS="$cupslibs" libcupsimage.a cd .. cd .. export CFLAGS="$CFLAGS -I`pwd`/$cupssrc" export CXXFLAGS="$CXXFLAGS -I`pwd`/$cupssrc" export LDFLAGS="$LDFLAGS $cupsdrvlibs" %configure --with-docdir=%{_docdir} # Adjust CUPS paths auto-detected by ./configure %adjust_cups_dirs %make CUPSLIBS="$cupslibs" CUPSDRVLIBS="$cupsdrvlibs" CUPSLIBS_ST="$cupslibs" CUPSDRVLIBS_ST="$cupsdrvlibs" CUPS_DATADIR=%{_cupsdatadir} CUPS_SERVERBIN=%{_cupsserverbin} CUPS_SERVERROOT=%{_cupsserverroot} %install rm -rf %{buildroot} %make DSTROOT=%{buildroot} CUPS_DATADIR=%{_cupsdatadir} CUPS_SERVERBIN=%{_cupsserverbin} CUPS_SERVERROOT=%{_cupsserverroot} install # Rename PPDs appropriate to LSB agreements and compress the PPD files %adjust_ppds cp *.txt *.html %{buildroot}%{_docdir} %pre drivers %init_scriptlet %create_opt_dirs %post drivers %init_scriptlet %set_opt_paths %set_cups_links %restart_cups %preun drivers %init_scriptlet %not_on_rpm_update %remove_opt_paths %end_not_on_rpm_update %postun drivers %init_scriptlet %not_on_rpm_update %remove_cups_links %restart_cups %end_not_on_rpm_update %clean rm -rf %{buildroot} %files %defattr(-,root,root) %if %{optinstall} %{_bindir} %{_includedir} %{_mandir}/man5 %else %{_bindir}/* %{_includedir}/* %{_mandir}/man5/* %endif %{_docdir} %{_mandir}/man1/cups* %{_mandir}/man1/ppd* %docdir %{_docdir} %files drivers %defattr(-,root,root) %if %{optinstall} %dir %{_prefix} %{_prefix}/cups %{_prefix}/profile.d %{_datadir} %dir %{_mandir} %dir %{_mandir}/man1 %else %{_datadir}/* %{_cupsserverbin}/*/* %{_cupsdatadir}/* %endif %{_mandir}/man1/rasterto* %{_mandir}/man1/commandto* %changelog * Tue May 27 2008 Till Kamppeter 1.2.3-2lsb3.2 - Used new LSB DDK macro set with bug fixes * Tue May 6 2008 Till Kamppeter 1.2.3-1lsb3.2 - Updated to version 1.2.3 - Updated for building LSB-3.2 packages. * Sat Sep 8 2007 Till Kamppeter 1.2.0-1lsb3.1 - Updated to version 1.2.0 * Mon Jun 18 2007 Till Kamppeter 1.1.1-1lsb3.1 - Initial release