Project

General

Profile

Download (2.52 KB) Statistics
| Branch: | Tag: | Revision:
# post-config.rb - setup config generation

#--
# LdapShadows, a Medium-level LDAP Access Library and Tool.
# Copyright (c) 2009-2010 Marc Dequènes (Duck) <Duck@DuckCorp.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 3 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/>.
#++

# General header.
header = <<HEADER
# config_setup.rb - Coin-diff setup configuration

#--
# LdapShadows, a Medium-level LDAP Access Library and Tool.
# Copyright (c) 2009-2010 Marc Dequènes (Duck) <Duck@DuckCorp.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 3 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/>.
#++

# This file is automatically generated by the installer.
# Do not edit by hand.

HEADER

# Generate config_setup.rb containing general compile/setup time configuration
# information (in the LdapShadows::Config module).
File.open('lib/ldap_shadows/config_setup.rb', 'w') do |file|

file.print header
file.print <<-CONFIG
module LdapShadows
class Config
BIN_DIR = '#{config('bindir')}'
CFG_DIR = '#{File.join(config('sysconfdir'), 'ldap_shadows')}'
DATA_DIR = '#{File.join(config('datadir'), 'ldap_shadows')}'
LIB_DIR = '#{config('rbdir')}'
LOG_DIR = '#{File.join(config('localstatedir'), 'log', 'ldap_shadows')}'
RUN_DIR = '#{File.join(config('localstatedir'), 'run', 'ldap_shadows')}'
VAR_DIR = '#{File.join(config('localstatedir'), 'lib', 'ldap_shadows')}'
L10N_DIR = '#{File.join(config('datadir'), 'locale')}'
end
end
CONFIG

end # File.open
(6-6/7)