diff --git a/WAPT/control b/WAPT/control index 946be80..ceeabc4 100644 --- a/WAPT/control +++ b/WAPT/control @@ -1,11 +1,11 @@ -package : fws-sogo-addons +package : fws-thunderbird-sogo-addons version : 1 architecture : all section : base priority : optional maintainer : Daniel Berteaud description : SOGo addons for Thunderbird -depends : fws-thunderbird, fws-7zip +depends : fws-thunderbird,fws-7zip conflicts : maturity : DEV locale : @@ -20,7 +20,7 @@ description_fr : description_pl : description_de : description_es : -audit_schedule : 4w +audit_schedule : 2d editor : keywords : licence : diff --git a/setup.py b/setup.py index fdebb3a..fe4fd44 100644 --- a/setup.py +++ b/setup.py @@ -25,41 +25,42 @@ integrator_version = '60.0.0' def install(): for extension in ['connector','integrator']: - if not isdir(makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-' + extension)): - mkdirs(makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-' + extension)) + if isdir(makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension)): + remove_tree(makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension)) + mkdirs(makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension)) # connector can be extracted as is - run('"%s" x -y -o"%s" sogo-connector-%s.xpi' % (makepath(programfiles,'7-Zip','7z.exe'), makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-connector'), connector_version)) + run('"%s" x -y -o"%s" sogo-connector-%s.xpi' % (makepath(programfiles,'7-Zip','7z.exe'), makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-connector@inverse.ca'), connector_version)) # Integrator must be customized, so first extract it - run('"%s" x -y -o"%s" sogo-integrator-%s-sogo-demo.xpi' % (makepath(programfiles,'7-Zip','7z.exe'), makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-integrator'), integrator_version)) + run('"%s" x -y -o"%s" sogo-integrator-%s-sogo-demo.xpi' % (makepath(programfiles,'7-Zip','7z.exe'), makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca'), integrator_version)) # And replace the extensions.rdf content jinja2 = Environment( loader=FileSystemLoader(os.path.dirname(os.path.abspath(__file__))), trim_blocks=True ) - open(makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-integrator','chrome','content','extensions.rdf'),'w').write( + open(makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca','chrome','content','extensions.rdf'),'w').write( jinja2.get_template('extensions.rdf.j2').render( sogo_server = variables['sogo_server'] ) ) # Also remove custom settings - os.unlink(makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-integrator','defaults','preferences','site.js')) + os.unlink(makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca','defaults','preferences','site.js')) def uninstall(): print('Removing SOGo extensions for Thunderbird') for extension in ['connector','integrator']: - remove_tree(makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-' + extension)) + remove_tree(makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-%s@inverse.ca' % extension)) def audit(): try: - run('type "%s" | find /I "em:version=" | find "%s"' % (makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-connector','install.rdf'), connector_version)) + run('type "%s" | find /I "em:version=" | find "%s"' % (makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-connector@inverse.ca','install.rdf'), connector_version)) except: print('SOGO connector version check failed') return "ERROR" try: - run('type "%s" | find /I "em:version=" | find "%s"' % (makepath(install_dir,'Mozilla Thunderbird','distribution','bundles','sogo-integrator','install.rdf'), integrator_version)) + run('type "%s" | find /I "em:version=" | find "%s"' % (makepath(install_dir,'Mozilla Thunderbird','distribution','extensions','sogo-integrator@inverse.ca','install.rdf'), integrator_version)) except: print('SOGO integrator version check failed') return "ERROR"