summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Graumann <johannes_graumann@web.de>2012-10-15 22:41:34 +0300
committerPaul Klos <kolab@klos2day.nl>2012-10-24 07:34:47 -0400
commit89aada4795207c870da0b2cf9011d450685266f5 (patch)
tree1170568c699aee6f142208023defade06d3df510
parenta84b5045a4f7513fcd3931108d1a8fdf435db48d (diff)
downloadpykolab-89aada4795207c870da0b2cf9011d450685266f5.tar.gz
Debianize: Adapt to Debians use of roundcube rather than roundcubemail;
(cherry picked from commit 87a93c748fb5b1591a9e26e6cd377e22f54706d0)
-rw-r--r--pykolab/setup/setup_roundcube.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 8361d8c..7810393 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -119,14 +119,13 @@ def execute(*args, **kw):
t = Template(template_definition, searchList=[rc_settings])
log.debug(
- _("Successfully compiled template %r, writing out to %r") % (
- template_file,
- '/etc/roundcubemail/%s' % (want_file)
- ),
+ _("Successfully compiled template %r, writing out to %r") % (template_file, want_file),
level=8
)
-
- fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
+ if os.path.isdir('/etc/roundcubemail'):
+ fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
+ elif os.path.isdir('/etc/roundcube'):
+ fp = open('/etc/roundcube/%s' % (want_file), 'w')
fp.write(t.__str__())
fp.close()
@@ -143,14 +142,18 @@ def execute(*args, **kw):
if not schema_filepath in schema_files:
schema_files.append(schema_filepath)
- for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/calendar/drivers/kolab/'):
+ if os.path.isdir('/usr/share/roundcubemail'):
+ rcpath = '/usr/share/roundcubemail/'
+ elif os.path.isdir('/usr/share/roundcube'):
+ rcpath = '/usr/share/roundcube/'
+ for root, directories, filenames in os.walk(rcpath + 'plugins/calendar/drivers/kolab/'):
for filename in filenames:
if filename.startswith('mysql') and filename.endswith('.sql'):
schema_filepath = os.path.join(root,filename)
if not schema_filepath in schema_files:
schema_files.append(schema_filepath)
- for root, directories, filenames in os.walk('/usr/share/roundcubemail/plugins/libkolab/'):
+ for root, directories, filenames in os.walk(rcpath + 'plugins/libkolab/'):
for filename in filenames:
if filename.startswith('mysql') and filename.endswith('.sql'):
schema_filepath = os.path.join(root,filename)