Summary: SpliX - Driver for SamsungĀ“s SPL2 and SPLc laser printers Name: openprinting-splix Version: 2.0.0 Release: 2lsb3.2 License: GPL Group: Applications/System URL: http://splix.ap2c.org/ %define jbig 1 %define drivername splix %define extraversion %nil #define extraversion -rc2 %define driverstr SpliX %define supplierstr OpenPrinting %define supplier %{supplierstr}-%{driverstr} %define lsbver 3.2 %define ppdnickname , %{driverstr} %{version}%{extraversion} (%{supplierstr} LSB %{lsbver}) BuildRequires: lsb-build-cc, lsb-build-c++, lsb-appchk BuildRequires: perl, gzip, cupsddk Requires: lsb >= %{lsbver} Source0: http://ovh.dl.sourceforge.net/sourceforge/splix/splix-%{version}%{extraversion}.tar.bz2 Source1: http://www.cl.cam.ac.uk/~mgk25/download/jbigkit-2.0.tar.gz # Update to current SVN snapshot: # tar -xvjf splix-2.0.0-rc2.tar.bz2 # svn co https://splix.svn.sourceforge.net/svnroot/splix splix # mv splix # mv splix/splix splix-svn254 # rm -rf splix # diff -uraN -x .svn splix-2.0.0-rc2 splix-svn254 > splix-2.0.0-svn254.patch #Patch0: splix-2.0.0-svn254.patch BuildRoot: %_tmppath/%name-%version-%release-root %description This driver gives support for most of SansungĀ“s current cheap laser printers, once for monchrome printers, like ML-1610, ML1740, ... (SPL2-based) and for color printers, like the CLP-500 (SPLc-based). Note that older Samsung SPL1 printers, like the ML-4500 or ML-1410 are not supported by this driver. # Packaging settings %install_into_opt %prep # remove old directory rm -rf $RPM_BUILD_DIR/%{drivername}-%{version}%{extraversion} %setup -q -n %{drivername}-%{version}%{extraversion} %if %jbig %setup -q -T -D -a 1 -n %{drivername}-%{version}%{extraversion} %endif #patch0 -p1 # LSB does not provide type "size_t", replace it by "long" #perl -p -i -e 's/size_t/long/g' `grep -l size_t */*` # Add missing "#include " and "#include " perl -p -i -e 's/(\#include\s+)/\#include \n\#include \n$1/g' include/ppdfile.h src/document.cpp # Remove hard-coded "g++" from Makefiles perl -p -i -e 's/g\+\+/\$(CXX)/' Makefile */Makefile *.mk */*.mk # Remove the manufacturer names from the PPD directories perl -p -i -e 's:/(samsung|xerox|dell):/:g' ppd/Makefile # Stripping of rastertospl2 does not work in LSB Build Environment #perl -p -i -e 's:(install\s+-m\s+755)\s+-s:$1:g' src/Makefile %build %if %jbig cd jbigkit make CC="$CC" cd .. %endif # Assure that the PPDs and po files are newer than the .drv file, so that # "make" does not try to rebuild the PPDs. #sleep 1 #touch ppd/po/*.po #sleep 1 #touch ppd/*.ppd %if %jbig make OPTIM_CXXFLAGS="$CXXFLAGS -I`pwd`/jbigkit/libjbig -I`pwd`/include/" rastertoqpdl_LDFLAGS="$LDFLAGS -lcups -lcupsimage -L`pwd`/jbigkit/libjbig/ `pwd`/jbigkit/libjbig/libjbig.a" pstoqpdl_LDFLAGS="$LDFLAGS -lcups -lcupsimage -L`pwd`/jbigkit/libjbig/ `pwd`/jbigkit/libjbig/libjbig.a" rastertoqpdl_LIBS="" pstoqpdl_LIBS="" CUPSFILTER=%{_cupsserverbin}/filter CUPSPPD=%{_cupsppd} V=1 CC="$CC" CXX="$CXX" %else make DISABLE_JBIG=1 rastertoqpdl_LDFLAGS="$LDFLAGS -lcups -lcupsimage" pstoqpdl_LDFLAGS="$LDFLAGS -lcups -lcupsimage" CUPSFILTER=%{_cupsserverbin}/filter CUPSPPD=%{_cupsppd} V=1 CC="$CC" CXX="$CXX" %endif %install rm -rf %{buildroot} # Make directories install -d %{buildroot}%{_cupsppd}/Samsung install -d %{buildroot}%{_cupsppd}/Dell install -d %{buildroot}%{_cupsppd}/Xerox install -d %{buildroot}%{_cupsserverbin}/filter install -d %{buildroot}%{_docdir} %if %jbig make CUPSFILTER=%{buildroot}%{_cupsserverbin}/filter CUPSPPD=%{buildroot}%{_cupsppd} V=1 LANGUAGES=fr install %else make DISABLE_JBIG=1 CUPSFILTER=%{buildroot}%{_cupsserverbin}/filter CUPSPPD=%{buildroot}%{_cupsppd} V=1 LANGUAGES=fr install %endif # Correct language tags inside the PPD files perl -p -i -e 's/(\*LanguageVersion:\s*)English/\1German/' %{buildroot}%{_cupsppd}/*de.ppd || : perl -p -i -e 's/(\*LanguageVersion:\s*)English/\1French/' %{buildroot}%{_cupsppd}/*fr.ppd || : perl -p -i -e 's/(\*LanguageVersion:\s*)English/\1Italian/' %{buildroot}%{_cupsppd}/*it.ppd || : perl -p -i -e 's/(\*LanguageVersion:\s*)English/\1Portuguese/' %{buildroot}%{_cupsppd}/*pt.ppd || : # Rename PPDs appropriate to LSB agreements and compress the PPD files %adjust_ppds cp AUTHORS ChangeLog COPYING INSTALL README THANKS TODO \ %{buildroot}%{_docdir} %pre %create_opt_dirs %post # The "pstoqpdl" of SpliX hard-codes the path to pstoraster, which is bad for # a distribution-independent package where the location of the CUPS files # is only known at install time. So we put the hard-coded path into the /opt # file system set up by this package and create a symbolic link from the # actual pstoraster here in the post-install script if cups-config --version >/dev/null 2>/dev/null; then serverbin=`cups-config --serverbin` else serverbin=/usr/lib/cups fi if [ -d $serverbin/filter ] && [ -d %{_cupsserverbin}/filter/ ]; then ln -sf $serverbin/filter/pstoraster %{_cupsserverbin}/filter/pstoraster fi %set_ppd_links %update_ppds_fast %restart_cups %preun %not_on_rpm_update # Remove the link which we have set in the post-install script if [ -d %{_cupsserverbin}/filter/ ]; then rm -f %{_cupsserverbin}/filter/pstoraster fi %end_not_on_rpm_update %postun %not_on_rpm_update %remove_ppd_links %restart_cups %end_not_on_rpm_update %clean rm -rf %{buildroot} %files %defattr(-,root,root) %if %{optinstall} %{_prefix} %else %{_cupsserverbin}/filter/* %{_cupsppd} %endif %docdir %{_docdir} %changelog * Thu May 14 2009 Till Kamppeter 2.0.0-2lsb3.2 - Rebuilt with new LSB DDK macro set to improve automatic update of the PPDs of existing print queues. * Wed May 13 2009 Till Kamppeter 2.0.0-1lsb3.2 - New upstream release 2.0.0 - Updated jbigkit to version 2.0. * Sun Nov 29 2008 Till Kamppeter 2.0.0-0.rc2.4lsb3.2 - Updated to SVN revision 254, bug fix which makes printing with the newly added compression algorithm 0x0E actually work. * Wed Nov 28 2008 Till Kamppeter 2.0.0-0.rc2.3lsb3.2 - Updated to SVN revision 251, adds support for new printer models and fixes lots of bugs, especially garbage printed on the left border of A4-sized pages (Upstream bug 2221218, Ubuntu bug 292690). - Removed patches, the fixes are merged upstream. - Built with new RPM macro set, now the automatic PPD update does not cause error messages if CUPS is not running or no CUPS queues are on the system and in addition the default settings of the PPD options are conserved. * Wed Nov 12 2008 Till Kamppeter 2.0.0-0.rc2.2lsb3.2 - Let PPDs of existing print queues using this driver getting updated automatically. * Sat Nov 1 2008 Till Kamppeter 2.0.0-0.rc2.1lsb3.2 - Renamed package and changed supplier name, to avoid conflicts with packages from Linux distributions. - Added patch to fix crash which happens when the page size of the incoming CUPS Raster data is not the page size as specified in the PPD file or on the command line (Ubuntu bugs 261363, 268510). - Added patch to fix incorrect use of color toner when printing monochrome on color printers (http://sourceforge.net/tracker2/?func=detail&aid=1994510&group_id=175815&atid=874746) * Thu Jun 26 2008 Till Kamppeter 2.0.0-0.rc2.0lsb3.2 - New upstream release * Tue May 27 2008 Till Kamppeter 1.1.1-2lsb3.2 - Used new LSB DDK macro set with bug fixes * Wed Apr 30 2008 Till Kamppeter 1.1.1-1lsb3.2 - New upstream release - Removed PPDs for the Xerox Paser 6100, they are provided from upstream now - Added CUPS DDK to the BuildRequires. It is easier and better to rebuild the PPDs than introducing new workarounds to not rebuild them with each new upstream release. - Updated for building LSB-3.2 packages. * Wed May 2 2007 Till Kamppeter 1.0.1-3lsb3.1 - Use LSB DDK RPM macro set * Wed Apr 11 2007 Till Kamppeter 1.0.1-2lsb3.1 - 1.0.1-1 patch release from upstream - Link PPDs always to /usr/share/ppd - Spec file reorganization - Let maintainer scripts not fail on systems without CUPS * Fri Feb 2 2007 Till Kamppeter 1.0.1-1lsb3.1 - New upstream release - Removed PPDs of Samsung CLP-300 and CLP-600 as these printers are known to not work with this release of the driver * Fri Feb 2 2007 Till Kamppeter 1.0.1-0.beta2.1lsb3.1 - Initial release