summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/data.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/printer/data.pm')
-rw-r--r--perl-install/printer/data.pm51
1 files changed, 46 insertions, 5 deletions
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm
index 4a64ead75..25cacbe26 100644
--- a/perl-install/printer/data.pm
+++ b/perl-install/printer/data.pm
@@ -6,35 +6,55 @@ use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(%spoolers %spooler_inv %shortspooler_inv
- $kernelversion $usbprintermodule);
+ $kernelversion $usbprintermodule
+ $commonpackages $localqueuepackages);
+# Kernel-specific data
our $kernelversion = `uname -r 2>/dev/null`;
$kernelversion =~ s/^(\s*)(\d+\.\d+)(\..*)$/$2/;
chomp $kernelversion;
our $usbprintermodule = ($kernelversion eq '2.6' ? "usblp" : "printer");
+# Packages which are always needed to run printerdrake
+our $commonpackages = [ [ 'foomatic-db-engine' ],
+ [ '/usr/bin/foomatic-configure' ] ];
+
+# Packages which are needed to create and manage local print queues
+our $localqueuepackages = [ [ 'foomatic-filters', 'foomatic-db',
+ 'printer-utils', 'printer-testpages', 'nmap',
+ 'scli' ],
+ [qw(/usr/bin/foomatic-rip
+ /usr/share/foomatic/db/source/driver/ljet4.xml
+ /usr/bin/escputil
+ /usr/share/printer-testpages/testprint.ps
+ /usr/bin/nmap
+ /usr/bin/scli)] ];
+
+# Spooler-specific data
our %spoolers = ('pdq' => {
'help' => "/usr/bin/pdq -h -P %s 2>&1 |",
'print_command' => 'lpr-pdq',
'print_gui' => 'xpdq',
'long_name' => N("PDQ - Print, Don't Queue"),
'short_name' => N("PDQ"),
+ 'local_queues' => 1,
'packages2add' => [ [ 'pdq' ], [qw(/usr/bin/pdq /usr/X11R6/bin/xpdq)] ],
'alternatives' => [
[ 'lpr', '/usr/bin/lpr-pdq' ],
[ 'lpq', '/usr/bin/lpq-foomatic' ],
[ 'lprm', '/usr/bin/lprm-foomatic' ]
],
- },
- 'lpd' => {
+ },
+ 'lpd' => {
'print_command' => 'lpr-lpd',
'print_gui' => 'gpr',
'long_name' => N("LPD - Line Printer Daemon"),
'short_name' => N("LPD"),
'boot_spooler' => 'lpd',
'service' => 'lpd',
+ 'local_queues' => 1,
'packages2add' => [ [qw(lpr net-tools gpr a2ps ImageMagick)],
[qw(/usr/sbin/lpf
/usr/sbin/lpd
@@ -49,7 +69,7 @@ our %spoolers = ('pdq' => {
[ 'lprm', '/usr/bin/lprm-lpd' ],
[ 'lpc', '/usr/sbin/lpc-lpd' ]
]
- },
+ },
'lprng' => {
'print_command' => 'lpr-lpd',
'print_gui' => 'gpr',
@@ -57,6 +77,7 @@ our %spoolers = ('pdq' => {
'short_name' => N("LPRng"),
'boot_spooler' => 'lpd',
'service' => 'lpd',
+ 'local_queues' => 1,
'packages2add' => [ [qw(LPRng net-tools gpr a2ps ImageMagick)],
[qw(/usr/lib/filters/lpf
/usr/sbin/lpd
@@ -74,7 +95,7 @@ our %spoolers = ('pdq' => {
[ 'lpstat', '/usr/bin/lpstat-lpd' ],
[ 'lpc', '/usr/sbin/lpc-lpd' ]
]
- },
+ },
'cups' => {
'help' => "/usr/bin/lphelp %s |",
'print_command' => 'lpr-cups',
@@ -83,6 +104,7 @@ our %spoolers = ('pdq' => {
'short_name' => N("CUPS"),
'boot_spooler' => 'cups',
'service' => 'cups',
+ 'local_queues' => 1,
'packages2add' => [ ['cups', 'net-tools', 'xpp', 'cups-drivers',
$::isInstall ? 'curl' : 'webfetch'],
[ qw(/usr/lib/cups/cgi-bin/printers.cgi
@@ -102,6 +124,25 @@ our %spoolers = ('pdq' => {
[ 'lpstat', '/usr/bin/lpstat-cups' ],
[ 'lpc', '/usr/sbin/lpc-cups' ]
]
+ },
+ 'rcups' => {
+ 'help' => "/usr/bin/lphelp %s |",
+ 'print_command' => 'lpr-cups',
+ 'print_gui' => 'xpp',
+ 'long_name' => N("CUPS - Common Unix Printing System (remote server)"),
+ 'short_name' => N("RemoteCUPS"),
+ 'local_queues' => 0,
+ 'packages2add' => [ ['cups-common'],
+ ['/usr/bin/lpr-cups'] ],
+ 'alternatives' => [
+ [ 'lpr', '/usr/bin/lpr-cups' ],
+ [ 'lpq', '/usr/bin/lpq-cups' ],
+ [ 'lprm', '/usr/bin/lprm-cups' ],
+ [ 'lp', '/usr/bin/lp-cups' ],
+ [ 'cancel', '/usr/bin/cancel-cups' ],
+ [ 'lpstat', '/usr/bin/lpstat-cups' ],
+ [ 'lpc', '/usr/sbin/lpc-cups' ]
+ ]
}
);
our %spooler_inv = map { $spoolers{$_}{long_name} => $_ } keys %spoolers;