diff options
Diffstat (limited to 'perl-install/printer')
-rw-r--r-- | perl-install/printer/data.pm | 29 | ||||
-rw-r--r-- | perl-install/printer/main.pm | 10 | ||||
-rw-r--r-- | perl-install/printer/printerdrake.pm | 20 |
3 files changed, 31 insertions, 28 deletions
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm index 5718d6c9b..0d650ac02 100644 --- a/perl-install/printer/data.pm +++ b/perl-install/printer/data.pm @@ -6,7 +6,7 @@ use vars qw(@ISA @EXPORT); @ISA = qw(Exporter); @EXPORT = qw(%spoolers %spooler_inv %shortspooler_inv - $kernelversion $usbprintermodule + $kernelversion $usbprintermodule $lib $commonpackages $gimpprintingpackages $gnomecupspackages $localqueuepackages); @@ -18,13 +18,16 @@ chomp $kernelversion; our $usbprintermodule = ($kernelversion eq '2.6' ? "usblp" : "printer"); +# Architecture-specific data +our $lib = arch() =~ /x86_64/ ? "lib64" : "lib"; + # Packages which are always needed to run printerdrake our $commonpackages = [ [ 'foomatic-db-engine' ], [ '/usr/bin/foomatic-configure' ] ]; # Packages which are needed to print with the GIMP our $gimpprintingpackages = [ [ 'gutenprint-gimp2' ], - [ '/usr/lib/gimp/2.0/plug-ins/print' ] ]; + [ "/usr/$lib/gimp/2.0/plug-ins/print" ] ]; # Packages which are needed for CUPS under GNOME our $gnomecupspackages = [ [ 'desktop-printing' ], @@ -85,7 +88,7 @@ our %spoolers = ('pdq' => { /sbin/ifconfig /usr/bin/a2ps /usr/bin/convert)] ], - 'packages2rm' => [ 'LPRng', '/usr/lib/filters/lpf' ], + 'packages2rm' => [ 'LPRng', "/usr/$lib/filters/lpf" ], 'alternatives' => [ [ 'lpr', '/usr/bin/lpr-lpd' ], [ 'lpq', '/usr/bin/lpq-lpd' ], @@ -102,11 +105,11 @@ our %spoolers = ('pdq' => { 'service' => 'lpd', 'local_queues' => 1, 'packages2add' => [ [qw(LPRng net-tools a2ps ImageMagick)], - [qw(/usr/lib/filters/lpf - /usr/sbin/lpd - /sbin/ifconfig - /usr/bin/a2ps - /usr/bin/convert)] ], + ["/usr/$lib/filters/lpf", + "/usr/sbin/lpd", + "/sbin/ifconfig", + "/usr/bin/a2ps", + "/usr/bin/convert"] ], 'packages2rm' => [ 'lpr', '/usr/sbin/lpf' ], 'alternatives' => [ [ 'lpr', '/usr/bin/lpr-lpd' ], @@ -129,11 +132,11 @@ our %spoolers = ('pdq' => { 'local_queues' => 1, 'packages2add' => [ ['cups', 'net-tools', 'xpp', 'cups-drivers', 'gutenprint-cups', $::isInstall ? 'curl' : 'webfetch'], - [ qw(/usr/lib/cups/cgi-bin/printers.cgi - /sbin/ifconfig - /usr/bin/xpp - /usr/lib/cups/filter/rastertolxx74 - /usr/lib/cups/filter/commandtoepson), + [ "/usr/$lib/cups/cgi-bin/printers.cgi", + "/sbin/ifconfig", + "/usr/bin/xpp", + "/usr/$lib/cups/filter/rastertolxx74", + "/usr/$lib/cups/filter/commandtoepson", $::isInstall || !(-x '/usr/bin/wget') ? '/usr/bin/curl' : diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index 302281d21..0e45f79e9 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -65,7 +65,7 @@ sub spooler() { return map { $spoolers{$_}{long_name} } ('cups', 'rcups' , if_(files_exist(qw(/usr/bin/pdq)), 'pdq'), - if_(files_exist(qw(/usr/lib/filters/lpf /usr/sbin/lpd)), 'lprng')); + if_(files_exist("/usr/$lib/filters/lpf", "/usr/sbin/lpd"), 'lprng')); } sub printer_type($) { @@ -2785,8 +2785,8 @@ sub start_hplip { foreach my $a (@autodetected) { $device eq $a->{port} or next; open(my $F, ($::testing ? $::prefix : "chroot $::prefix/ ") . - '/bin/sh -c "export LC_ALL=C; /usr/lib/cups/backend/hp" |') or - die 'Could not run "/usr/lib/cups/backend/hp"!'; + "/bin/sh -c \"export LC_ALL=C; /usr/$lib/cups/backend/hp\" |") or + die "Could not run \"/usr/$lib/cups/backend/hp\"!"; while (my $line = <$F>) { if (($line =~ m!^direct\s+(hp:/$bus/(\S+?)\?serial=(\S+))\s+!) || ($line =~ m!^direct\s+(hp:/$bus/(\S+?)\?device=()(\S+))\s+!) || @@ -2820,8 +2820,8 @@ sub start_hplip_manual { # Return all possible device URIs open(my $F, ($::testing ? $::prefix : "chroot $::prefix/ ") . - '/bin/sh -c "export LC_ALL=C; /usr/lib/cups/backend/hp" |') or - die 'Could not run "/usr/lib/cups/backend/hp"!'; + "/bin/sh -c \"export LC_ALL=C; /usr/$lib/cups/backend/hp\" |") or + die "Could not run \"/usr/$lib/cups/backend/hp\"!"; my @uris; while (<$F>) { m!^direct\s+(hp:\S+)\s+!; diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 8c9d73353..a3fbb7310 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -2537,10 +2537,10 @@ sub setup_common { if ($hplipentry->{scan}) { # Install SANE if (!$::testing && - (!files_exist(qw(/usr/bin/scanimage - /usr/bin/xscanimage - /etc/sane.d/dll.conf - /usr/lib/libsane-hpaio.so.1)) || + (!files_exist("/usr/bin/scanimage", + "/usr/bin/xscanimage", + "/etc/sane.d/dll.conf", + "/usr/$lib/libsane-hpaio.so.1") || (!files_exist(qw(/usr/bin/xsane)) && !files_exist(qw(/usr/bin/kooka)) && ($::isInstall || @@ -2650,10 +2650,10 @@ sub setup_common { $makemodel !~ /HP\s+(DeskJet|dj)\s*450/i) { # Install SANE if (!$::testing && - (!files_exist(qw(/usr/bin/scanimage - /usr/bin/xscanimage - /etc/sane.d/dll.conf - /usr/lib/libsane-hpoj.so.1)) || + (!files_exist("/usr/bin/scanimage", + "/usr/bin/xscanimage", + "/etc/sane.d/dll.conf", + "/usr/$lib/libsane-hpoj.so.1") || (!files_exist(qw(/usr/bin/xsane)) && !files_exist(qw(/usr/bin/kooka)) && ($::isInstall || @@ -5130,8 +5130,8 @@ sub mainwindow_interactive { val => N("CUPS configuration") } : ()), ($printer->{expert} && (files_exist(qw(/usr/bin/pdq)) || - files_exist(qw(/usr/lib/filters/lpf - /usr/sbin/lpd))) ? + files_exist("/usr/$lib/filters/lpf", + "/usr/sbin/lpd")) ? { clicked_may_quit => sub { # Save the cursor position |