From 7255734adffc6ab73dd84e627683bfe2c488ae21 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Thu, 23 May 2013 15:29:38 +0200 Subject: [PATCH] initial build --- .gitignore | 1 + c2esp-drv_only.patch | 34 +++++++++++++++++++++ c2esp-jbig.patch | 47 +++++++++++++++++++++++++++++ c2esp.spec | 71 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 154 insertions(+) create mode 100644 c2esp-drv_only.patch create mode 100644 c2esp-jbig.patch create mode 100644 c2esp.spec diff --git a/.gitignore b/.gitignore index e69de29..e9308f0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/c2esp26.tar.gz diff --git a/c2esp-drv_only.patch b/c2esp-drv_only.patch new file mode 100644 index 0000000..2cfe35b --- /dev/null +++ b/c2esp-drv_only.patch @@ -0,0 +1,34 @@ +diff -up c2esp26/Makefile.noppd c2esp26/Makefile +--- c2esp26/Makefile.noppd 2013-05-09 16:28:47.000000000 +0200 ++++ c2esp26/Makefile 2013-05-09 16:53:13.012203891 +0200 +@@ -32,6 +32,7 @@ FILTERBIN := $(DESTDIR)$(shell cups-conf + MANDIR=$(PREFIX)/share/man + DOCDIR=$(PREFIX)/share/doc/c2esp + PPDDIR=$(PREFIX)/share/ppd/c2esp ++DRVDIR=$(DESTDIR)$(shell cups-config --datadir)/drv/c2esp + INSTALL=install + + # Programs and libraries +@@ -247,7 +248,7 @@ myopldecode: myopldecode.o + # Installation rules + # + #install: all install-test install-prog install-ppd install-doc +-install: all install-prog install-ppd install-doc ++install: all install-prog install-drv install-doc + + # + # Now use your printer configuration GUI to create a new printer if required. +@@ -291,8 +292,11 @@ install-prog: + fi + + MODEL=$(DESTDIR)$(shell cups-config --datadir)/model +-PPD=$(DESTDIR)/usr/share/ppd +-VARPPD=/var/lp/ppd ++ ++install-drv: ++ $(INSTALL) -d -m 755 $(DRVDIR) ++ $(INSTALL) -c -m 644 $(ESPDRVFILE) $(DRVDIR) ++ $(INSTALL) -c -m 644 $(CDRVFILE) $(DRVDIR) + + install-ppd: + # diff --git a/c2esp-jbig.patch b/c2esp-jbig.patch new file mode 100644 index 0000000..f859f0b --- /dev/null +++ b/c2esp-jbig.patch @@ -0,0 +1,47 @@ +diff -up c2esp26/Makefile.jbig c2esp26/Makefile +--- c2esp26/Makefile.jbig 2012-09-06 01:18:06.000000000 +0200 ++++ c2esp26/Makefile 2013-05-09 15:49:53.845249368 +0200 +@@ -42,8 +42,6 @@ PROGS= + DEVPROGS= myopldecode + SCRIPTS= c2esplog + FILTERS= c2esp c2espC command2esp +-LIBJBG = jbig.o jbig_ar.o +-LIBJBG85= jbig85.o jbig_ar.o + BINPROGS= + ESPDRVFILE = KodakESP_15.drv + CDRVFILE = KodakESP_C_05.drv +@@ -233,8 +231,8 @@ all-done: + @echo "Patent warning that used to be here no longer applies" + @echo + +-c2esp: c2esp.o c2espcommon.o $(LIBJBG85) +- $(CC) $(CFLAGS) -o $@ c2esp.o c2espcommon.o $(LIBCUPSDRIVER) $(LIBCUPSIMAGE) $(LIBJBG85) ++c2esp: c2esp.o c2espcommon.o ++ $(CC) $(CFLAGS) -o $@ c2esp.o c2espcommon.o $(LIBCUPSDRIVER) $(LIBCUPSIMAGE) -ljbig85 + + c2espC: c2espC.o c2espcommon.o + $(CC) $(CFLAGS) -o $@ c2espC.o c2espcommon.o $(LIBCUPSDRIVER) $(LIBCUPSIMAGE) -lz +@@ -242,8 +240,8 @@ c2espC: c2espC.o c2espcommon.o + command2esp: command2esp.o c2espcommon.o + $(CC) $(CFLAGS) -o $@ command2esp.o c2espcommon.o $(LIBCUPSDRIVER) + +-myopldecode: myopldecode.o $(LIBJBG) +- $(CC) $(CFLAGS) -o $@ $@.o $(LIBJBG) -lz ++myopldecode: myopldecode.o ++ $(CC) $(CFLAGS) -o $@ $@.o -ljbig -lz + + # + # Installation rules +@@ -395,11 +393,8 @@ clean: + # + # Header dependencies + # +-jbig.o: jbig.h +-jbig85.o: jbig85.h +-c2esp.o: jbig85.h c2espcommon.h ++c2esp.o: c2espcommon.h + c2espC.o: c2espcommon.h +-myopldecode.o: jbig.h + command2esp.o: c2espcommon.h + c2espcommon.o: c2espcommon.h + diff --git a/c2esp.spec b/c2esp.spec new file mode 100644 index 0000000..45d8606 --- /dev/null +++ b/c2esp.spec @@ -0,0 +1,71 @@ +%global version_no_dot 26 + +Name: c2esp +Version: 2.6 +Release: 1%{?dist} +Summary: CUPS driver for Kodak AiO printers + +Group: System Environment/Base +License: GPLv2+ +URL: http://sourceforge.net/projects/cupsdriverkodak/ +Source0: http://downloads.sourceforge.net/cupsdriverkodak/c2esp%{version_no_dot}.tar.gz + +Patch0: c2esp-jbig.patch +Patch1: c2esp-drv_only.patch + +# _cups_serverbin macro +BuildRequires: cups-devel + +# postscriptdriver tags +BuildRequires: python-cups cups + +# cupsfilters/image.h +BuildRequires: cups-filters-devel + +# JBIG1 lossless image compression +BuildRequires: jbigkit-devel + +Requires: cups-filesystem + +%description +CUPS filters and drivers for Kodak ESP and Hero all in one printers. + + +%prep +%setup -q -n c2esp%{version_no_dot} + +# remove bundled jbigkit source files +rm -f jbig* +%patch0 -p1 -b .jbig + +# remove all PPDs +rm -rf ppd/ +# install drv files instead of PPDs +%patch1 -p1 -b .drv_only + +%build +# Makefile is not ready for %%{?_smp_mflags} (config.h is a shared resource) +CFLAGS="%{optflags}" \ +make all + +%install +make install DESTDIR=%{buildroot} + +# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc +mkdir __doc +mv %{buildroot}%{_datadir}/doc/c2esp/* __doc +rm -rf %{buildroot}%{_datadir}/doc/c2esp + +# useless +rm -f %{buildroot}%{_bindir}/c2esplog + +%files +%doc __doc/COPYING __doc/README __doc/c2esp.txt +%{_cups_serverbin}/filter/c2esp +%{_cups_serverbin}/filter/c2espC +%{_cups_serverbin}/filter/command2esp +%{_datadir}/cups/drv/c2esp + +%changelog +* Thu May 09 2013 Jiri Popelka - 2.6-1 +- initial build diff --git a/sources b/sources index e69de29..124b71a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6da864afb429910b0b30dfad07686580 c2esp26.tar.gz