45 lines
1.4 KiB
Ruby
45 lines
1.4 KiB
Ruby
# = post-config.rb - setup config generation
|
|
#
|
|
# Copyright (C) 2005 Paul van Tilburg <paul@luon.net>
|
|
#
|
|
# Ildus 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.
|
|
|
|
# General header.
|
|
header = <<HEADER
|
|
# = ildus/config.rb - Ildus setup configuration
|
|
#
|
|
# Copyright (C) 2005 Paul van Tilburg <paul@luon.net>
|
|
#
|
|
# Ildus 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 file is automatically generated by the installer.
|
|
# Do not edit by hand!
|
|
|
|
HEADER
|
|
|
|
# Generate config.rb containing general compile/setup time configuration
|
|
# information (in the Ildus::Config module).
|
|
File.open('config.rb', 'w') do |file|
|
|
|
|
file.print header
|
|
file.print <<-CONFIG
|
|
module Ildus::Config
|
|
|
|
BIN_DIR = '#{config('bindir')}'
|
|
CFG_DIR = '#{config('sysconfdir')}'
|
|
LIB_DIR = '#{config('rbdir')}'
|
|
LOG_DIR = '#{File.join(config('localstatedir'), 'log', 'ildusd')}'
|
|
RUN_DIR = '#{File.join(config('localstatedir'), 'run', 'ildusd')}'
|
|
VAR_DIR = '#{File.join(config('localstatedir'), 'lib', 'ildusd')}'
|
|
|
|
end # module Ildus::Config
|
|
CONFIG
|
|
|
|
end # File.open
|