Imported Upstream version 3.3.3
[debian/amanda] / perl / Amanda / Paths.pm.in
1 # vim:ft=perl
2 # Copyright (c) 2007-2012 Zmanda, Inc.  All Rights Reserved.
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 # for more details.
13 #
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 #
18 # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
19 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
20
21 package Amanda::Paths;
22
23 =head1 NAME
24
25 Amanda::Paths - perl access to build-time configuration paths
26
27 =head1 SYNOPSIS
28
29   use Amanda::Paths;
30
31   my $filename = "$amlibexecdir/foo/bar";
32
33 This package is a means of getting all of the necessary variables provided
34 by configure into Perl scripts, without a bunch of boilerplate, and without
35 requiring config.status substitution for every .pm file.
36
37 All of the variables in @EXPORT will be automatically imported into
38 your module's namespace.  See the source, rather than the perldoc,
39 to find out what variables are available.
40
41 =cut
42
43 use Exporter;
44 @ISA = qw( Exporter );
45
46 @EXPORT = qw(
47     $prefix
48     $exec_prefix
49     $bindir
50     $sbindir
51     $libexecdir
52     $amlibexecdir
53     $mandir
54     $datarootdir
55     $sysconfdir
56     $amdatadir
57     $localstatedir
58
59     $AMANDA_TMPDIR
60     $CONFIG_DIR
61     $AMANDA_DBGDIR
62     $APPLICATION_DIR
63     $GNUTAR_LISTED_INCREMENTAL_DIR
64 );
65
66 # the 'warnings' pragma doesn't recognized exported variables as "used", and generates warnings
67 # for variables only used once.  We turn it off for this module.
68 no warnings;
69
70 ## basic filesystem layout
71
72 # these need to go in order, due to the way autoconf sets these dirs up
73 $prefix = "@prefix@";
74 $exec_prefix = "@exec_prefix@";
75 $bindir = "@bindir@";
76 $sbindir = "@sbindir@";
77 $libexecdir = "@libexecdir@";
78 $amlibexecdir = "@amlibexecdir@";
79 $mandir = "@mandir@";
80 # (config.status worries if it doesn't see this:)
81 $datarootdir = "@datarootdir@";
82 $sysconfdir = "@sysconfdir@";
83 $amdatadir = "@amdatadir@";
84 $localstatedir = "@localstatedir@";
85
86 ## amanda configuration directories
87
88 $AMANDA_TMPDIR = "@AMANDA_TMPDIR@";
89 $CONFIG_DIR = "@CONFIG_DIR@";
90 $AMANDA_DBGDIR = "@AMANDA_DBGDIR@";
91 $APPLICATION_DIR = "@APPLICATION_DIR@";
92 $GNUTAR_LISTED_INCREMENTAL_DIR = "@GNUTAR_LISTED_INCREMENTAL_DIR@";
93
94 1;