summaryrefslogtreecommitdiffstats
path: root/lib/Sbuild/Sysconfig.pm.in
blob: 8f5cbb5bdd7b51caa7ff1f61864576c1282a45d2 (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
#
# Sysconfig.pm: system configuration for sbuild
# Copyright © 2007-2008 Roger Leigh <rleigh@debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see
# <http://www.gnu.org/licenses/>.
#
#######################################################################

package Sbuild::Sysconfig;

use strict;
use warnings;

BEGIN {
    use Exporter ();
    our (@ISA, @EXPORT_OK);

    @ISA = qw(Exporter);

    @EXPORT_OK = qw($version $release_date $compat_mode %paths %programs);
}

our $version = "@PACKAGE_VERSION@";
our $release_date = "@RELEASE_DATE@";
our $compat_mode = @SBUILD_COMPAT@;

# Paths
my $prefix = "@prefix@";
my $exec_prefix = "@exec_prefix@";
# Depend on prefix
my $includedir = "@includedir@";
my $localstatedir = "@localstatedir@";
my $sharedstatedir = "@sharedstatedir@";
my $sysconfdir = "@sysconfdir@";
# Depend on exec_prefix
my $bindir = "@bindir@";
my $libdir = "@libdir@";
my $libexecdir = "@libexecdir@";
my $sbindir = "@sbindir@";
# Data directories
my $datarootdir = "@datarootdir@";
my $datadir = "@datadir@";
my $localedir = "@localedir@";
my $mandir = "@mandir@";

our %paths = (
    'PREFIX' => $prefix,
    'EXEC_PREFIX' => $exec_prefix,
    'INCLUDEDIR' => $includedir,
    'LOCALSTATEDIR' => $localstatedir,
    'SHAREDSTATEDIR' => $sharedstatedir,
    'SYSCONFDIR' => $sysconfdir,
    'BINDIR' => $bindir,
    'LIBDIR' => $libdir,
    'LIBEXECDIR' => $libexecdir,
    'SBINDIR' => $sbindir,
    'DATAROOTDIR' => $datarootdir,
    'DATADIR' => $datadir,
    'LOCALEDIR' => $localedir,
    'MANDIR' => $mandir,
    'BUILDD_CONF' => "@BUILDD_CONF@",
    'BUILDD_SYSCONF_DIR' => "@BUILDD_SYSCONF_DIR@",
    'SBUILD_CONF' => "@SBUILD_CONF@",
    'SBUILD_DATA_DIR' => "@SBUILD_DATA_DIR@",
    'SBUILD_LIBEXEC_DIR' => "@SBUILD_LIBEXEC_DIR@",
    'SBUILD_LOCALSTATE_DIR' => "$localstatedir/lib/sbuild",
    'SBUILD_SYSCONF_DIR' => "@SBUILD_SYSCONF_DIR@",
    'SCHROOT_CONF' => "@SCHROOT_CONF@",
    'SCHROOT_SYSCONF_DIR' => "@SCHROOT_SYSCONF_DIR@"
);

1;