File: makeDefaults.in

package info (click to toggle)
foomatic-db-engine 4.0.13-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,972 kB
  • sloc: perl: 12,170; ansic: 6,958; python: 1,139; makefile: 248; sh: 215; xml: 83
file content (194 lines) | stat: -rw-r--r-- 6,046 bytes parent folder | download | duplicates (9)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#!@PERL@ -w

use vars qw/$opt_inplace/;
use Getopt::Long;
GetOptions('inplace');

my $filename = 'lib/Foomatic/Defaults.pm'; 
my $pwd = `pwd`;
chomp $pwd;

open DEFAULTS, ">$filename" or die "Can't open $filename!";

print DEFAULTS <<'EOH';
package Foomatic::Defaults;

use vars qw(@EXPORT @EXPORT_OK $libdir $bindir $sysdeps $DEBUG);

require Exporter;
@ISA = qw/Exporter/;
@EXPORT = qw($libdir $bindir $sysdeps);
@EXPORT_OK = qw($DEBUG);

EOH

    if (! $opt_inplace) {
	print DEFAULTS <<EOF;
# Debug flag; set this to enable debugging messages from Perl modules.
\$DEBUG = '$ENV{DEBUG}';

# Library directory; typically /usr/share/foomatic or somesuch.
\$libdir = '$ENV{LIBDIR}';
\$libdir = \$ENV\{FOOMATICDB\} if \$ENV\{FOOMATICDB\};

# Binary directory; typically /usr/bin or somesuch.
\$bindir = '$ENV{BINDIR}';

# System configuration list
\$sysdeps = {
    'foo-etc'    => '$ENV{ETCDIR}',
    'foomatic-rip'=> '$ENV{FOOMATIC_RIP}',
    'lpd-dir'    => '$ENV{LPD_SPOOL}',
    'lpd-log'    => '$ENV{LPD_LOG}',
    'lpd-bin'    => '$ENV{LPD_BIN}',
    'lpd-pcap'   => '$ENV{PRINTCAP}',
    'lprng-conf' => '$ENV{LPRNG_CONF}',
    'lpd-lpr'    => '$ENV{LPD_LPR}',
    'lpd-lpq'    => '$ENV{LPD_LPQ}',
    'lpd-lprm'   => '$ENV{LPD_LPRM}',
    'lpd-lpc'    => '$ENV{LPD_LPC}',
    'lprng-checkpc' => '$ENV{LPRNG_CHECKPC}',
    'cups-etc'   => '$ENV{CUPS_ETC}',
    'cups-admin' => '$ENV{CUPS_ADMIN}',
    'cups-lpstat' => '$ENV{CUPS_LPSTAT}',
    'cups-ppds'  => '$ENV{CUPS_PPDS}',
    'cups-filters' => '$ENV{CUPS_FILTERS}',
    'cups-backends' => '$ENV{CUPS_BACKENDS}',
    'cups-driver' => '$ENV{LIB_CUPS}/driver',
    'cups-pconf' => '$ENV{CUPS_PCONF}',
    'cups-lpr'   => '$ENV{CUPS_LPR}',
    'cups-lpq'   => '$ENV{CUPS_LPQ}',
    'cups-lprm'  => '$ENV{CUPS_LPRM}',
    'cups-lpc'   => '$ENV{CUPS_LPC}',
    'cups-lp'    => '$ENV{CUPS_LP}',
    'cups-cancel' => '$ENV{CUPS_CANCEL}',
    'cups-enable' => '$ENV{CUPS_ENABLE}',
    'cups-disable' => '$ENV{CUPS_DISABLE}',
    'cups-accept' => '$ENV{CUPS_ACCEPT}',
    'cups-reject' => '$ENV{CUPS_REJECT}',
    'cups-lpmove' => '$ENV{CUPS_LPMOVE}',
    'cups-lpoptions' => '$ENV{CUPS_LPOPTIONS}',
    'cups-lpinfo' => '$ENV{CUPS_LPINFO}',
    'pdq-conf'   => '$ENV{PDQ_CONF}',
    'pdq-printrc' => '$ENV{PDQ_PRINTRC}',
    'pdq-foomatic' => '$ENV{PDQ_FOOMATIC}',
    'pdq-print'  => '$ENV{PDQ_PRINT}',
    'pdq-jobdir' => '$ENV{PDQ_JOBDIR}',
    'ppr-pprd' => '$ENV{PPR_PPRD}',
    'ppr-interfaces' => '$ENV{PPR_INTERFACES}',
    'ppr-ppdfiles' => '$ENV{PPR_PPDFILES}',
    'ppr-etc' => '$ENV{PPR_ETC}',
    'ppr-ppr' => '$ENV{PPR_PPR}',
    'ppr-ppad' => '$ENV{PPR_PPAD}',
    'ppr-ppop' => '$ENV{PPR_PPOP}',
    'direct-etc' => '$ENV{DIRECT_ETC}',
    'direct-config' => '$ENV{DIRECT_CONFIG}',
    'nc' => '$ENV{NC}',
    'rlpr' => '$ENV{RLPR}',
    'smbclient' => '$ENV{SMBCLIENT}',
    'nprint' => '$ENV{NPRINT}',
    'ptal-connect' => '$ENV{PTAL_CONNECT}',
    'ptal-pipes' => '$ENV{PTAL_PIPES}',
    'mtink-pipes' => '$ENV{MTINK_PIPES}',
    'cat' => '$ENV{CAT}',
    'gzip' => '$ENV{GZIP}',
    'wget' => '$ENV{WGET}',
    'curl' => '$ENV{CURL}'
};

EOF

} else {

    # special inplace config; using local etc for testing, etc

    print DEFAULTS <<EOP;

# Debug flag; set this to enable debugging messages from Perl modules.
\$DEBUG = '$ENV{DEBUG}';

# Library directory; typically /usr/share/foomatic or somesuch.
\$libdir = '$pwd/$ENV{LOCAL_LIBDIR}';
\$libdir = \$ENV\{FOOMATICDB\} if \$ENV\{FOOMATICDB\};

# Binary directory; typically /usr/bin or somesuch.
\$bindir = '$pwd';

# Directory for the generated files
#\$cachedir = '$pwd/cache';

# System configuration list
\$sysdeps = {
    'foo-etc'    => '$pwd/etc',
    'foomatic-rip'  => '$pwd/$ENV{LOCAL_FOOMATIC_RIP}',
    'lpd-dir'    => '$ENV{LPD_SPOOL}',
    'lpd-log'    => '$ENV{LPD_LOG}',
    'lpd-bin'    => '$ENV{LPD_BIN}',
    'lpd-pcap'   => '$pwd/etc/printcap',
    'lprng-conf' => '$ENV{LPRNG_CONF}',
    'lpd-lpr'    => '$ENV{LPD_LPR}',
    'lpd-lpq'    => '$ENV{LPD_LPQ}',
    'lpd-lprm'   => '$ENV{LPD_LPRM}',
    'lpd-lpc'    => '$ENV{LPD_LPC}',
    'lprng-checkpc' => '$ENV{LPRNG_CHECKPC}',
    'cups-etc'   => '$ENV{CUPS_ETC}',
    'cups-admin' => '$ENV{CUPS_ADMIN}',
    'cups-lpstat' => '$ENV{CUPS_LPSTAT}',
    'cups-ppds'  => '$ENV{CUPS_PPDS}',
    'cups-filters' => '$ENV{CUPS_FILTERS}',
    'cups-backends' => '$ENV{CUPS_BACKENDS}',
    'cups-driver' => '$ENV{LIB_CUPS}/driver',
    'cups-pconf' => '$ENV{CUPS_PCONF}',
    'cups-lpr'   => '$ENV{CUPS_LPR}',
    'cups-lpq'   => '$ENV{CUPS_LPQ}',
    'cups-lprm'  => '$ENV{CUPS_LPRM}',
    'cups-lpc'   => '$ENV{CUPS_LPC}',
    'cups-lp'    => '$ENV{CUPS_LP}',
    'cups-cancel' => '$ENV{CUPS_CANCEL}',
    'cups-enable' => '$ENV{CUPS_ENABLE}',
    'cups-disable' => '$ENV{CUPS_DISABLE}',
    'cups-accept' => '$ENV{CUPS_ACCEPT}',
    'cups-reject' => '$ENV{CUPS_REJECT}',
    'cups-lpmove' => '$ENV{CUPS_LPMOVE}',
    'cups-lpoptions' => '$ENV{CUPS_LPOPTIONS}',
    'cups-lpinfo' => '$ENV{CUPS_LPINFO}',
    'pdq-conf'   => '$ENV{PDQ_CONF}',
    'pdq-printrc' => '$ENV{PDQ_PRINTRC}',
    'pdq-foomatic' => '$ENV{PDQ_FOOMATIC}',
    'pdq-print'  => '$ENV{PDQ_PRINT}',
    'pdq-jobdir' => '$ENV{PDQ_JOBDIR}',
    'ppr-pprd' => '$ENV{PPR_PPRD}',
    'ppr-interfaces' => '$ENV{PPR_INTERFACES}',
    'ppr-ppdfiles' => '$ENV{PPR_PPDFILES}',
    'ppr-etc' => '$ENV{PPR_ETC}',
    'ppr-ppr' => '$ENV{PPR_PPR}',
    'ppr-ppad' => '$ENV{PPR_PPAD}',
    'ppr-ppop' => '$ENV{PPR_PPOP}',
    'direct-etc' => '$ENV{DIRECT_ETC}',
    'direct-config' => '$ENV{DIRECT_CONFIG}',
    'nc' => '$ENV{NC}',
    'rlpr' => '$ENV{RLPR}',
    'smbclient' => '$ENV{SMBCLIENT}',
    'nprint' => '$ENV{NPRINT}',
    'ptal-connect' => '$ENV{PTAL_CONNECT}',
    'ptal-pipes' => '$ENV{PTAL_PIPES}',
    'mtink-pipes' => '$ENV{MTINK_PIPES}',
    'cat' => '$ENV{CAT}',
    'gzip' => '$ENV{GZIP}',
    'wget' => '$ENV{WGET}',
    'curl' => '$ENV{CURL}'
};

EOP

}

close DEFAULTS;

# Emacs tabulator/indentation

### Local Variables:
### tab-width: 8
### perl-indent-level: 4
### End: