1 # This program is free software; you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation; either version 2 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 Dpkg - module with core variables
24 The Dpkg module provides a set of variables with information concerning
25 this system installation.
32 our $VERSION = '1.03';
52 use Exporter qw(import);
60 Contains the name of the current program.
62 =item $Dpkg::PROGVERSION
64 Contains the version of the dpkg suite.
68 Contains the name of the system GNU make program.
72 Contains the name of the system GNU tar program.
74 =item $Dpkg::PROGPATCH
76 Contains the name of the system GNU patch program (or another implementation
77 that is directory traversal resistant).
81 Contains the path to the dpkg system configuration directory.
85 Contains the path to the dpkg database directory.
89 Contains the path to the dpkg methods and plugins directory.
93 Contains the path to the dpkg architecture tables directory.
99 our ($PROGNAME) = $0 =~ m{(?:.*/)?([^/]*)};
101 # The following lines are automatically fixed at install time
102 our $PROGVERSION = '1.18.x';
103 our $PROGMAKE = $ENV{DPKG_PROGMAKE} // 'make';
104 our $PROGTAR = $ENV{DPKG_PROGTAR} // 'tar';
105 our $PROGPATCH = $ENV{DPKG_PROGPATCH} // 'patch';
107 our $CONFDIR = '/etc/dpkg';
108 our $ADMINDIR = '/var/lib/dpkg';
112 $DATADIR = $ENV{DPKG_DATADIR} if defined $ENV{DPKG_DATADIR};
114 # XXX: Backwards compatibility, to be removed on VERSION 2.00.
115 ## no critic (Variables::ProhibitPackageVars)
116 our $version = $PROGVERSION;
117 our $admindir = $ADMINDIR;
118 our $dpkglibdir = $LIBDIR;
119 our $pkgdatadir = $DATADIR;
124 =head2 Version 1.03 (dpkg 1.18.24)
126 New variable: $PROGPATCH.
128 =head2 Version 1.02 (dpkg 1.18.11)
130 New variable: $PROGTAR, $PROGMAKE.
132 =head2 Version 1.01 (dpkg 1.17.0)
134 New variables: $PROGNAME, $PROGVERSION, $CONFDIR, $ADMINDIR, $LIBDIR and
137 Deprecated variables: $version, $admindir, $dpkglibdir and $pkgdatadir.
139 =head2 Version 1.00 (dpkg 1.15.6)
141 Mark the module as public.