summaryrefslogtreecommitdiffstats
path: root/lib/Sbuild/Sysconfig.pm.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sbuild/Sysconfig.pm.in')
-rw-r--r--lib/Sbuild/Sysconfig.pm.in84
1 files changed, 84 insertions, 0 deletions
diff --git a/lib/Sbuild/Sysconfig.pm.in b/lib/Sbuild/Sysconfig.pm.in
new file mode 100644
index 0000000..8f5cbb5
--- /dev/null
+++ b/lib/Sbuild/Sysconfig.pm.in
@@ -0,0 +1,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;