summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <didier@raboud.com>2010-05-23 00:04:42 +0200
committerDidier Raboud <didier@raboud.com>2010-05-23 00:04:42 +0200
commit5c357f2c54c02fe6c8f9e6095fcdce547206ed51 (patch)
treea3a70e88e2f9b88394956a4a3d5aef815b3fc900
parentd2c0cf34bcd17f14f0e77b1df81bc993da8254e8 (diff)
Imported Upstream version 3.0.2-20060530upstream/3.0.2-20060530
-rw-r--r--CVS/Entries17
-rwxr-xr-xChangeLog21
-rwxr-xr-xMakefile.in116
-rwxr-xr-xREADME5
-rwxr-xr-xUSAGE2
-rwxr-xr-xconfigure72
-rwxr-xr-xconfigure.ac40
-rwxr-xr-xfoomatic-gswrapper.in4
-rwxr-xr-xfoomatic-rip.1.in137
-rwxr-xr-xfoomatic-rip.in132
-rwxr-xr-xmakeMan.in49
11 files changed, 300 insertions, 295 deletions
diff --git a/CVS/Entries b/CVS/Entries
index e1955b0..1dea014 100644
--- a/CVS/Entries
+++ b/CVS/Entries
@@ -1,20 +1,19 @@
/COPYING/3.1/Mon Feb 3 16:35:19 2003//Tfoomatic-3_0-branch
-/ChangeLog/3.62.2.29/Fri Jan 6 21:52:33 2006//Tfoomatic-3_0-branch
-/Makefile.in/3.4.2.6/Tue Aug 16 02:19:30 2005//Tfoomatic-3_0-branch
-/README/3.9.2.7/Mon Nov 14 00:46:16 2005//Tfoomatic-3_0-branch
+/ChangeLog/3.62.2.30/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
+/Makefile.in/3.4.2.7/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
+/README/3.9.2.8/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
/STANDARD_installation/1.1.4.3/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
/TODO/3.1.2.2/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
-/USAGE/3.9.2.8/Mon Nov 14 00:46:16 2005//Tfoomatic-3_0-branch
+/USAGE/3.9.2.9/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
/acinclude.m4/3.0.2.2/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
/beh.in/1.1.2.3/Fri Jan 6 21:52:34 2006//Tfoomatic-3_0-branch
-/configure.ac/1.1.2.1/Fri Jan 6 18:32:15 2006//Tfoomatic-3_0-branch
+/configure.ac/1.1.2.2/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
/filter.conf/3.3.2.2/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
/foomatic-gswrapper.1.in/3.0.2.2/Thu Jan 22 03:42:35 2004//Tfoomatic-3_0-branch
-/foomatic-gswrapper.in/3.4.2.5/Tue Jul 19 22:59:13 2005//Tfoomatic-3_0-branch
-/foomatic-rip.1.in/3.6.2.2/Thu Jan 22 03:42:35 2004//Tfoomatic-3_0-branch
-/foomatic-rip.in/3.43.2.15/Tue Sep 13 01:27:31 2005//Tfoomatic-3_0-branch
+/foomatic-gswrapper.in/3.4.2.6/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
+/foomatic-rip.1.in/3.6.2.3/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
+/foomatic-rip.in/3.43.2.16/Thu May 18 06:01:29 2006//Tfoomatic-3_0-branch
/install-sh/3.0/Fri Oct 11 01:20:44 2002//Tfoomatic-3_0-branch
-/makeMan.in/3.3.2.2/Thu Jan 22 03:42:35 2004//Tfoomatic-3_0-branch
/make_configure/3.0.2.2/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
/mkinstalldirs/1.1.2.2/Thu Jan 22 02:47:21 2004//Tfoomatic-3_0-branch
D/debian////
diff --git a/ChangeLog b/ChangeLog
index 4556c1a..137c068 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2006-05-17 Norm Jacobs <Norm.Jacobs@Sun.COM>
+
+ * foomatic-rip-in: Add support for Solaris LP, made default echo,
+ fileconverter, and execpath setable through configure options.
+
+ * foomatic-gswrapper.in: made default execpath setable through configure
+ options
+
+ * foomatic-rip-1.in: fixed to use @sysconfdir@ for configure
+
+ * foomatic-gswrapper-1.in: fixed to use @sysconfdir@ for configure
+
+ * configure.in: made default execpath, fileconverter and echo setable
+ through configure options. Generate man pages through configure
+
+ * makeMan.in: removed, configure now generates the man pages
+
+ * Makefile.in: cleaned up some to work with makes other than gmake
+
+ * README, USAGE: added Solaris LP
+
2006-01-06 Till Kamppeter <till.kamppeter@gmx.net>
* beh.in: Fixed bug of N^2 copies being printed when N copies
diff --git a/Makefile.in b/Makefile.in
index f70d2ff..c57e4cf 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
# Makefile to install foomatic-filters
-# $Revision: 3.4.2.6 $
+# $Revision: 3.4.2.7 $
# PREFIX defaults to /usr/local for manually installed progs, so that they
# are not messed up on a system upgrade.
@@ -42,93 +42,70 @@ PPR_INTERFACES=@PPR_INTERFACES@
PPR_LIB=@PPR_LIB@
# This is mainly useful for building a binary foomatic package
-DESTDIR=
+#DESTDIR=
### Probably nothing to fiddle past here
# Files generated by the AC_OUTPUT call of "./configure"
-AC_OUTPUT_FILES:=Makefile makeMan foomatic-gswrapper \
- foomatic-rip beh
+AC_OUTPUT_FILES=Makefile foomatic-gswrapper foomatic-rip beh \
+ foomatic-gswrapper.1 foomatic-rip.1
# User programs and helper programs
-BINFILES:=foomatic-gswrapper foomatic-rip
-
-# Filters, only useful for admins
-SBINFILES:=
+BINFILES=foomatic-gswrapper foomatic-rip
# Masks for trash files which have to be removed before packaging Foomatic
-TRASHFILES:="*~" "*\#*" ".??*" "*.rej"
+TRASHFILES="*~" "*\#*" ".??*" "*.rej"
+
+$(BINFILES):
+ @echo "please run \"./configure\" to generate the bits"
+ exit 1
-all: build
+all: $(BINFILES)
# The install rule should check for kitloads and avoid stomping. It doesn't
install: install-main install-cups install-ppr
-install-main: install-bin install-man install-etc
-
-check-config:
- @if [ -f .testing-stamp ] ; then \
- echo 'Cowardly refusing to install inplace-built filters.' ;\
- echo 'Use "make inplace_clean; make" to get proper ones.' ;\
- exit 1 ;\
- fi
+install-main: install-bin install-man
-install-cups: check-config
+install-cups: install-bin
${SRC}/mkinstalldirs $(DESTDIR)$(CUPS_FILTERS)
${SRC}/mkinstalldirs $(DESTDIR)$(CUPS_BACKENDS)
ln -sf $(BINDIR)/foomatic-rip $(DESTDIR)$(CUPS_FILTERS)
${INSTALL} -m 755 beh $(DESTDIR)$(CUPS_BACKENDS)
-install-ppr: check-config
+install-ppr: install-bin
${SRC}/mkinstalldirs $(DESTDIR)$(PPR_INTERFACES)
${SRC}/mkinstalldirs $(DESTDIR)$(PPR_LIB)
ln -sf $(BINDIR)/foomatic-rip $(DESTDIR)$(PPR_INTERFACES)
ln -sf $(BINDIR)/foomatic-rip $(DESTDIR)$(PPR_LIB)
-install-bin: check-config
+install-bin: install-etc
${SRC}/mkinstalldirs $(DESTDIR)$(BINDIR)
- ${INSTALL} -m 755 $(BINFILES) $(DESTDIR)$(BINDIR)
-# ${INSTALL} -m 755 $(SBINFILES) $(DESTDIR)$(SBINDIR)
+ (for FILE in $(BINFILES) ; do \
+ ${INSTALL} -m 755 $$FILE $(DESTDIR)$(BINDIR) ; done)
-install-etc: check-config
+install-etc:
${SRC}/mkinstalldirs $(DESTDIR)$(ETCDIR)/direct
${INSTALL} -m 644 ${SRC}/filter.conf $(DESTDIR)$(ETCDIR)/filter.conf.sample
if [ ! -f $(DESTDIR)$(ETCDIR)/filter.conf ] ; then ${INSTALL} -m 644 ${SRC}/filter.conf $(DESTDIR)$(ETCDIR); fi;
-install-man: check-config
+install-man:
${SRC}/mkinstalldirs $(DESTDIR)$(MANDIR)
${SRC}/mkinstalldirs $(DESTDIR)$(MANDIR)/man1
-# ${SRC}/mkinstalldirs $(DESTDIR)$(MANDIR)/man8
- ${INSTALL} -m 644 *.1 $(DESTDIR)$(MANDIR)/man1
-# cp -f *.8 $(DESTDIR)$(MANDIR)/man8
-
-build: man
- chmod a+rx foomatic-rip foomatic-gswrapper beh
-
-man:
- chmod a+rx ./makeMan
- if [ "$(INPLACE)" = "--inplace" ]; then \
- FOOMATIC_RIP=`pwd`/foomatic-rip; \
- FOO_ETC=`pwd`/etc/foomatic; \
- PRINTCAP=@PRINTCAP@; \
- else \
- FOOMATIC_RIP=$(BINDIR)/foomatic-rip; \
- FOO_ETC=$(ETCDIR); \
- PRINTCAP=@PRINTCAP@; \
- fi; \
- export FOOMATIC_RIP FOO_ETC PRINTCAP; \
- ./makeMan ${SRC}/*[0-9].in
+ (for FILE in *.1 ; do \
+ ${INSTALL} -m 444 $$FILE $(DESTDIR)$(MANDIR)/man1 ; done)
# Clean up the source directory
-clean: remove-trash
+clean: remove-trash
rm -f .testing-stamp
- rm -f $(BINFILES:=.1) $(SBINFILES:=.8) test/*.out
+ rm -f test/*.out
-distclean: clean
+distclean: clean
rm -f $(AC_OUTPUT_FILES) config.log config.status config.cache configure.lineno
rm -rf autom*.cache confdefs.h
+ rm -f tests/Makefile
-maintainer-clean: distclean
+maintainer-clean: distclean
rm -f configure aclocal.m4
# Remove editor backup and temporary files
@@ -139,62 +116,45 @@ remove-trash:
# Uninstall an installed Foomatic
-uninstall: uninstall-cups uninstall-ppr uninstall-main
+uninstall: uninstall-cups uninstall-ppr uninstall-main
-uninstall-main: uninstall-bin uninstall-man
+uninstall-main: uninstall-bin uninstall-man
-uninstall-bin: check-config
+uninstall-bin:
( cd $(DESTDIR)$(BINDIR) && \
rm -f $(BINFILES) \
)
-# ( cd $(DESTDIR)$(SBINDIR) && \
-# rm -f $(SBINFILES) \
-# )
-uninstall-etc: check-config
+uninstall-etc:
rm -f $(DESTDIR)$(ETCDIR)/filter.conf
rm -f $(DESTDIR)$(ETCDIR)/filter.conf.sample
rmdir $(DESTDIR)$(ETCDIR)/direct || :
rmdir $(DESTDIR)$(ETCDIR) || :
-uninstall-cups: check-config
+uninstall-cups:
rm -f $(DESTDIR)$(CUPS_FILTERS)/foomatic-rip
rm -f $(DESTDIR)$(CUPS_BACKENDS)/beh
rmdir $(DESTDIR)$(CUPS_FILTERS) || :
rmdir $(DESTDIR)$(CUPS_BACKENDS) || :
rmdir $(DESTDIR)$(CUPS) || :
-uninstall-ppr: check-config
+uninstall-ppr:
rm -f $(DESTDIR)$(PPR_INTERFACES)/foomatic-rip
rmdir $(DESTDIR)$(PPR_INTERFACES) || :
rm -f $(DESTDIR)$(PPR_LIB)/foomatic-rip
rmdir $(DESTDIR)$(PPR_LIB) || :
rmdir $(DESTDIR)$(PPR) || :
-uninstall-man: check-config
+uninstall-man: check-config
for m in $(BINFILES); do \
rm -f $(DESTDIR)$(MANDIR)/man1/$$m.*; \
done
-# for m in $(SBINFILES); do \
-# rm -f $(DESTDIR)$(MANDIR)/man8/$$m.*; \
-# done
# Various testing/debugging/etc targets
-inplace: testing
-testing: INPLACE = --inplace
-testing: build
- touch .testing-stamp
-
-inplace-clean: testing_clean
-testing-clean: clean
-
-# We need to export all Variables for makeDefaults and the scripts target to
-# work.
-.EXPORT_ALL_VARIABLES:
-
-# Use INPLACE=--inplace to get the special run-in-place Defaults.
+inplace: all
+ chmod a+rx $(BINFILES)
-.PHONY: all check-config build install install-bin \
- man inplace testing clean inplace-clean testing-clean distclean \
- maintainer-clean
+testing tests: inplace
+ cd tests ; $(MAKE)
+.PHONY: all install install-bin clean distclean maintainer-clean tests inplace
diff --git a/README b/README
index c7af835..c0aca18 100755
--- a/README
+++ b/README
@@ -61,6 +61,7 @@ Supported spoolers
------------------
CUPS - Common Unix Printing System (http://www.cups.org/)
+SOLARIS - Solaris LP (lpsched)
LPD - Line Printer Daemon (Does this have a home page anywhere?)
LPRng - LPR - New Generation (http://www.lprng.org/)
GNUlpr - An enhanced LPD (http://sf.net/projects/lpr, development stopped)
@@ -111,8 +112,8 @@ install-sh
foomatic-rip
Universal print filter (PostScript -> printer's native language) to be
- used with all known printer spoolers (CUPS, LPRng, LPD, GNUlpr, PPR,
- PDQ, CPS, spooler-less printing). It Gets printer/driver capability
+ used with all known printer spoolers (CUPS, Solaris LP, LPRng, LPD, GNUlpr,
+ PPR, PDQ, CPS, spooler-less printing). It Gets printer/driver capability
information from PPD files. The PPD files can either be generated from
the Foomatic database or they can be manufacturer-supplied PPD files
for PostScript printers.
diff --git a/USAGE b/USAGE
index 1ff1857..dd3ede4 100755
--- a/USAGE
+++ b/USAGE
@@ -55,7 +55,7 @@ Widely used databases were the RHS-Printfilters and the APS
filters. Their disadvantages were that they only supported one spooler
(LPD/LPRng) and only a small part of the driver's options (mostly page
size and resolution). Foomatic supports all options of the drivers and
-all known spoolers (LPD, LPRng, GNUlpr, CUPS, PPR, PDQ, CPS, direct
+all known spoolers (LPD, LPRng, GNUlpr, CUPS, Solaris LP, PPR, PDQ, CPS, direct
spooler-less printing). In addition, all known free software printer
drivers are supported. Foomatic also supports printing of various
non-PostScript file types for spoolers which do not support this by
diff --git a/configure b/configure
index a8d9598..e80afb2 100755
--- a/configure
+++ b/configure
@@ -767,6 +767,16 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-file-converter-check check whether a file converter is installed default=yes
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-file-converter=a2ps|enscript|mpage
+ Default: auto
+ --with-echo=(path to GNU compatible echo command)
+ Default: echo
+ --with-execpath=(path to various filters)
+ Default: ${prefix}/bin:/usr/local/bin:/usr/bin:/bin
+
_ACEOF
fi
@@ -1757,13 +1767,49 @@ echo "${ECHO_T}no" >&6
fi
+
+# Check whether --with-file-converter or --without-file-converter was given.
+if test "${with_file_converter+set}" = set; then
+ withval="$with_file_converter"
+ FILECONVERTER="$withval"
+else
+ FILECONVERTER=""
+fi;
+echo "$as_me:$LINENO: result: file-converter: $FILECONVERTER" >&5
+echo "${ECHO_T}file-converter: $FILECONVERTER" >&6
+
+
if test "${NOCONVERTERCHECK}" = "" -a "${A2PS}" = "" -a "${ENSCRIPT}" = "" -a "${MPAGE}" = "" -a "${TEXTTOPS}" = "" ; then
{ { echo "$as_me:$LINENO: error: cannot find a2ps, enscript, mpage, or CUPS' texttops. You need to have at least one installed" >&5
echo "$as_me: error: cannot find a2ps, enscript, mpage, or CUPS' texttops. You need to have at least one installed" >&2;}
{ (exit 1); exit 1; }; };
fi
-ac_config_files="$ac_config_files Makefile makeMan foomatic-gswrapper foomatic-rip beh"
+
+# Check whether --with-echo or --without-echo was given.
+if test "${with_echo+set}" = set; then
+ withval="$with_echo"
+ ECHO="$withval"
+else
+ ECHO="echo"
+fi;
+echo "$as_me:$LINENO: result: GNU Compatible Echo: $ECHO" >&5
+echo "${ECHO_T}GNU Compatible Echo: $ECHO" >&6
+
+
+
+# Check whether --with-execpath or --without-execpath was given.
+if test "${with_execpath+set}" = set; then
+ withval="$with_execpath"
+ EXECPATH="$withval"
+else
+ EXECPATH="${prefix}/bin:/usr/local/bin:/usr/bin:/bin"
+fi;
+echo "$as_me:$LINENO: result: Execpath: $EXECPATH" >&5
+echo "${ECHO_T}Execpath: $EXECPATH" >&6
+
+
+ac_config_files="$ac_config_files Makefile beh foomatic-rip foomatic-gswrapper foomatic-rip.1 foomatic-gswrapper.1"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -2262,10 +2308,11 @@ do
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "makeMan" ) CONFIG_FILES="$CONFIG_FILES makeMan" ;;
- "foomatic-gswrapper" ) CONFIG_FILES="$CONFIG_FILES foomatic-gswrapper" ;;
- "foomatic-rip" ) CONFIG_FILES="$CONFIG_FILES foomatic-rip" ;;
"beh" ) CONFIG_FILES="$CONFIG_FILES beh" ;;
+ "foomatic-rip" ) CONFIG_FILES="$CONFIG_FILES foomatic-rip" ;;
+ "foomatic-gswrapper" ) CONFIG_FILES="$CONFIG_FILES foomatic-gswrapper" ;;
+ "foomatic-rip.1" ) CONFIG_FILES="$CONFIG_FILES foomatic-rip.1" ;;
+ "foomatic-gswrapper.1" ) CONFIG_FILES="$CONFIG_FILES foomatic-gswrapper.1" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
@@ -2363,6 +2410,9 @@ s,@A2PS@,$A2PS,;t t
s,@ENSCRIPT@,$ENSCRIPT,;t t
s,@MPAGE@,$MPAGE,;t t
s,@TEXTTOPS@,$TEXTTOPS,;t t
+s,@FILECONVERTER@,$FILECONVERTER,;t t
+s,@ECHO@,$ECHO,;t t
+s,@EXECPATH@,$EXECPATH,;t t
CEOF
_ACEOF
@@ -2591,6 +2641,14 @@ if test "$no_create" != yes; then
fi
-echo "Finished configuring."
-echo "Type 'make' to build the package"
-echo "then 'make install' to install it."
+cat <<EOF
+Finished configuring.
+Type 'make' to build the package
+Type 'make install' to install the base foomatic bits and links appropriate for
+ CUPS and PPR to use foomatic
+Type 'make install-main' to install the base foomatic bits.
+Type 'make install-{cups|ppr}' to install the base foomatic bits and links
+ appropriate for CUPS or PPR to use foomatic
+Type 'make tests' to run some basic sanity tests (in place)
+EOF
+
diff --git a/configure.ac b/configure.ac
index d28b8fc..a9ce275 100755
--- a/configure.ac
+++ b/configure.ac
@@ -67,14 +67,44 @@ AC_PATH_PROG(ENSCRIPT,enscript)
AC_PATH_PROG(MPAGE,mpage)
AC_PATH_PROG(TEXTTOPS,texttops,,$CUPS_FILTERS)
+AC_ARG_WITH(file-converter,[ --with-file-converter=[a2ps|enscript|mpage]
+ Default: auto],
+ FILECONVERTER="$withval",
+ FILECONVERTER="")
+AC_MSG_RESULT([file-converter: $FILECONVERTER])
+AC_SUBST(FILECONVERTER)
+
if test "${NOCONVERTERCHECK}" = "" -a "${A2PS}" = "" -a "${ENSCRIPT}" = "" -a "${MPAGE}" = "" -a "${TEXTTOPS}" = "" ; then
AC_MSG_ERROR([cannot find a2ps, enscript, mpage, or CUPS' texttops. You need to have at least one installed]);
fi
-dnl AC_OUTPUT(Makefile src/Makefile)
-AC_OUTPUT(Makefile makeMan foomatic-gswrapper foomatic-rip beh)
+AC_ARG_WITH(echo,[ --with-echo=(path to GNU compatible echo command)
+ Default: echo],
+ ECHO="$withval",
+ ECHO="echo")
+AC_MSG_RESULT([GNU Compatible Echo: $ECHO])
+AC_SUBST(ECHO)
+
+AC_ARG_WITH(execpath,[ --with-execpath=(path to various filters)
+ Default: ${prefix}/bin:/usr/local/bin:/usr/bin:/bin],
+ EXECPATH="$withval",
+ EXECPATH="${prefix}/bin:/usr/local/bin:/usr/bin:/bin")
+AC_MSG_RESULT([Execpath: $EXECPATH])
+AC_SUBST(EXECPATH)
+
+AC_OUTPUT(Makefile beh \
+ foomatic-rip foomatic-gswrapper \
+ foomatic-rip.1 foomatic-gswrapper.1)
dnl Finished
-echo "Finished configuring."
-echo "Type 'make' to build the package"
-echo "then 'make install' to install it."
+cat <<EOF
+Finished configuring.
+Type 'make' to build the package
+Type 'make install' to install the base foomatic bits and links appropriate for
+ CUPS and PPR to use foomatic
+Type 'make install-main' to install the base foomatic bits.
+Type 'make install-{cups|ppr}' to install the base foomatic bits and links
+ appropriate for CUPS or PPR to use foomatic
+Type 'make tests' to run some basic sanity tests (in place)
+EOF
+
diff --git a/foomatic-gswrapper.in b/foomatic-gswrapper.in
index 1973013..8d1c0e3 100755
--- a/foomatic-gswrapper.in
+++ b/foomatic-gswrapper.in
@@ -1,6 +1,6 @@
#!@PERL@
# -*- perl -*-
-# $Revision: 3.4.2.5 $
+# $Revision: 3.4.2.6 $
# This is a little Ghostscript regularization script. It massages
# arguments to make Ghostscript execute properly as a filter, with
@@ -20,7 +20,7 @@ my $configpath = "@sysconfdir@/foomatic";
# Set GhostScript path
my $gspath = "gs";
$gspath = $conf{gspath} if defined(%conf) and defined $conf{gspath};
-my $execpath = "@prefix@/bin:/usr/local/bin:/usr/bin:/bin";
+my $execpath = "@EXECPATH@";
# Get execution path from config file
$execpath = $conf{execpath} if defined(%conf) and defined $conf{execpath};
$ENV{'PATH'} = $execpath;
diff --git a/foomatic-rip.1.in b/foomatic-rip.1.in
index 6957cd8..0782314 100755
--- a/foomatic-rip.1.in
+++ b/foomatic-rip.1.in
@@ -1,129 +1,4 @@
.\" This -*- nroff -*- source file is part of foomatic.
-.\"
-.
-.\" --------------------------------------------------------------------
-.\" Setup - Macros stolen fro "roff" man page
-.\" --------------------------------------------------------------------
-.
-.mso www.tmac
-.
-.if n \{\
-. mso tty-char.tmac
-. ftr CR R
-. ftr CI I
-. ftr CB B
-.\}
-.
-.if '\*[.T]'dvi' \{\
-. ftr CB CW
-.\}
-.
-.
-.\" --------------------------------------------------------------------
-.\" String definitions
-.
-.\" Final `\""' comments are used to make Emacs happy, sic \""
-.
-.\" The `-' sign for options.
-.ie t \{\
-. ds @- \-\"
-. ds @-- \-\-\"
-.\}
-.el \{\
-. ds @- -\"
-. ds @-- --\"
-.\}
-.
-.ds Comment \.\[rs]\[dq]\"
-.ds Ellipsis \.\|.\|.\&\"
-.
-.
-.\" --------------------------------------------------------------------
-.\" Begin of macro definitions
-.
-.de c
-.\" this is like a comment request when escape mechanism is off
-..
-.
-.eo
-.
-.c ---------------------------------------------------------------------
-.
-.de Text
-. nop \)\$*
-..
-.
-.de CodeSkip
-. ie t \
-. sp 0.2v
-. el \
-. sp
-..
-.
-.de Esc
-. ds @1 \$1\"
-. shift
-. Text \f[B]\[rs]\*[@1]\f[]\$*
-. rm @1
-..
-.
-.de QuotedChar
-. ds @1 \$1
-. shift
-. nop `\f[B]\*[@1]\f[]'\$*
-. rm @1
-..
-.
-.c --------------------------------------------------------------------
-.
-.c a shell command line
-.de ShellCommand
-. br
-. ad l
-. nh
-. Text \f[I]sh#\h'1m'\f[]\f[CR]\$*\f[]\&\"
-. ft R
-. ft P
-. hy
-. ad
-..
-.
-.c --------------------------------------------------------------------
-.
-.c ShortOpt ([c [punct]])
-.c
-.c `-c' somewhere in the text.
-.c The second argument is some trailing punctuation.
-.c
-.de ShortOpt
-. ds @1 \$1\"
-. shift
-. nh
-. Text \f[CB]\*[@-]\f[]\f[B]\*[@1]\f[]\/\$*
-. hy
-. rm @1
-..
-.
-.de TP+
-. br
-. ns
-. TP \$1
-..
-.
-.c --------------------------------------------------------------------
-.
-.c Topic
-.c
-.de Topic
-. TP 2m
-. Text \[bu]
-..
-.
-.ec
-.\" End of macro definitions
-.
-.
-
.hy 0
.TH FOOMATIC-RIP 1 "2002-11-26" "Foomatic Project"
@@ -264,7 +139,7 @@ The file(s) to be printed.
.P
\fBfoomatic-rip\fR will print from standard input unless a file to
print is specified on the command line.
-If your printer PPD file is stored as \fI@@$ENV{'FOO_ETC'}@@/direct/<printer>.ppd\fR
+If your printer PPD file is stored as \fI@sysconfdir@/direct/<printer>.ppd\fR
or \fI~/.foomatic/direct/<printer>.ppd\fR you can use it by simply specifying "-P \fI<printer>\fR".
Put a line
@@ -327,15 +202,15 @@ http://www.linuxprinting.org
.SH FILES
.PD 0
.TP 0
-@@$ENV{'FOO_ETC'}@@/cups/<printer>.ppd
+@sysconfdir@/cups/<printer>.ppd
.TP 0
-@@$ENV{'FOO_ETC'}@@/lpd/<printer>.ppd
+@sysconfdir@/lpd/<printer>.ppd
.TP 0
-@@$ENV{'FOO_ETC'}@@/ppr/<printer>.ppd
+@sysconfdir@/ppr/<printer>.ppd
.TP 0
-@@$ENV{'FOO_ETC'}@@/pdq/<printer>.ppd
+@sysconfdir@/pdq/<printer>.ppd
.TP 8
-@@$ENV{'FOO_ETC'}@@/direct/<printer>.ppd
+@sysconfdir@/direct/<printer>.ppd
The PPD files of the currently defined printers
.PD 0
diff --git a/foomatic-rip.in b/foomatic-rip.in
index 8c72927..70c6a31 100755
--- a/foomatic-rip.in
+++ b/foomatic-rip.in
@@ -5,7 +5,7 @@ use strict;
use POSIX;
use Cwd;
-my $ripversion='$Revision: 3.43.2.15 $';
+my $ripversion='$Revision: 3.43.2.16 $';
#'# Fix emacs syntax highlighting
# foomatic-rip is a spooler-independent filter script which takes
@@ -44,7 +44,7 @@ my $ripversion='$Revision: 3.43.2.15 $';
# possibly other stuff. The default path is often fine on Linux, but
# may not be on other systems.
#
-my $execpath = "@prefix@/bin:/usr/local/bin:/usr/bin:/bin";
+my $execpath = "@EXECPATH@";
# CUPS raster drivers are searched here
my $cupsfilterpath = "@prefix@/lib/cups/filter:/usr/local/lib/cups/filter:/usr/local/libexec/cups/filter:/opt/cups/filter:/usr/lib/cups/filter";
@@ -71,7 +71,7 @@ my $accounting_prolog = "";
# the first one.
# You can set this to "a2ps", "enscript" or "mpage" to select one of the
# default command strings.
-my $fileconverter = "";
+my $fileconverter = "@FILECONVERTER@";
my($kid0,$kid1,$kid2,$kid3,$kid4);
my($kidfailed,$kid3finished,$kid4finished);
@@ -83,7 +83,7 @@ my($jobhasjcl);
# and regular echo work fine; non-GNU platforms may need to install
# gnu echo and put gecho here or something.
#
-my $myecho = 'echo';
+my $myecho = '@ECHO@';
# Set debug to 1 to enable the debug logfile for this filter; it will
# appear as defined by $logfile. It will contain status from this
@@ -181,6 +181,7 @@ my $ESPIPE = 29; # the errno value when seeking a pipe or socket
# are currently:
# cups - CUPS - Common Unix Printing System
+# solaris - Solaris LP (possibly some other SysV LP services as well)
# lpd - LPD - Line Printer Daemon
# lprng - LPRng - LPR - New Generation
# gnulpr - GNUlpr, an enhanced LPD (development stopped)
@@ -224,9 +225,16 @@ my $copies = "1";
# Post pipe (command into which the output of this filter should be piped)
my $postpipe = "";
+# job meta-data file path (for Solaris LP)
+my $attrpath = '';
+
# Files to be printed
my @filelist = ();
+# Where to send debugging log output. Initialized to STDERR until the command
+# line arguments are parsed.
+my $logh = *STDERR;
+
# JCL prefix to put before the JCL options (Can be modified by a
# "*JCLBegin:" keyword in the PPD file):
my $jclbegin = "\033%-12345X\@PJL\n";
@@ -303,17 +311,32 @@ if (defined $conf{textfilter}) {
## Environment variables;
-# "PPD": PPD file name for CUPS or PPR (if we run as PPR RIP)
+# "PPD": PPD file name for CUPS, Solaris, or PPR (if we run as PPR RIP)
if (defined($ENV{'PPD'})) {
# Clean the file name from weird characters which could cause
# unexpected behaviour
$ppdfile = removespecialchars($ENV{'PPD'});
- # CUPS and PPR (RIP filter) use the "PPD" environment variable to
- # make the PPD file name available (we set CUPS here preliminarily,
- # in the next step we check for PPR)
+ # CUPS, Solaris LP, and PPR (RIP filter) use the "PPD" environment variable
+ # to make the PPD file name available (we set CUPS here preliminarily,
+ # in the next step we check for Solaris LP and the PPR)
$spooler = 'cups';
}
+# "SPOOLER_KEY": Solaris LP print service
+if (defined($ENV{'SPOOLER_KEY'})) {
+ $spooler = 'solaris';
+
+ $ppdfile = $ENV{'PPD'};
+ # set the printer name from the PPD file name
+ ($ppdfile =~ m!^.*/([^/]+)\.ppd$!) &&
+ ($printer = $1);
+
+ # Solaris LP may augment the "options" string argument from the command
+ # line with an attributes file ($ATTRPATH)
+ (defined($attrpath = $ENV{'ATTRPATH'})) &&
+ ($optstr = read_attribute_file($attrpath));
+}
+
# "PPR_VERSION": PPR
if (defined($ENV{'PPR_VERSION'})) {
# We have PPR
@@ -380,9 +403,6 @@ my $show_docs = ($argstr =~ s/\x01-d\x01/\x01/);
my $do_docs;
my $cupscolorprofile;
-# Where to send debugging log output to
-my $logh;
-
if ($debug) {
# Grotesquely unsecure; use for debugging only
open LOG, "> ${logfile}.log";
@@ -730,6 +750,21 @@ if ($spooler eq 'cups') {
}
}
+# Solaris LP spooler
+if ($spooler eq 'solaris') {
+ # Get all command line parameters
+ # $printer = # argv[0]
+ # ($rargs[0] =~ m!^.*/([^/]+)$!);
+ # $request_id = removeshellescapes($rargs[0]); # argv[1]
+ # $user_name = removeshellescapes($rargs[1]); # argv[2]
+ $jobtitle = removeshellescapes($rargs[2]); # argv[3]
+ # $copies = removeshellescapes($rargs[3]); # argv[4] # handled by the
+ # interface script
+ $optstr .= removeshellescapes($rargs[4]); # argv[5]
+ ($#rargs > 4) && # argv[6...]
+ (@filelist = @rargs[5, $#rargs]);
+}
+
# LPD/LPRng/GNUlpr
if (($spooler eq 'lpd') ||
($spooler eq 'lprng' and !$ppdfile) ||
@@ -1700,6 +1735,7 @@ print $logh "-----------------${added_lf}\n";
print $logh "Spooler: $spooler\n";
print $logh "Printer: $printer\n";
print $logh "PPD file: $ppdfile\n";
+print $logh "ATTR file: $attrpath\n";
print $logh "Printer model: $model\n";
# Print the options string only in debug mode, Mac OS X adds very many
# options so that CUPS cannot handle the output of the option string
@@ -1795,6 +1831,11 @@ for (@opts) {
$optionset = 'userval';
}
+ # Solaris options that have no reason to be
+ if (/^nobanner$/ || /^dest=.+$/ || /^protocol=.+$/) {
+ next;
+ }
+
my $arg;
if ((m!([^=]+)=\'?(.*)\'?!) || (m!([^=:]+):\'?(.*)\'?!)) {
my ($aname, $avalue) = ($1, $2);
@@ -6379,6 +6420,75 @@ sub buildpdqdriver {
}
+#
+# Convert lp or ipp based attribute names (and values) to something that matches# PPD file options.
+#
+sub option_to_ppd {
+ my ($ipp_attribute) = @_;
+ my ($key, $value, $result) = ();
+
+ if (/([^=]+)=[\'\"]?(.*}[\'\"]?)/) { # key=value
+ ($key, $value) = ($1, $2);
+ } elsif (/no(.+)/) { # BOOLEAN: no{key} (false)
+ ($key, $value) = ($1, 'false');
+ } else { # BOOLEAN: {key} (true)
+ ($key, $value) = ($1, 'true');
+ }
+
+ if (($key =~ /^job-/) || ($key =~ /^copies/) ||
+ ($key =~ /^multiple-document-handling/) || ($key =~ /^number-up/) ||
+ ($key =~ /^orientation-requested/) ||
+ ($key =~ /^dest/) || ($key =~ /^protocol/) || ($key =~ /^banner/) ||
+ ($key =~ /^page-ranges/)) {
+ # Ignored:
+ # job-*, multiple-document-handling are not supported by this
+ # filter
+ # dest, protocol, banner, number-up, orientation-requested are
+ # handled by the LP filtering or interface script
+ # NOTE - page-ranges should probably be handled here, but
+ # ignore it until we decide how to handle it.
+ } elsif (/^printer-resolution/) {
+ # value match on "123, 457" or on "123, 457, 8"
+ if (/([\d]+),([\s]*)([\d]+)((,([\s]*)([\d]+))??)/) {
+ $result = '$1x$2$3 '; # (width)x(height)(units)
+ }
+ } elsif (/^print-quality/) {
+ ($value == 3) &&
+ ($result = 'PrintoutMode=Draft');
+ ($value == 4) &&
+ ($result = 'PrintoutMode=Normal');
+ ($value == 5) &&
+ ($result = 'PrintoutMode=High');
+ } else {
+ # NOTE - if key == 'media', we may need to convert the values at some
+ # point. (see RFC2911, Section 14 for values)
+ $result = '$key=\"$value\"';
+ }
+
+ return ($result);
+}
+
+#
+# Read the attributes file containing the various job meta-data, including
+# requested capabilities
+#
+sub read_attribute_file {
+ my ($file) = @_;
+ my $result = "";
+
+ open (AFP, "<$file") ||
+ (rip_die("Unable to open IPP Attribute file ".$file,
+ $EXIT_PRNERR_NORETRY_BAD_SETTINGS));
+
+ while(<AFP>) {
+ $result .= option_to_ppd($_);
+ }
+
+ close (AFP);
+
+ return ($result);
+}
+
# Emacs tabulator/indentation
diff --git a/makeMan.in b/makeMan.in
deleted file mode 100755
index 310b8e0..0000000
--- a/makeMan.in
+++ /dev/null
@@ -1,49 +0,0 @@
-#!@PERL@ -w
-#
-# Generates manpages from manpage.in files by substituting @...@ tags.
-#
-
-use Getopt::Std;
-
-my (%opt,@files);
-getopts( 'v', \%opt);
-my $VERBOSE = defined $opt{v} ? $opt{v} : 0;
-
-if (@ARGV)
-{
- @files = @ARGV;
-}
-else
-{
- opendir CWD, "." or die "Ooops! Can't read current dir!";
- @files = readdir CWD;
- closedir CWD;
-}
-
-my $append;
-FILE:
-foreach my $file (@files)
-{
- print STDERR "Checking file `$file' ... " if $VERBOSE;
- $append = "discard\n";
- next unless -f $file and $file =~ /^(.*\.[1-9])\.in$/;
- my ($man) = $1;
- $man =~ s,.*/,,;
- next unless ((`file $file` =~ m/\b[ntg]roff\b/) or
- (`file $file` =~ m/\[nt\]roff/));
- print STDERR "MATCHED\n" if $VERBOSE;
- $append = '';
- open IN, "<$file" or (warn "Can't read input file $file!" and next FILE);
- unlink $man;
- open OUT, ">$man" or (warn "Can't write output file $man!" and next FILE);
- while (<IN>)
- {
- s/@@([^@]*)@@/eval $1/ge;
- print OUT;
- }
- close IN;
-}
-continue
-{
- print STDERR $append if $VERBOSE;
-}