summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/data.pm
blob: 8813af5151123b828fecb3335e7652fb71406035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package printer::data;

use strict;
use common;
use vars qw(@ISA @EXPORT);

@ISA = qw(Exporter);
@EXPORT = qw(%spoolers %spooler_inv %shortspooler_inv);


# BUG, FIXME : this was neither declered nor setted anywhere before :
# maybe this should be swtiched : 
# $lprcommand{stuff} => $spoolers{stuff}{print_command}

our %spoolers = ('pdq' => {
                          'help' => "/usr/bin/lphelp %s |",
					 'print_command' => 'lpr-pdq',
					 'long_name' => N("PDQ - Print, Don't Queue"),
					 'short_name' => N("PDQ"),
                          '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' => {
                        'help' => "/usr/bin/pdq -h -P %s 2>&1 |",
                        'print_command' => 'lpr',
				    'long_name' => N("LPD - Line Printer Daemon"),
                        'short_name' => N("LPD"),
                        'boot_spooler' => 'lpd',
                        'service' => 'lpd',
                        'packages2add' => [ [qw(lpr net-tools gpr a2ps ImageMagick)],
                                            [qw(/usr/sbin/lpf
                                                /usr/sbin/lpd
                                                /sbin/ifconfig
                                                /usr/bin/gpr
                                                /usr/bin/a2ps
                                                /usr/bin/convert)] ],
                        'packages2rm' => [ 'LPRng', '/usr/lib/filters/lpf' ],
                        'alternatives' => [
                            [ 'lpr', '/usr/bin/lpr-lpd' ],
                            [ 'lpq', '/usr/bin/lpq-lpd' ],
                            [ 'lprm', '/usr/bin/lprm-lpd' ],
                            [ 'lpc', '/usr/sbin/lpc-lpd' ]
                        ]
                 },
			 'lprng' => {
				'print_command' => 'lpr-lpd',
				'long_name' => N("LPRng - LPR New Generation"),
				'short_name' => N("LPRng"),
                    'boot_spooler' => 'lpd',
                    'service' => 'lpd',
                    'packages2add' => [ [qw(LPRng net-tools gpr a2ps ImageMagick)],
                                        [qw(/usr/lib/filters/lpf
                                            /usr/sbin/lpd
                                            /sbin/ifconfig
                                            /usr/bin/gpr
                                            /usr/bin/a2ps
                                            /usr/bin/convert)] ],
                    'packages2rm' => [ 'lpr', '/usr/sbin/lpf' ],
                    'alternatives' => [
                        [ 'lpr', '/usr/bin/lpr-lpd' ],
                        [ 'lpq', '/usr/bin/lpq-lpd' ],
                        [ 'lprm', '/usr/bin/lprm-lpd' ],
                        [ 'lp', '/usr/bin/lp-lpd' ],
                        [ 'cancel', '/usr/bin/cancel-lpd' ],
                        [ 'lpstat', '/usr/bin/lpstat-lpd' ],
                        [ 'lpc', '/usr/sbin/lpc-lpd' ]
                    ]
			 },
			 'cups' => {
				'print_command' => 'lpr-cups',
				'long_name' => N("CUPS - Common Unix Printing System"),
				'short_name' => N("CUPS"),
                    'boot_spooler' => 'cups',
                    'service' => 'cups',
                    'packages2add' => [ ['cups', 'net-tools', 'xpp', if_($::expert, 'cups-drivers'),
                                         $::isInstall ? 'curl' : 'webfetch'],
                                        [ qw(/usr/lib/cups/cgi-bin/printers.cgi
                                             /sbin/ifconfig
                                             /usr/bin/xpp),
                                          if_($::expert, "/usr/share/cups/model/postscript.ppd.gz"),
                                          $::isInstall ? '/usr/bin/curl' : '/usr/bin/wget' ] ],
                    '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} => $spoolers{$_} } keys %spoolers;

our %shortspooler_inv = map { $spoolers{$_}{short_name} => $spoolers{$_} } keys %spoolers;