initial build
This commit is contained in:
parent
5a7c17315a
commit
7255734adf
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/c2esp26.tar.gz
|
||||
34
c2esp-drv_only.patch
Normal file
34
c2esp-drv_only.patch
Normal file
@ -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:
|
||||
#
|
||||
47
c2esp-jbig.patch
Normal file
47
c2esp-jbig.patch
Normal file
@ -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
|
||||
|
||||
71
c2esp.spec
Normal file
71
c2esp.spec
Normal file
@ -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 <jpopelka@redhat.com> - 2.6-1
|
||||
- initial build
|
||||
Loading…
Reference in New Issue
Block a user