Fixed debian packaging.

This commit is contained in:
Virgil Dupras 2011-01-13 03:23:21 -08:00
parent 4a1fe2f8ab
commit 1b8ab35fdd
1 changed files with 4 additions and 7 deletions

View File

@ -68,13 +68,11 @@ def package_windows(edition, dev):
def package_debian(edition):
app_version = get_module_version('core_{}'.format(edition))
if op.exists('build'):
shutil.rmtree('build')
ed = lambda s: s.format(edition)
destpath = op.join('build', 'dupeguru-{0}-{1}'.format(edition, app_version))
if op.exists(destpath):
shutil.rmtree(destpath)
srcpath = op.join(destpath, 'src')
help_src = ed('help_{0}')
os.makedirs(destpath)
os.makedirs(srcpath)
shutil.copy('run.py', op.join(srcpath, 'run.py'))
@ -92,13 +90,12 @@ def package_debian(edition):
shutil.copy(op.join(qtsrcpath, 'QtCore.so'), qtdestpath)
shutil.copy(op.join(qtsrcpath, 'QtGui.so'), qtdestpath)
shutil.copytree(ed('debian_{0}'), op.join(destpath, 'debian'))
changelogpath = op.join(help_src, 'CHANGELOG')
changelogpath = op.join('help', ed('changelog_{}'))
changelog_dest = op.join(destpath, 'debian', 'changelog')
project_name = ed('dupeguru-{0}')
from_version = {'se': '2.9.2', 'me': '5.7.2', 'pe': '1.8.5'}[edition]
build_debian_changelog(changelogpath, changelog_dest, project_name, from_version=from_version)
help_name = {'se': 'dupeguru_help', 'me': 'dupeguru_me_help', 'pe': 'dupeguru_pe_help'}[edition]
shutil.copytree(op.join(help_src, help_name), op.join(srcpath, 'help'))
shutil.copytree(op.join('build', 'help'), op.join(srcpath, 'help'))
shutil.copy(op.join('images', ed('dg{0}_logo_128.png')), srcpath)
compileall.compile_dir(srcpath)
os.chdir(destpath)