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