root/post-config.rb @ ba350c4d
89d8bebc | Marc Dequènes (Duck) | # post-config.rb - setup config generation
|
|
#--
|
|||
# LdapShadows, a Medium-level LDAP Access Library and Tool.
|
|||
# Copyright (c) 2009 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
|
|||
1f9bfec2 | Marc Dequènes (Duck) | # config_setup.rb - Coin-diff setup configuration
|
|
89d8bebc | Marc Dequènes (Duck) | ||
#--
|
|||
# LdapShadows, a Medium-level LDAP Access Library and Tool.
|
|||
# Copyright (c) 2009 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
|
|||
f8ab8967 | Marc Dequènes (Duck) | # Generate config_setup.rb containing general compile/setup time configuration
|
|
# information (in the LdapShadows::Config module).
|
|||
1f9bfec2 | Marc Dequènes (Duck) | File.open('lib/ldap_shadows/config_setup.rb', 'w') do |file|
|
|
89d8bebc | Marc Dequènes (Duck) | ||
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
|