diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 0616ad0e..49211161 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,21 @@ +free-poker-tools (0.20.904-2) unstable; urgency=low + + * On fpdb start, copy example HUD_config.xml in place if none is present + + -- Mika Bostrom Tue, 17 Aug 2010 08:23:31 +0300 + +free-poker-tools (0.20.904-1) unstable; urgency=low + + * .904 snapshot release + + -- Mika Bostrom Sat, 14 Aug 2010 09:24:25 +0300 + +free-poker-tools (0.20.903-1) unstable; urgency=low + + * .903 snapshot release + + -- Mika Bostrom Tue, 03 Aug 2010 17:47:41 +0300 + free-poker-tools (0.20.902-1) unstable; urgency=low * New snapshot release; .901 was broken for FTP diff --git a/packaging/debian/rules b/packaging/debian/rules index 9106c7bc..58b1136b 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -27,7 +27,6 @@ install: build cp pyfpdb/*.pyw debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/ # Remove scripts that are only useful in win32 rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb//windows_make_bats.py - rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/makeexe.py rm debian/$(PACKAGE)/usr/lib/python2.6/site-packages/fpdb/py2exe_setup.py diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 53ccaa56..29b74b54 100755 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -101,6 +101,21 @@ def get_config(file_name, fallback = True): if not fallback: return (False,False) +# Example configuration for debian package + if os.name == 'posix': + # If we're on linux, try to copy example from the place + # debian package puts it; get_default_config_path() creates + # the config directory for us so there's no need to check it + # again + example_path = '/usr/share/python-fpdb/' + file_name + '.example' + try: + shutil.copyfile(example_path, config_path) + msg = 'Configuration file created: %s\n' % config_path + logging.info(msg) + return (config_path,False) + except IOError: + pass + # OK, fall back to the .example file, should be in the start dir if os.path.exists(file_name + ".example"): try: