diff options
author | Chris Severance | 2024-01-16 05:08:30 -0500 |
---|---|---|
committer | Chris Severance | 2024-01-16 05:08:30 -0500 |
commit | 38248ace354b769d6aff5cab5b092224b89071b2 (patch) | |
tree | 929fdad44846511ca92d8c746f8d09dd62453d79 | |
parent | 44160860d7d38faf0ce1cb8e99dfb52ed8d349fc (diff) | |
download | aur-lprng.tar.gz |
autu: Update to 3.9.0-1
-rw-r--r-- | .SRCINFO | 61 | ||||
-rw-r--r-- | 0000-lprng-help-website.patch | 349 | ||||
-rw-r--r-- | 0001-hardlink-to-symlink-binaries.patch | 36 | ||||
-rw-r--r-- | 0002-openssl_1.1.patch | 46 | ||||
-rw-r--r-- | 0003-lpc-lpq-lprm-suffix.manual.patch | 19 | ||||
-rw-r--r-- | PKGBUILD | 251 | ||||
-rwxr-xr-x | foofilter | 61 | ||||
-rwxr-xr-x | gsfilter | 63 | ||||
-rw-r--r-- | lpd.service | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | lprng.install | 49 | ||||
-rwxr-xr-x | psfilter | 96 |
11 files changed, 825 insertions, 210 deletions
@@ -1,21 +1,33 @@ pkgbase = lprng - pkgdesc = An Enhanced Printer Spooler - pkgver = 3.8.C - pkgrel = 10 - url = http://www.lprng.com + pkgdesc = an enhanced, extended, and portable implementation of the Berkeley LPR lpd print spooler + pkgver = 3.9.0 + pkgrel = 1 + url = https://lprng.sourceforge.net install = lprng.install arch = i686 arch = x86_64 + arch = armv6h license = custom:Artistic - depends = openssl + depends = glibc depends = bash - optdepends = poppler: pdf to ps conversion in filters - optdepends = enscript: text to ps conversion in filters - optdepends = ghostscript: convert ps to device language - optdepends = foomatic-filters-lprng: foomatic-rip + depends = file + depends = grep + depends = sed + optdepends = poppler: pdf to ps conversion in filters (gsfilter) + optdepends = ghostscript: convert ps to device language in filters (gsfilter) + optdepends = enscript: text to ps conversion in filters (gsfilter,psfilter) + optdepends = foomatic-filters-lprng: foomatic-rip in filters (foofilter) optdepends = hplip: drivers for HP printers + optdepends = ifhp: filters for many printers conflicts = cups - source = http://sourceforge.net/projects/lprng/files/lprng/lprng-3.8.C.tar.gz + options = !strip + backup = etc/lprng/lpd/lpd.conf + backup = etc/lprng/lpd/lpd.perms + backup = etc/lprng/printcap + source = http://sourceforge.net/projects/lprng/files/lprng/lprng-3.9.0.tar.gz + source = 0001-hardlink-to-symlink-binaries.patch + source = 0002-openssl_1.1.patch + source = 0003-lpc-lpq-lprm-suffix.manual.patch source = lpd.service source = gsfilter source = psfilter @@ -25,18 +37,31 @@ pkgbase = lprng source = README source = lpd.conf source = lpd.perms - source = lprng.install - md5sums = 5901bed95e61d2bea3ba3056056af432 - md5sums = 990745083e4f627a714569dc20816b0a - md5sums = ac43a39395da12fb039a25b71d57e6ea - md5sums = 58a4bf1a740b67fea83f7f68336f20e7 - md5sums = 58afc1a1ec8d67a1aa2bdd64788d5213 + md5sums = 10f4ec823df0e021404284037138aa8a + md5sums = 08fbfe9aac9aebdd88f71afc557b5e68 + md5sums = c8f1ae4eefe6b82d9097f095ab1557c8 + md5sums = 06db650ad6f5704e7a177bae23500977 + md5sums = a59c448b0e37db80422175b7a1a2c304 + md5sums = ce6f32b57a8e650f610523a6afaaf659 + md5sums = d6c523f275bb63f68bf17d5ca02e4814 + md5sums = 1fa86ca79140bed23d59a552ac2d39b2 md5sums = 496dfbb160f2a0308b7847541b03c8db md5sums = 422ad79bda6ae9d2990fdef55240e569 md5sums = 1768d2f81d6d14c22686293ca60528c1 md5sums = 3ef9f91dc0de273da1f5f1b20d49cd17 md5sums = 3f861c75c2d68c0e45b4095ab39ba1c8 - md5sums = 0f21b173ae0f16d225b4519e0f3238ff + sha256sums = c92597671f4c7cbe8bb3f38fbc4283354db84c6abff1efb675fa2e120421915d + sha256sums = 96828bce13d6548a02e1d9849e713c950312b5c38c2282f2c5cfc5be454c6784 + sha256sums = 269d2fdd0bbef11aa933cd4d49c06a44ce227badeec2530f199b185c7bd7f4f7 + sha256sums = d071adace21df32507d69c908851dc94511f404ecea4095bcdbb7d8504d97241 + sha256sums = 3b546e8dd8f7ef3a1025d7d59ed8187fa21a9b9cf839a9bbda9821733da046e1 + sha256sums = c6a696dea62f7ffdade6a3071d201d076ee81e4aa14283dd4072578665e5eb7a + sha256sums = f1a8a318f210cfc3814d234cb98a3de0c7a161c0e0c5671fe1c266ee03e351ec + sha256sums = ce83b23dd188876b0b66de70f8b13d12036ba2ec1b837212bce6a172308904d4 + sha256sums = be383447b74cf9b86666adeaf35f844b394c222abbcda7f5cd7fc64f79373b82 + sha256sums = fc94245b58b23c9498a10c64aed20b6120595c6c3e1412bb419126ca78123a94 + sha256sums = a4c261f5754b380ff85c454249a152cb67baf9bbf10dc95cd16026f90bacb620 + sha256sums = faf52cf982eaa66a475344a5647a80a761d10402ccb9de263c70dc15ccc85c29 + sha256sums = 47b48ab7fa15ae9226463c98d6c8fce9ee9b602c3a9f96907fcd84e50902b2cc pkgname = lprng - diff --git a/0000-lprng-help-website.patch b/0000-lprng-help-website.patch new file mode 100644 index 000000000000..62e73ef71095 --- /dev/null +++ b/0000-lprng-help-website.patch @@ -0,0 +1,349 @@ +diff -pNaru5 a/man/checkpc.n b/man/checkpc.n +--- a/man/checkpc.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/checkpc.n 2024-01-14 06:59:41.414515087 -0500 +@@ -115,17 +115,8 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lpbanner.n b/man/lpbanner.n +--- a/man/lpbanner.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpbanner.n 2024-01-14 06:59:41.414515087 -0500 +@@ -89,17 +89,8 @@ pr(1), lprng_certs(1), lprng_index_certs + .SH "AUTHOR" + Patrick Powell <papowell@lprng.com>. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lpc.n b/man/lpc.n +--- a/man/lpc.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpc.n 2024-01-14 06:59:41.414515087 -0500 +@@ -435,11 +435,9 @@ The debugging information will + help you to pinpoint the exact cause of failure. + .fi + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng mailing list is lprng@lprng.com; +-subscribe by sending mail to lprng-request@lprng.com with +-the word subscribe in the body. +-The software is available from ftp://ftp.lprng.com/pub/LPRng. ++The software is available from ++.B http://www.lprng.com/ + .SH "AUTHOR" + Patrick Powell <papowell@lprng.com>. +diff -pNaru5 a/man/lpd.conf.n b/man/lpd.conf.n +--- a/man/lpd.conf.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpd.conf.n 2024-01-14 06:59:41.414515087 -0500 +@@ -743,11 +743,9 @@ The debugging information will + help you to pinpoint the exact cause of failure. + .fi + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng mailing list is lprng@lprng.com; +-subscribe by sending mail to lprng-request@lprng.com with +-the word subscribe in the body. +-The software is available from ftp://ftp.lprng.com/pub/LPRng. ++The software is available from ++.B http://www.lprng.com/ + .SH "AUTHOR" + Patrick Powell <papowell@lprng.com>. +diff -pNaru5 a/man/lpd.n b/man/lpd.n +--- a/man/lpd.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpd.n 2024-01-14 06:59:41.417848423 -0500 +@@ -1862,17 +1862,8 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lpd.perms.n b/man/lpd.perms.n +--- a/man/lpd.perms.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpd.perms.n 2024-01-14 06:59:41.417848423 -0500 +@@ -361,17 +361,8 @@ pr(1), lprng_certs(1), lprng_index_certs + .SH "AUTHOR" + Patrick Powell <papowell@lprng.com>. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lpf.n b/man/lpf.n +--- a/man/lpf.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpf.n 2024-01-14 06:59:41.417848423 -0500 +@@ -133,17 +133,8 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lp.n b/man/lp.n +--- a/man/lp.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lp.n 2024-01-14 06:59:41.417848423 -0500 +@@ -37,20 +37,11 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ + .\" This manpage-stub is written by Bernhard R. Link <brlink@debian.org> + .\" and available under GNU GPL v2 and any license LPRng is available under. + +diff -pNaru5 a/man/lpq.n b/man/lpq.n +--- a/man/lpq.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpq.n 2024-01-14 06:59:41.417848423 -0500 +@@ -280,18 +280,9 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ + +diff -pNaru5 a/man/lprm.n b/man/lprm.n +--- a/man/lprm.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lprm.n 2024-01-14 06:59:41.417848423 -0500 +@@ -232,17 +232,8 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lpr.n b/man/lpr.n +--- a/man/lpr.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpr.n 2024-01-14 06:59:41.417848423 -0500 +@@ -513,17 +513,8 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lprng_certs.n b/man/lprng_certs.n +--- a/man/lprng_certs.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lprng_certs.n 2024-01-14 06:59:41.417848423 -0500 +@@ -221,17 +221,8 @@ pr(1), lprng_certs(1), lprng_index_certs + .SH "AUTHOR" + Patrick Powell <papowell@lprng.com>. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lprng_index_certs.n b/man/lprng_index_certs.n +--- a/man/lprng_index_certs.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lprng_index_certs.n 2024-01-14 06:59:41.417848423 -0500 +@@ -36,17 +36,8 @@ pr(1), lprng_certs(1), lprng_index_certs + .SH "AUTHOR" + Patrick Powell <papowell@lprng.com>. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/lpstat.n b/man/lpstat.n +--- a/man/lpstat.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/lpstat.n 2024-01-14 06:59:41.417848423 -0500 +@@ -105,20 +105,11 @@ produce a long status format. + .SH "AUTHOR" + LPRng was written by Patrick Powell <papowell@lprng.com>. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ + .\" This manpage is written by Bernhard R. Link <brlink@debian.org> + .\" and available under GNU GPL v2 and any license LPRng is available under. + .\" The descriptions are extracted from lpstat.c from Patrick Powell <papowell@lprng.com> +diff -pNaru5 a/man/monitor.n b/man/monitor.n +--- a/man/monitor.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/monitor.n 2024-01-14 06:59:41.417848423 -0500 +@@ -49,17 +49,8 @@ pr(1), lprng_certs(1), lprng_index_certs + .SH "AUTHOR" + Patrick Powell <papowell@lprng.com>. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ +diff -pNaru5 a/man/printcap.n b/man/printcap.n +--- a/man/printcap.n 2012-04-15 06:28:52.000000000 -0400 ++++ b/man/printcap.n 2024-01-14 06:59:41.417848423 -0500 +@@ -1216,17 +1216,8 @@ set the debugging level on (-D5) and run + The debugging information will + help you to pinpoint the exact cause of failure. + .SH "HISTORY" + LPRng is a enhanced printer spooler system + with functionality similar to the Berkeley LPR software. +-The LPRng developer mailing list is lprng-devel@lists.sourceforge.net; +-subscribe by visiting +-.B https://lists.sourceforge.net/lists/listinfo/lprng-devel +-or sending mail to +-.B lprng-request@lists.sourceforge.net +-with +-the word +-.I subscribe +-in the body. + .br + The software is available via +-.B http://lprng.sourceforge.net ++.B http://www.lprng.com/ diff --git a/0001-hardlink-to-symlink-binaries.patch b/0001-hardlink-to-symlink-binaries.patch new file mode 100644 index 000000000000..5632eaa0b082 --- /dev/null +++ b/0001-hardlink-to-symlink-binaries.patch @@ -0,0 +1,36 @@ +diff -pNaru5 a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am 2023-03-17 17:26:01.000000000 -0400 ++++ b/src/Makefile.am 2024-01-15 01:04:59.522822722 -0500 +@@ -40,12 +40,12 @@ if WITHKERBEROS + endif + endif + + install-exec-hook: + rm -f $(DESTDIR)$(bindir)/lp $(DESTDIR)$(bindir)/cancel +- ln $(DESTDIR)$(bindir)/lpr $(DESTDIR)$(bindir)/lp +- ln $(DESTDIR)$(bindir)/lprm $(DESTDIR)$(bindir)/cancel ++ ln -s lpr $(DESTDIR)$(bindir)/lp ++ ln -s lprm $(DESTDIR)$(bindir)/cancel + if WITHPLUGINS + if WITHKERBEROS + $(mkdir_p) $(DESTDIR)$(plugindir) + ln -sf kerberos5.so $(DESTDIR)$(plugindir)/kerberos.so + ln -sf kerberos5.so $(DESTDIR)$(plugindir)/k5conn.so +diff -pNaru5 a/src/Makefile.in b/src/Makefile.in +--- a/src/Makefile.in 2023-04-05 15:24:37.000000000 -0400 ++++ b/src/Makefile.in 2024-01-15 01:04:45.246152685 -0500 +@@ -1523,12 +1523,12 @@ uninstall-hook: + rm -f $(DESTDIR)$(bindir)/lp $(DESTDIR)$(bindir)/cancel + @WITHKERBEROS_TRUE@@WITHPLUGINS_TRUE@ rm -f $(DESTDIR)$(plugindir)/kerberos.so $(DESTDIR)$(plugindir)/k5conn.so + + install-exec-hook: + rm -f $(DESTDIR)$(bindir)/lp $(DESTDIR)$(bindir)/cancel +- ln $(DESTDIR)$(bindir)/lpr $(DESTDIR)$(bindir)/lp +- ln $(DESTDIR)$(bindir)/lprm $(DESTDIR)$(bindir)/cancel ++ ln -s lpr $(DESTDIR)$(bindir)/lp ++ ln -s lprm $(DESTDIR)$(bindir)/cancel + @WITHKERBEROS_TRUE@@WITHPLUGINS_TRUE@ $(mkdir_p) $(DESTDIR)$(plugindir) + @WITHKERBEROS_TRUE@@WITHPLUGINS_TRUE@ ln -sf kerberos5.so $(DESTDIR)$(plugindir)/kerberos.so + @WITHKERBEROS_TRUE@@WITHPLUGINS_TRUE@ ln -sf kerberos5.so $(DESTDIR)$(plugindir)/k5conn.so + @WITHKERBEROS_TRUE@@WITHPLUGINS_TRUE@uninstall-local: + @WITHKERBEROS_TRUE@@WITHPLUGINS_TRUE@ if test -l $(DESTDIR)$(plugindir)/k5conn.so ; then \ diff --git a/0002-openssl_1.1.patch b/0002-openssl_1.1.patch new file mode 100644 index 000000000000..60054ce6ccf8 --- /dev/null +++ b/0002-openssl_1.1.patch @@ -0,0 +1,46 @@ +Patch for lprng 3.9.0 adapted from Debian patch for 3.8.B +Also works on 3.8.C + +https://sources.debian.org/data/main/l/lprng/3.8.B-7/debian/patches/openssl_1.1.patch + +This matches the gentoo patch but they didn't patch configure so autogen is run again. + +This patch enables automatic detection and compile of ssl 3. Don't know if it works. + +diff -pNaru5 a/configure b/configure +--- a/configure 2023-04-05 15:24:36.000000000 -0400 ++++ b/configure 2024-01-15 01:27:40.969868625 -0500 +@@ -8066,15 +8066,15 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ + #ifdef __cplusplus + extern "C" + #endif +-char SSL_load_error_strings (); ++char OPENSSL_init_ssl (); + int + main () + { +-return SSL_load_error_strings (); ++return OPENSSL_init_ssl (); + ; + return 0; + } + _ACEOF + if ac_fn_c_try_link "$LINENO"; then : +diff -pNaru5 a/configure.ac b/configure.ac +--- a/configure.ac 2023-04-05 15:24:24.000000000 -0400 ++++ b/configure.ac 2024-01-15 01:27:14.393193582 -0500 +@@ -952,11 +952,11 @@ fi + SSL_LDADD="" + if test "$SSL_ENABLE" != ""; then + AC_CHECK_LIB([crypto], [RC4_set_key], [true], [SSL_ENABLE=""]) + fi + if test "$SSL_ENABLE" != ""; then +- AC_CHECK_LIB([ssl], [SSL_load_error_strings], [true], [SSL_ENABLE=""], [-lcrypto]) ++ AC_CHECK_LIB([ssl], [OPENSSL_init_ssl], [true], [SSL_ENABLE=""], [-lcrypto]) + fi + if test "$SSL_ENABLE" != ""; then + SSL_LDADD="-lssl -lcrypto" + elif test "$SSL_EXPLICITLY_ENABLED" != ""; then + AC_MSG_ERROR([Unable to use OpenSSL]) diff --git a/0003-lpc-lpq-lprm-suffix.manual.patch b/0003-lpc-lpq-lprm-suffix.manual.patch new file mode 100644 index 000000000000..18f6379455c2 --- /dev/null +++ b/0003-lpc-lpq-lprm-suffix.manual.patch @@ -0,0 +1,19 @@ +diff -pNaru5 a/src/common/lpc.c b/src/common/lpc.c +--- a/src/common/lpc.c 2023-03-17 17:26:01.000000000 -0400 ++++ b/src/common/lpc.c 2024-01-15 05:12:39.178363297 -0500 +@@ -322,10 +322,15 @@ void doaction( struct line_list *args ) + Show_formatted_info(); + } + } else if( action == OP_LPQ || action == OP_LPRM ){ + pid_t pid, result; + plp_status_t status; ++ { ++ s=args->list[0]; ++ args->list[0]=safestrdup2(s,"@SUFFIX@",__FILE__,__LINE__); ++ free(s); ++ } + if( args->count == 1 && Printer_DYN ){ + plp_snprintf(msg,sizeof(msg), "-P%s", Printer_DYN ); + Add_line_list(args,msg,0,0,0); + Check_max(args,1); + args->list[args->count] = 0; @@ -1,85 +1,190 @@ -# Maintainer: David Raymond <raymond at kestrel dot nmt dot edu> +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: David Raymond <raymond at kestrel dot nmt dot edu> # Contributor: Alex Suykov <axs at ukr dot net> # Contributor: Frank Thieme <frank at fthieme dot net> -pkgname=lprng -pkgver=3.8.C -pkgrel=10 -pkgdesc="An Enhanced Printer Spooler" -arch=('i686' 'x86_64') -url="http://www.lprng.com" + +_primarylpr=2 # see lprng-cups +# 2 - lprng binaries, original package, does not coexist with cups + +_spooldir='/var/spool/lpd' +_printcap='/etc/lprng/printcap' +_service='lpd.service' + +set -u +pkgname='lprng' +pkgver='3.9.0' +pkgrel='1' +pkgdesc='an enhanced, extended, and portable implementation of the Berkeley LPR lpd print spooler' +arch=('i686' 'x86_64' 'armv6h') +#url="http://www.lprng.com" +url='https://lprng.sourceforge.net' license=('custom:Artistic') -depends=(openssl bash) +depends=('glibc' 'bash' 'file' 'grep' 'sed') optdepends=( - 'poppler: pdf to ps conversion in filters' - 'enscript: text to ps conversion in filters' - 'ghostscript: convert ps to device language' - 'foomatic-filters-lprng: foomatic-rip' - 'hplip: drivers for HP printers' - + 'poppler: pdf to ps conversion in filters (gsfilter)' # formerly xpdf + 'ghostscript: convert ps to device language in filters (gsfilter)' + 'enscript: text to ps conversion in filters (gsfilter,psfilter)' + 'foomatic-filters-lprng: foomatic-rip in filters (foofilter)' + 'hplip: drivers for HP printers' + 'ifhp: filters for many printers' ) -conflicts=(cups) -source=(http://sourceforge.net/projects/lprng/files/lprng/lprng-3.8.C.tar.gz - lpd.service - gsfilter - psfilter - foofilter - printcap_remote - printcap_server - README - lpd.conf - lpd.perms - lprng.install) - -install=lprng.install + conflicts=('cups') +backup=( + 'etc/lprng/lpd/lpd.conf' + 'etc/lprng/lpd/lpd.perms' + "${_printcap#/}" +) +options=('!strip') +install="${pkgname%%-*}.install" +_srcdir="lprng-${pkgver}" +source=( + "http://sourceforge.net/projects/lprng/files/lprng/lprng-${pkgver}.tar.gz" + #'0000-lprng-help-website.patch' # Clean outdated info from help files + '0001-hardlink-to-symlink-binaries.patch' + '0002-openssl_1.1.patch' # https://sources.debian.org/data/main/l/lprng/3.8.B-7/debian/patches/openssl_1.1.patch + '0003-lpc-lpq-lprm-suffix.manual.patch' + 'lpd.service' + 'gsfilter' + 'psfilter' + 'foofilter' + 'printcap_remote' + 'printcap_server' + 'README' + 'lpd.conf' + 'lpd.perms' +) +md5sums=('10f4ec823df0e021404284037138aa8a' + '08fbfe9aac9aebdd88f71afc557b5e68' + 'c8f1ae4eefe6b82d9097f095ab1557c8' + '06db650ad6f5704e7a177bae23500977' + 'a59c448b0e37db80422175b7a1a2c304' + 'ce6f32b57a8e650f610523a6afaaf659' + 'd6c523f275bb63f68bf17d5ca02e4814' + '1fa86ca79140bed23d59a552ac2d39b2' + '496dfbb160f2a0308b7847541b03c8db' + '422ad79bda6ae9d2990fdef55240e569' + '1768d2f81d6d14c22686293ca60528c1' + '3ef9f91dc0de273da1f5f1b20d49cd17' + '3f861c75c2d68c0e45b4095ab39ba1c8') +sha256sums=('c92597671f4c7cbe8bb3f38fbc4283354db84c6abff1efb675fa2e120421915d' + '96828bce13d6548a02e1d9849e713c950312b5c38c2282f2c5cfc5be454c6784' + '269d2fdd0bbef11aa933cd4d49c06a44ce227badeec2530f199b185c7bd7f4f7' + 'd071adace21df32507d69c908851dc94511f404ecea4095bcdbb7d8504d97241' + '3b546e8dd8f7ef3a1025d7d59ed8187fa21a9b9cf839a9bbda9821733da046e1' + 'c6a696dea62f7ffdade6a3071d201d076ee81e4aa14283dd4072578665e5eb7a' + 'f1a8a318f210cfc3814d234cb98a3de0c7a161c0e0c5671fe1c266ee03e351ec' + 'ce83b23dd188876b0b66de70f8b13d12036ba2ec1b837212bce6a172308904d4' + 'be383447b74cf9b86666adeaf35f844b394c222abbcda7f5cd7fc64f79373b82' + 'fc94245b58b23c9498a10c64aed20b6120595c6c3e1412bb419126ca78123a94' + 'a4c261f5754b380ff85c454249a152cb67baf9bbf10dc95cd16026f90bacb620' + 'faf52cf982eaa66a475344a5647a80a761d10402ccb9de263c70dc15ccc85c29' + '47b48ab7fa15ae9226463c98d6c8fce9ee9b602c3a9f96907fcd84e50902b2cc') + +prepare() { + set -u + cd "${_srcdir}" + + local _f + for _f in "${source[@]}"; do + _f="${_f%%::*}" + _f="${_f##*/}" + if [[ "${_f}" = *.manual.patch ]]; then + if [ "${_primarylpr}" -eq 0 ]; then + set +u; msg2 "Patch ${_f}"; set -u + patch -Nup1 -i <(sed -E -e "s:@SUFFIX@:${_sfx}:g" "${srcdir}/${_f}") + fi + elif [[ "${_f}" = *.patch ]]; then + set +u; msg2 "Patch ${_f}"; set -u + patch -Nup1 -i "${srcdir}/${_f}" + fi + done + #cd ..; cp -pr "${_srcdir}" 'a'; ln -s "${_srcdir}" 'b'; cd "${_srcdir}"; false + #diff -pNaru5 'a' 'b' > '0000-new.patch' + + sed -e 's:/var/spool/LPD:/var/spool/lpd:g' -i 'man/lpd.n' + + # Clean up sbin + sed -e 's:/usr/local/sbin/:/usr/bin/:g' -i $(grep -lrFe '/usr/local/sbin/' .) + sed -e 's:/usr/sbin/:/usr/bin/:g' -i $(grep -lrFe '/usr/sbin/' .) + sed -e '/FILTER_PATH/ s@/usr/sbin:@@g' -i 'src/vars.c' + + # Clean up /usr/local + sed -e 's:/usr/local/libexec/:/usr/lib/:g' -i $(grep -lrFe '/usr/local/libexec/' .) + sed -e 's:/usr/local/bin:/usr/bin:g' -i $(grep -lrFe '/usr/local/bin' .) + sed -e 's:/usr/local/:/usr/:g' -i 'src/pclbanner.in' + + # Fix ifhp path in printcap + sed -e 's:/usr/libexec/filters/ifhp:/usr/lib/filters/ifhp:g' -i 'conf/printcap' + + # Check filters + local _f + for _f in "${srcdir}"/*filter; do + bash -n "${_f}" + done + set +u +} build() { - cd "$srcdir/lprng-$pkgver" + set -u + cd "${_srcdir}" - ./configure --prefix=/usr --sysconfdir=/etc/lprng --localstatedir=/var\ - --mandir=/usr/share/man --libexecdir=/usr/lib/lprng\ - --with-userid=daemon --with-groupid=lp\ - --sbindir=/usr/bin - make + if [ ! -s 'Makefile' ]; then + local _conf=( + -q + --libexecdir='/usr/lib/lprng' + --localstatedir='/var' + --mandir='/usr/share/man' + --sbindir='/usr/bin' + --sysconfdir="${_printcap%/*}" + --with-groupid='lp' + --with-spooldir="${_spooldir}" + --with-userid='daemon' + --prefix='/usr' + ) + local _lf='' + local _cf=' -Wno-unused-result -s -fcommon' + _conf+=(--disable-ssl) + set -x + CFLAGS="${CFLAGS}${_cf}" \ + LDFLAGS="${LDFLAGS}${_lf}" \ + ./configure "${_conf[@]}" + set +x + fi + set -x + make -s + set +x + set +u } package() { - cd "$srcdir/lprng-$pkgver" - - make MAKEPACKAGE=YES DESTDIR="$pkgdir/" install - - install -d "${pkgdir}/usr/lib/systemd/system/" - install -d "${pkgdir}/usr/share/doc/lprng/" - install -d "${pkgdir}/etc/lprng/lpd/" - install -D -m 0644 "${srcdir}/lpd.service" \ - "${pkgdir}/usr/lib/systemd/system/" - install -D -m 0644 COPYRIGHT \ - "${pkgdir}/usr/share/licenses/lprng/COPYRIGHT" - install -D -m 0755 "${srcdir}/foofilter" \ - "${pkgdir}/usr/share/doc/lprng/" - install -D -m 0755 "${srcdir}/gsfilter" \ - "${pkgdir}/usr/share/doc/lprng/" - install -D -m 0755 "${srcdir}/psfilter" \ - "${pkgdir}/usr/share/doc/lprng/" - install -D -m 0644 "${srcdir}/printcap_remote" \ - "${pkgdir}/usr/share/doc/lprng/" - install -D -m 0644 "${srcdir}/printcap_server" \ - "${pkgdir}/usr/share/doc/lprng/" - install -D -m 0644 "${srcdir}/README" \ - "${pkgdir}/usr/share/doc/lprng/" - install -D -m 0644 "${srcdir}/lpd.conf" \ - "${pkgdir}/usr/share/doc/lprng/" - install -D -m 0644 "${srcdir}/lpd.perms" \ - "${pkgdir}/usr/share/doc/lprng/" -} + set -u + cd "${_srcdir}" + make -s -j1 MAKEPACKAGE='YES' DESTDIR="${pkgdir}" install + install -Dpm0644 'COPYRIGHT' -t "${pkgdir}/usr/share/licenses/${pkgname}/" + cat >> "${pkgdir}${_printcap}.sample" << EOF +# +# Printer names are case preserving and case insensitive. +# Do not make two printers same letters different case. +# If you do the last one will be used. +# +EOF + cd "${srcdir}" -md5sums=('5901bed95e61d2bea3ba3056056af432' - '990745083e4f627a714569dc20816b0a' - 'ac43a39395da12fb039a25b71d57e6ea' - '58a4bf1a740b67fea83f7f68336f20e7' - '58afc1a1ec8d67a1aa2bdd64788d5213' - '496dfbb160f2a0308b7847541b03c8db' - '422ad79bda6ae9d2990fdef55240e569' - '1768d2f81d6d14c22686293ca60528c1' - '3ef9f91dc0de273da1f5f1b20d49cd17' - '3f861c75c2d68c0e45b4095ab39ba1c8' - '0f21b173ae0f16d225b4519e0f3238ff') + install -d "${pkgdir}${_spooldir}" + rm "${pkgdir}/usr/bin"/*certs "${pkgdir}/usr/share/man/man1"/*certs* + install -Dpm0644 'lpd.service' "${pkgdir}/usr/lib/systemd/system/${_service}" + install -Dpm0755 'foofilter' 'gsfilter' 'psfilter' -t "${pkgdir}/usr/share/doc/${pkgname}/" + install -Dpm0644 'printcap_remote' 'printcap_server' 'README' -t "${pkgdir}/usr/share/doc/${pkgname}/" + install -Dpm0644 'lpd.conf' 'lpd.perms' -t "${pkgdir}/etc/lprng/lpd/" + install -Dpm0644 /dev/null "${pkgdir}${_printcap}" + + # Make documentation easy to find + ln -s "/usr/share/doc/${pkgname}" "${pkgdir}/etc/lprng/lpd/doc" + + # Check for unwanted folders + ! grep -lrFe '/sbin' "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /sbin"; false; } + ! grep -lrFe '/usr/local' "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /usr/local"; false; } + ! grep -lrFe '/libexec/' "${pkgdir}" || { echo "Line ${LINENO} Forbidden: /libexec/"; false; } + set +u +} +set +u diff --git a/foofilter b/foofilter index 7fadd3d3e9a0..8fde8fe2a97a 100755 --- a/foofilter +++ b/foofilter @@ -2,34 +2,43 @@ # # foofilter.sh -- Foomatic-rip-lprng is used as the print filter # -infile=/tmp/infile.$$ -tempfile=/tmp/tempfile.$$ +# Requires +# poppler (xpdf): pdftops +# foomatic-filters-lprng +# enscript + +set -u + +# define temporary files +infile="/tmp/infile.$$" +tempfile="/tmp/tempfile.$$" # replace example.ppd with the appropriate ppd file for your printer -your_ppd=$example.ppd - -cat > $infile - -fileinfo=`file -b $infile` -ascii=`echo $fileinfo | grep ASCII` -pdf=`echo $fileinfo | grep PDF` -ps=`echo $fileinfo | grep PostScript` - -if test "$ascii" != '' -then - enscript -M Letter -o - $infile > $tempfile -elif test "$pdf" != '' -then - pdftops $infile - > $tempfile -elif test "$ps" != '' -then - cat $infile > $tempfile -else - echo "Can not print file of type $fileinfo" | \ - enscript -M Letter -o - > $tempfile -fi +your_ppd="${example}.ppd" + +# choose your paper size +PAPER='Letter' +#PAPER='A4' + +# send the standard input to a temporary file +cat > "${infile}" + +# figure out what type of file we are trying to print +fileinfo="$(file -b "${infile}")" + +# take various actions depending on the type of file -- send +# results to a temporary postscript file +case "${fileinfo}" in +*ASCII*) enscript -M "${PAPER}" -o - "${infile}" > "${tempfile}" ;; +*PDF*) pdftops "${infile}" - > "${tempfile}" ;; +*PostScript*) cat "${infile}" > "${tempfile}" ;; +*) + echo "Cannot print file of type ${fileinfo}" | \ + enscript -M "${PAPER}" -o - > "${tempfile}" + ;; +esac # foomatic-rip sends stuff to the standard output -/usr/bin/foomatic-rip-lprng --lprng /etc/lprng/lpd/$your_ppd < $tempfile +/usr/bin/foomatic-rip-lprng --lprng "/etc/lprng/lpd/${your_ppd}" < "${tempfile}" -rm $infile $tempfile +rm -f "${infile}" "${tempfile}" @@ -2,54 +2,51 @@ # # gsfilter.simple -- HP deskjet or similar sample filter # -# Requires pdftops from the xpdf package, the ghostscript package, and -# the enscript package. -# +# Requires +# poppler (xpdf): pdftops +# ghostscript +# enscript + +set -u + # define temporary files -infile=/tmp/infile.$$ -tempfile=/tmp/tempfile.$$ -outfile=/tmp/outfile.$$ +infile="/tmp/infile.$$" +tempfile="/tmp/tempfile.$$" +outfile="/tmp/outfile.$$" # choose your paper size -GSPAPER=letter -#GSPAPER=a4 -PAPER=Letter -#PAPER=A4 +GSPAPER='letter' +#GSPAPER='a4' +PAPER='Letter' +#PAPER='A4' # chose your printer device (run gs -h to see what is available) -DEVICE=cdjcolor +GSDEVICE='cdjcolor' # send the standard input to a temporary file -cat > $infile +cat > "${infile}" # figure out what type of file we are trying to print -fileinfo=`file -b $infile` -ascii=`echo $fileinfo | grep ASCII` -pdf=`echo $fileinfo | grep PDF` -ps=`echo $fileinfo | grep PostScript` +fileinfo="$(file -b "${infile}")" # take various actions depending on the type of file -- send # results to a temporary postscript file -if test "$ascii" != '' -then - enscript -M $PAPER -o - $infile > $tempfile -elif test "$pdf" != '' -then - pdftops -paper match $infile - > $tempfile -elif test "$ps" != '' -then - cat $infile > $tempfile -else - echo "Cannot print file of type $fileinfo" | \ - enscript -M $PAPER -o - > $tempfile -fi +case "${fileinfo}" in +*ASCII*) enscript -M "${PAPER}" -o - "${infile}" > "${tempfile}" ;; +*PDF*) pdftops -paper 'match' "${infile}" - > "${tempfile}" ;; +*PostScript*) cat "${infile}" > "${tempfile}" ;; +*) + echo "Cannot print file of type ${fileinfo}" | \ + enscript -M "${PAPER}" -o - > "${tempfile}" + ;; +esac # run the postscript through gs to produce device output in a file -echo quit | gs -sOutputFile=$outfile -q -sPAPERSIZE=$GSPAPER -dSAFER \ - -dNOPAUSE -sDEVICE=$DEVICE $tempfile > /dev/null 2> /dev/null +echo 'quit' | gs -sOutputFile="${outfile}" -q -sPAPERSIZE="${GSPAPER}" -dSAFER \ + -dNOPAUSE -sDEVICE="${GSDEVICE}" "${tempfile}" > /dev/null 2>&1 # send output file to standard out -cat $outfile +cat "${outfile}" # clean up -rm $infile $tempfile $outfile +rm -f "${infile}" "${tempfile}" "${outfile}" diff --git a/lpd.service b/lpd.service index d572a89647d6..e4c0f7c2601a 100644 --- a/lpd.service +++ b/lpd.service @@ -4,8 +4,8 @@ After=network.target [Service] Type=forking -ExecStart=/usr/sbin/lpd -ExecReload=/bin/kill -HUP $MAINPID +ExecStart=/usr/bin/lpd +ExecReload=/usr/bin/kill -HUP $MAINPID KillMode=process [Install] diff --git a/lprng.install b/lprng.install index 8039b18e72a0..0a9b373c94d8 100755..100644 --- a/lprng.install +++ b/lprng.install @@ -1,10 +1,49 @@ +_printcap='/etc/lprng/printcap' +_service='lpd.service' + +_clean_untracked() { + set -u + local _untracked=( + '/usr/share/doc/lprng/lpd.conf.sample' + '/usr/share/doc/lprng/lpd.perms.sample' + '/usr/share/doc/lprng/printcap.sample' + ) + # These untracked files can't be cleaned any other way + rm -f "${_untracked[@]}" + set +u +} + +_post_ui() { + set -u + systemctl daemon-reload + if systemctl -q is-active 'org.cups.cups-lpd.socket'; then + echo 'You may need to disable cups-lpd with' + echo " systemctl disable --now 'org.cups.cups-lpd.socket'" + fi + if ! systemctl -q is-enabled "${_service}"; then + echo 'Enable your lpd server with' + echo " sudo systemctl enable --now '${_service}'" + fi + if ! grep -qe '^[a-zA-Z]' "${_printcap}"; then + echo "Add some printers to ${_printcap}" + fi + set +u +} + +post_upgrade() { + _post_ui + _clean_untracked +} + post_install() { - mv /etc/lprng/printcap.sample /etc/lprng/lpd/lpd.conf.sample \ - /etc/lprng/lpd/lpd.perms.sample /usr/share/doc/lprng - echo 'See /usr/share/doc/lprng/README to configure' + _post_ui + _clean_untracked } pre_remove() { - /usr/bin/systemctl stop lpd.service - /usr/bin/systemctl disable lpd.service + set -u + systemctl stop "${_service}" + systemctl disable "${_service}" + set +u + _clean_untracked } @@ -8,67 +8,57 @@ # is controlled by a command line option in enscript. Duplex on pdf # files is controlled by a pdftops flag. # -# Needs pstopdf from xpdf and enscript. -# -# set paper type -PAPER=Letter -#PAPER=A4 +# Requires +# poppler (xpdf): pdftops +# enscript -# define whether duplex is desired by uncommenting appropriate lines -#duplex=false -duplex=true -#duplexflag= -duplexflag=-duplex +set -u # define temporary files -infile=/tmp/infile.$$ -tmpfile=/tmp/tmpfile.$$ -headfile=/tmp/headfile.$$ -tailfile=/tmp/tailfile.$$ +infile="/tmp/infile.$$" +tempfile="/tmp/tempfile.$$" +headfile="/tmp/headfile.$$" +tailfile="/tmp/tailfile.$$" -# touch files so if not used, cleanup doesn't complain -touch $tmpfile -touch $headfile -touch $tailfile +# choose your paper size +PAPER='Letter' +#PAPER='A4' -# send standard input to temporary file -cat > $infile +# define whether duplex is desired by uncommenting appropriate lines +#duplex='false' +duplex='true' +#duplexflag='' +duplexflag='-duplex' -# figure out the type of file -fileinfo=`file -b $infile` -ascii=`echo $fileinfo | grep ASCII` -pdf=`echo $fileinfo | grep PDF` -ps=`echo $fileinfo | grep PostScript` +# send the standard input to a temporary file +cat > "${infile}" -# do conversions to postscript based on file type and put in tmpfile -if test "$ascii" != '' -then - enscript -DDuplex:$duplex -M $PAPER -o - $infile -elif test "$pdf" != '' -then - pdftops -paper match $duplexflag $infile - -elif test "$ps" != '' -then +# figure out what type of file we are trying to print +fileinfo="$(file -b "${infile}")" +# do conversions to postscript based on file type and put in tempfile +case "${fileinfo}" in +*ASCII*) enscript -DDuplex:"${duplex}" -M "${PAPER}" -o - "${infile}" ;; +*PDF*) pdftops -paper 'match' "${duplexflag}" "${infile}" - ;; +*PostScript*) + if [ "${duplex}" = 'true' ]; then # are we doing duplex? if so, insert a special string in postscript file - if test "$duplex" = true - then - sed -e "1 w $headfile" -e "2,$ w $tailfile" < $infile > /dev/null - cat $headfile > $tmpfile - echo "<< /Duplex true >> setpagedevice" >> $tmpfile - cat $tailfile >> $tmpfile - else - - # if not duplex, don't do anything - cat $tailfile >> $tmpfile - fi - - # send the file to standard output - cat $tmpfile -else - echo "Cannot print file of type $fileinfo" | \ - enscript -DDuplex:$duplex -M $PAPER -o - -fi + sed -e "1 w ${headfile}" -e "2,$ w ${tailfile}" < "${infile}" > /dev/null + cat "${headfile}" > "${tempfile}" + echo "<< /Duplex true >> setpagedevice" >> "${tempfile}" + cat "${tailfile}" >> "${tempfile}" + else + # if not duplex, don't do anything + cat "${tailfile}" >> "${tempfile}" + fi + # send the file to standard output + cat "${tempfile}" + ;; +*) + echo "Cannot print file of type ${fileinfo}" | \ + enscript -M "${PAPER}" -DDuplex:"${duplex}" -o - + ;; +esac # clean up -rm $infile $tmpfile $headfile $tailfile +rm -f "${infile}" "${tempfile}" "${headfile}" "${tailfile}" |