diff options
author | Francois Pons <fpons@mandriva.com> | 2000-09-04 16:02:53 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-09-04 16:02:53 +0000 |
commit | d1f6612b2c28eb3014e65c200fb396bc318e4e09 (patch) | |
tree | 17d9d517a61262c7e684391cfce07642081f3e18 | |
parent | 29958ca6b88d9aa9c9305a18256f8c7092114cde (diff) | |
download | drakx-backup-do-not-use-d1f6612b2c28eb3014e65c200fb396bc318e4e09.tar drakx-backup-do-not-use-d1f6612b2c28eb3014e65c200fb396bc318e4e09.tar.gz drakx-backup-do-not-use-d1f6612b2c28eb3014e65c200fb396bc318e4e09.tar.bz2 drakx-backup-do-not-use-d1f6612b2c28eb3014e65c200fb396bc318e4e09.tar.xz drakx-backup-do-not-use-d1f6612b2c28eb3014e65c200fb396bc318e4e09.zip |
*** empty log message ***
-rw-r--r-- | perl-install/ChangeLog | 8 | ||||
-rw-r--r-- | perl-install/printer.pm | 2 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 26 | ||||
-rw-r--r-- | tools/Makefile | 4 |
4 files changed, 31 insertions, 9 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 974ed80da..905162589 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,11 @@ +2000-09-04 François Pons <fpons@mandrakesoft.com> + + * printerdrake.pm: added pnm2ppa and lm110 support in cups + configuration. probe for printer device (parallel) and try to + install usb for printer. + * printer.pm: removed local printer configuration for cups (keep + only local configuration using URI). + 2000-09-01 François Pons <fpons@mandrakesoft.com> * Xconfigurator.pm: fixes to configure XF86Config-4 when XFree-3.3 diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 40c034282..4338afed8 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -44,7 +44,7 @@ sub default_spooldir($) { "/var/spool/lpd/" . default_queue($_[0]) } sub default_printer_type($) { ($_[0]{mode} eq /cups/ && "URI_") . "LOCAL" } sub printer_type($) { for ($_[0]{mode}) { - /cups/ && return @printer_type_inv{qw(URI_LOCAL URI_NET LOCAL REMOTE SMB)}; + /cups/ && return @printer_type_inv{qw(URI_LOCAL URI_NET REMOTE SMB)}; /lpr/ && return @printer_type_inv{qw(LOCAL REMOTE SMB NCP)}; } } diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index fae5f3cf5..0570bd693 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -48,13 +48,9 @@ sub setup_local($$$) { _("Printer Device") => {val => \$printer->{DEVICE}, list => \@port } ], ); - #- make the DeviceURI from DEVICE. - $printer->{DeviceURI} = ($printer->{DEVICE} =~ /usb/ ? "usb:" : "parallel:") . $printer->{DEVICE}; - - #- select right DBENTRY according to device selected. #- TODO with cups (keep all configuration files) foreach (@parport) { $printer->{DEVICE} eq $_->{port} or next; - $printer->{DBENTRY} = $printer::descr_to_db{common::bestMatchSentence2($parport[0]{val}{DESCRIPTION}, + $printer->{DBENTRY} = $printer::descr_to_db{common::bestMatchSentence2($_->{val}{DESCRIPTION}, @printer::entry_db_description)}; } 1; @@ -63,12 +59,26 @@ _("Printer Device") => {val => \$printer->{DEVICE}, list => \@port } ], sub setup_uri_local($$$) { my ($printer, $in, $install) = @_; + my @str = (); + my @parport = auto_detect($in); + foreach (@parport) { + $_->{val}{DESCRIPTION} and push @str, _("A printer, model \"%s\", has been detected on ", + $_->{val}{DESCRIPTION}) . $_->{port}; + } + my @direct_uri = printer::get_direct_uri(); + @parport and $printer->{DeviceURI} = ($parport[0]{port} =~ /usb/ ? "usb:" : "parallel:") . $parport[0]{port}; + return if !$in->ask_from_entries_refH(_("Local Printer Device (URI)"), _("What URI device is your printer connected to -(note that parallel:/dev/lp0 is equivalent to LPT1:)?"), [ +(note that parallel:/dev/lp0 is equivalent to LPT1:)?\n") . (join "\n", @str), [ _("Printer Device URI") => { val => \$printer->{DeviceURI}, list => \@direct_uri } ], ); + + foreach (@parport) { + (split ':', $printer->{DeviceURI})[1] eq $_->{port} or next; + $printer->{cupsDescr} = common::bestMatchSentence2($_->{val}{DESCRIPTION}, keys %printer::descr_to_ppd); + } 1; } @@ -176,6 +186,10 @@ sub setup_gsdriver_cups($$$;$) { [ keys %printer::descr_to_ppd ], $printer->{cupsDescr}) or return; $printer->{cupsPPD} = $printer::descr_to_ppd{$printer->{cupsDescr}}; + #- install additional filter according to PPD files. + $printer->{cupsPPD} =~ /-pnm2ppa\.ppd/ and &$install('pnm2ppa'); + $printer->{cupsPPD} =~ /-lm1100\.ppd/ and &$install('Lexmark-1100-printer-driver__lm1100'); + $printer->{complete} = 1; printer::copy_printer_params($printer, $printer->{configured}{$printer->{QUEUE}} ||= {}); printer::configure_queue($printer); diff --git a/tools/Makefile b/tools/Makefile index 26dd2a2fa..375ed0551 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -13,9 +13,9 @@ $(DIRS): make -C $@ install: - install make_mdkinst_stage2 gencompss $(ROOTDEST)/misc + install make_mdkinst_stage2 $(ROOTDEST)/misc cd /usr/bin ; install packdrake $(ROOTDEST)/misc || { echo "packdrake is missing"; exit 1; } - cd /usr/bin ; install gendepslist2 rpm2header genhdlist_cz2 $(ROOTDEST)/misc || { echo "install rpmtools first!" ; exit 1; } + cd /usr/bin ; install genbasefiles rpm2header genhdlist_cz2 $(ROOTDEST)/misc || { echo "install rpmtools first!" ; exit 1; } mkdir -p $(DEST)/usr/bin xhost+: %: %.c |