updated to something similar to what you mentioned so you now get after running Rake outside the RPM's build:

if File.exist?('config/' + config_filename)
  CONFIG_FILE = 'config/' + config_filename   
else
  CONFIG_FILE = '/usr/local/etc/foreman/' + config_filename
end