summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-10-01 19:52:28 +0100
committerPeter Powell <petpow@saberuk.com>2014-12-07 22:36:42 +0000
commit541a66de7adbfe57dd4d3e998e8cc0db5585a266 (patch)
treeec7c11b5a1b1e5f47a7d6d974cc94bc5db10fdb7 /configure
parent2adb94db3032332ad2235aa032bb195aba89687c (diff)
Implement support for distribution specific version labels.
This will help us determine whether a version has been packaged by a downstream distribution who quite often make arbitrary changes which are a pain to provide support for. Debian, we're looking at you.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure35
1 files changed, 22 insertions, 13 deletions
diff --git a/configure b/configure
index a9a97dca5..2a1d260f5 100755
--- a/configure
+++ b/configure
@@ -47,6 +47,7 @@ my ($opt_binary_dir,
$opt_config_dir,
$opt_data_dir,
$opt_disable_interactive,
+ $opt_distribution_label,
$opt_gid,
$opt_log_dir,
$opt_manual_dir,
@@ -70,18 +71,19 @@ GetOptions(
'help' => \&cmd_help,
'update' => \&cmd_update,
- 'disable-interactive' => \$opt_disable_interactive,
- 'binary-dir=s' => \$opt_binary_dir,
- 'config-dir=s' => \$opt_config_dir,
- 'data-dir=s' => \$opt_data_dir,
- 'gid=s' => \$opt_gid,
- 'log-dir=s' => \$opt_log_dir,
- 'manual-dir=s' => \$opt_manual_dir,
- 'module-dir=s' => \$opt_module_dir,
- 'prefix=s' => \$opt_prefix,
- 'socketengine=s' => \$opt_socketengine,
- 'system' => \$opt_system,
- 'uid=s' => \$opt_uid,
+ 'disable-interactive' => \$opt_disable_interactive,
+ 'distribution-label=s' => \$opt_distribution_label,
+ 'binary-dir=s' => \$opt_binary_dir,
+ 'config-dir=s' => \$opt_config_dir,
+ 'data-dir=s' => \$opt_data_dir,
+ 'gid=s' => \$opt_gid,
+ 'log-dir=s' => \$opt_log_dir,
+ 'manual-dir=s' => \$opt_manual_dir,
+ 'module-dir=s' => \$opt_module_dir,
+ 'prefix=s' => \$opt_prefix,
+ 'socketengine=s' => \$opt_socketengine,
+ 'system' => \$opt_system,
+ 'uid=s' => \$opt_uid,
# TODO: when the modulemanager rewrite is done these should be removed.
'disable-extras=s@' => \@opt_disableextras,
@@ -106,6 +108,7 @@ our $interactive = !(
defined $opt_config_dir ||
defined $opt_data_dir ||
defined $opt_disable_interactive ||
+ defined $opt_distribution_label ||
defined $opt_gid ||
defined $opt_log_dir ||
defined $opt_manual_dir ||
@@ -178,6 +181,12 @@ if (defined $opt_socketengine) {
}
}
+# If the user has specified a distribution label then we use it in
+# place of the label from src/version.sh or Git.
+if (defined $opt_distribution_label) {
+ $version{LABEL} = $opt_distribution_label;
+}
+
if (defined $opt_system) {
$config{BASE_DIR} = $opt_prefix || '/var/lib/inspircd';
$config{BINARY_DIR} = $opt_binary_dir || '/usr/sbin';
@@ -292,7 +301,7 @@ if (<src/modules/m_ssl_*.cpp> && prompt_bool $interactive, 'Would you like to ge
}
write_configure_cache %config if $interactive;
-parse_templates \%config, \%compiler;
+parse_templates \%config, \%compiler, \%version;
print_format <<"EOM";