def package_debian_distribution(distribution): app_version = get_module_version('core') version = '{}~{}'.format(app_version, distribution) destpath = op.join('build', 'dupeguru-{}'.format(version)) srcpath = op.join(destpath, 'src') packages = [ 'hscommon', 'core', 'qtlib', 'qt', 'send2trash', 'hsaudiotag' ] copy_files_to_package(srcpath, packages, with_so=False) os.mkdir(op.join(destpath, 'modules')) copy_all(op.join('core', 'pe', 'modules', '*.*'), op.join(destpath, 'modules')) copy(op.join('qt', 'pe', 'modules', 'block.c'), op.join(destpath, 'modules', 'block_qt.c')) copy(op.join('pkg', 'debian', 'build_pe_modules.py'), op.join(destpath, 'build_pe_modules.py')) debdest = op.join(destpath, 'debian') debskel = op.join('pkg', 'debian') os.makedirs(debdest) debopts = json.load(open(op.join(debskel, 'dupeguru.json'))) for fn in ['compat', 'copyright', 'dirs', 'rules']: copy(op.join(debskel, fn), op.join(debdest, fn)) filereplace(op.join(debskel, 'control'), op.join(debdest, 'control'), **debopts) filereplace(op.join(debskel, 'Makefile'), op.join(destpath, 'Makefile'), **debopts) filereplace(op.join(debskel, 'dupeguru.desktop'), op.join(debdest, 'dupeguru.desktop'), **debopts) changelogpath = op.join('help', 'changelog') changelog_dest = op.join(debdest, 'changelog') project_name = debopts['pkgname'] from_version = '2.9.2' build_debian_changelog( changelogpath, changelog_dest, project_name, from_version=from_version, distribution=distribution ) shutil.copy(op.join('images', 'dgse_logo_128.png'), srcpath) os.chdir(destpath) cmd = "dpkg-buildpackage -S" os.system(cmd) os.chdir('../..')
def package_debian_distribution(edition, distribution): app_version = get_module_version('core_{}'.format(edition)) version = '{}~{}'.format(app_version, distribution) ed = lambda s: s.format(edition) destpath = op.join('build', 'dupeguru-{0}-{1}'.format(edition, version)) srcpath = op.join(destpath, 'src') packages = ['hscommon', 'core', ed('core_{0}'), 'qtlib', 'qt', 'send2trash', 'jobprogress'] if edition == 'me': packages.append('hsaudiotag') copy_files_to_package(srcpath, packages, with_so=False) if edition == 'pe': os.mkdir(op.join(destpath, 'modules')) copy_all(op.join('core_pe', 'modules', '*.*'), op.join(destpath, 'modules')) copy(op.join('qt', 'pe', 'modules', 'block.c'), op.join(destpath, 'modules', 'block_qt.c')) copy(op.join('debian', 'build_pe_modules.py'), op.join(destpath, 'build_pe_modules.py')) debdest = op.join(destpath, 'debian') os.makedirs(debdest) debopts = json.load(open(op.join('debian', ed('{}.json')))) for fn in ['compat', 'copyright', 'dirs', 'rules']: copy(op.join('debian', fn), op.join(debdest, fn)) filereplace(op.join('debian', 'control'), op.join(debdest, 'control'), **debopts) filereplace(op.join('debian', 'Makefile'), op.join(destpath, 'Makefile'), **debopts) filereplace(op.join('debian', 'dupeguru.desktop'), op.join(debdest, ed('dupeguru_{}.desktop')), **debopts) changelogpath = op.join('help', ed('changelog_{}')) changelog_dest = op.join(debdest, 'changelog') project_name = debopts['pkgname'] 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, distribution=distribution) shutil.copy(op.join('images', ed('dg{0}_logo_128.png')), srcpath) os.chdir(destpath) cmd = "dpkg-buildpackage -S" os.system(cmd) os.chdir('../..')
def package_debian_distribution(edition, distribution): app_version = get_module_version('core_{}'.format(edition)) version = '{}~{}'.format(app_version, distribution) ed = lambda s: s.format(edition) destpath = op.join('build', 'dupeguru-{0}-{1}'.format(edition, version)) srcpath = op.join(destpath, 'src') packages = ['hscommon', 'core', ed('core_{0}'), 'qtlib', 'qt', 'send2trash'] if edition == 'me': packages.append('hsaudiotag') copy_files_to_package(srcpath, packages, with_so=False) if edition == 'pe': os.mkdir(op.join(destpath, 'modules')) copy_all(op.join('core_pe', 'modules', '*.*'), op.join(destpath, 'modules')) copy(op.join('qt', 'pe', 'modules', 'block.c'), op.join(destpath, 'modules', 'block_qt.c')) copy(op.join('pkg', 'debian', 'build_pe_modules.py'), op.join(destpath, 'build_pe_modules.py')) debdest = op.join(destpath, 'debian') debskel = op.join('pkg', 'debian') os.makedirs(debdest) debopts = json.load(open(op.join(debskel, ed('{}.json')))) for fn in ['compat', 'copyright', 'dirs', 'rules']: copy(op.join(debskel, fn), op.join(debdest, fn)) filereplace(op.join(debskel, 'control'), op.join(debdest, 'control'), **debopts) filereplace(op.join(debskel, 'Makefile'), op.join(destpath, 'Makefile'), **debopts) filereplace(op.join(debskel, 'dupeguru.desktop'), op.join(debdest, ed('dupeguru_{}.desktop')), **debopts) changelogpath = op.join('help', ed('changelog_{}')) changelog_dest = op.join(debdest, 'changelog') project_name = debopts['pkgname'] 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, distribution=distribution) shutil.copy(op.join('images', ed('dg{0}_logo_128.png')), srcpath) os.chdir(destpath) cmd = "dpkg-buildpackage -S" os.system(cmd) os.chdir('../..')
def package_debian(distribution): version = '{}~{}'.format(MoneyGuru.VERSION, distribution) destpath = op.join('build', 'moneyguru-{}'.format(version)) srcpath = op.join(destpath, 'src') copy_source_files(srcpath, ['qt', 'hscommon', 'core', 'qtlib', 'plugin_examples', 'sgmllib']) shutil.copytree('debian', op.join(destpath, 'debian')) move(op.join(destpath, 'debian', 'Makefile'), op.join(destpath, 'Makefile')) move(op.join(destpath, 'debian', 'build_modules.py'), op.join(destpath, 'build_modules.py')) os.mkdir(op.join(destpath, 'modules')) copy_all(op.join('core', 'modules', '*.*'), op.join(destpath, 'modules')) build_debian_changelog(op.join('help', 'changelog'), op.join(destpath, 'debian', 'changelog'), 'moneyguru', from_version='1.8.0', distribution=distribution) os.chdir(destpath) cmd = "dpkg-buildpackage -S" os.system(cmd) os.chdir('../..')
def package_debian_distribution(distribution): app_version = get_module_version('core') version = '{}~{}'.format(app_version, distribution) destpath = op.join('build', 'pdfmasher-{}'.format(version)) srcpath = op.join(destpath, 'src') copy_cource_files(srcpath, ['qt', 'ebooks', 'hscommon', 'core', 'qtlib', 'pdfminer', 'ply', 'jobprogress', 'markdown', 'cssutils', 'cssselect', 'encutils']) shutil.copytree('debian', op.join(destpath, 'debian')) move(op.join(destpath, 'debian', 'Makefile'), op.join(destpath, 'Makefile')) build_debian_changelog(op.join('help', 'changelog'), op.join(destpath, 'debian', 'changelog'), 'pdfmasher', from_version='0.1.0', distribution=distribution) shutil.copytree(op.join('build', 'help'), op.join(srcpath, 'help')) os.chdir(destpath) cmd = "dpkg-buildpackage -S" os.system(cmd) os.chdir('../..')
def package_debian(): if op.exists('build'): shutil.rmtree('build') add_to_pythonpath('qt') from app import MusicGuru destpath = op.join('build', 'musicguru-{0}'.format(MusicGuru.VERSION)) srcpath = op.join(destpath, 'src') os.makedirs(destpath) shutil.copytree('qt', srcpath) copy_packages(['hsaudiotag', 'hsfs', 'core', 'qtlib', 'hscommon', 'jobprogress'], srcpath) shutil.copytree('debian', op.join(destpath, 'debian')) build_debian_changelog(op.join('help', 'changelog.yaml'), op.join(destpath, 'debian', 'changelog'), 'musicguru', from_version='1.3.6') shutil.copytree(op.join('help', 'musicguru_help'), op.join(srcpath, 'help')) shutil.copy(op.join('images', 'mg_logo_big.png'), srcpath) compileall.compile_dir(srcpath) os.chdir(destpath) os.system("dpkg-buildpackage")
def package_debian_distribution(distribution): app_version = get_module_version("core") version = "{}~{}".format(app_version, distribution) destpath = op.join("build", "dupeguru-{}".format(version)) srcpath = op.join(destpath, "src") packages = ["hscommon", "core", "qtlib", "qt", "send2trash", "hsaudiotag"] copy_files_to_package(srcpath, packages, with_so=False) os.mkdir(op.join(destpath, "modules")) copy_all(op.join("core", "pe", "modules", "*.*"), op.join(destpath, "modules")) copy( op.join("qt", "pe", "modules", "block.c"), op.join(destpath, "modules", "block_qt.c"), ) copy( op.join("pkg", "debian", "build_pe_modules.py"), op.join(destpath, "build_pe_modules.py"), ) debdest = op.join(destpath, "debian") debskel = op.join("pkg", "debian") os.makedirs(debdest) debopts = json.load(open(op.join(debskel, "dupeguru.json"))) for fn in ["compat", "copyright", "dirs", "rules", "source"]: copy(op.join(debskel, fn), op.join(debdest, fn)) filereplace(op.join(debskel, "control"), op.join(debdest, "control"), **debopts) filereplace(op.join(debskel, "Makefile"), op.join(destpath, "Makefile"), **debopts) filereplace(op.join(debskel, "dupeguru.desktop"), op.join(debdest, "dupeguru.desktop"), **debopts) changelogpath = op.join("help", "changelog") changelog_dest = op.join(debdest, "changelog") project_name = debopts["pkgname"] from_version = "2.9.2" build_debian_changelog( changelogpath, changelog_dest, project_name, from_version=from_version, distribution=distribution, ) shutil.copy(op.join("images", "dgse_logo_128.png"), srcpath) os.chdir(destpath) cmd = "dpkg-buildpackage -F -us -uc" os.system(cmd) os.chdir("../..")
def package_debian(distribution): version = '{}~{}'.format(MoneyGuru.VERSION, distribution) destpath = op.join('build', 'moneyguru-{}'.format(version)) srcpath = op.join(destpath, 'src') packages = ['qt', 'hscommon', 'core', 'qtlib'] copy_files_to_package(srcpath, packages, with_so=False) shutil.copytree('debian', op.join(destpath, 'debian')) move(op.join(destpath, 'debian', 'Makefile'), op.join(destpath, 'Makefile')) move(op.join(destpath, 'debian', 'build_modules.py'), op.join(destpath, 'build_modules.py')) os.mkdir(op.join(destpath, 'modules')) copy_all(op.join('core', 'modules', '*.*'), op.join(destpath, 'modules')) build_debian_changelog( op.join('help', 'changelog'), op.join(destpath, 'debian', 'changelog'), 'moneyguru', from_version='1.8.0', distribution=distribution ) os.chdir(destpath) cmd = "dpkg-buildpackage -S" os.system(cmd) os.chdir('../..')
def package_debian_distribution(distribution): app_version = get_module_version('core') version = '{}~{}'.format(app_version, distribution) destpath = op.join('build', 'dupeguru-{}'.format(version)) srcpath = op.join(destpath, 'src') packages = ['hscommon', 'core', 'qtlib', 'qt', 'send2trash', 'hsaudiotag'] copy_files_to_package(srcpath, packages, with_so=False) os.mkdir(op.join(destpath, 'modules')) copy_all(op.join('core', 'pe', 'modules', '*.*'), op.join(destpath, 'modules')) copy(op.join('qt', 'pe', 'modules', 'block.c'), op.join(destpath, 'modules', 'block_qt.c')) copy(op.join('pkg', 'debian', 'build_pe_modules.py'), op.join(destpath, 'build_pe_modules.py')) debdest = op.join(destpath, 'debian') debskel = op.join('pkg', 'debian') os.makedirs(debdest) debopts = json.load(open(op.join(debskel, 'dupeguru.json'))) for fn in ['compat', 'copyright', 'dirs', 'rules', 'source']: copy(op.join(debskel, fn), op.join(debdest, fn)) filereplace(op.join(debskel, 'control'), op.join(debdest, 'control'), **debopts) filereplace(op.join(debskel, 'Makefile'), op.join(destpath, 'Makefile'), **debopts) filereplace(op.join(debskel, 'dupeguru.desktop'), op.join(debdest, 'dupeguru.desktop'), **debopts) changelogpath = op.join('help', 'changelog') changelog_dest = op.join(debdest, 'changelog') project_name = debopts['pkgname'] from_version = '2.9.2' build_debian_changelog(changelogpath, changelog_dest, project_name, from_version=from_version, distribution=distribution) shutil.copy(op.join('images', 'dgse_logo_128.png'), srcpath) os.chdir(destpath) cmd = "dpkg-buildpackage -S -us -uc" os.system(cmd) os.chdir('../..')
def package_debian_distribution(distribution): app_version = get_module_version('core') version = '{}~{}'.format(app_version, distribution) destpath = op.join('build', 'pdfmasher-{}'.format(version)) srcpath = op.join(destpath, 'src') copy_cource_files(srcpath, [ 'qt', 'ebooks', 'hscommon', 'core', 'qtlib', 'pdfminer', 'ply', 'jobprogress', 'markdown', 'cssutils', 'cssselect', 'encutils' ]) shutil.copytree('debian', op.join(destpath, 'debian')) move(op.join(destpath, 'debian', 'Makefile'), op.join(destpath, 'Makefile')) build_debian_changelog(op.join('help', 'changelog'), op.join(destpath, 'debian', 'changelog'), 'pdfmasher', from_version='0.1.0', distribution=distribution) shutil.copytree(op.join('build', 'help'), op.join(srcpath, 'help')) os.chdir(destpath) cmd = "dpkg-buildpackage -S" os.system(cmd) os.chdir('../..')
def package_debian(): if op.exists('build'): shutil.rmtree('build') add_to_pythonpath('qt') from app import MusicGuru destpath = op.join('build', 'musicguru-{0}'.format(MusicGuru.VERSION)) srcpath = op.join(destpath, 'src') os.makedirs(destpath) shutil.copytree('qt', srcpath) copy_packages( ['hsaudiotag', 'hsfs', 'core', 'qtlib', 'hscommon', 'jobprogress'], srcpath) shutil.copytree('debian', op.join(destpath, 'debian')) build_debian_changelog(op.join('help', 'changelog.yaml'), op.join(destpath, 'debian', 'changelog'), 'musicguru', from_version='1.3.6') shutil.copytree(op.join('help', 'musicguru_help'), op.join(srcpath, 'help')) shutil.copy(op.join('images', 'mg_logo_big.png'), srcpath) compileall.compile_dir(srcpath) os.chdir(destpath) os.system("dpkg-buildpackage")
#!/usr/bin/env python3 import sys sys.path.insert(0, '') # noqa from hscommon.build import build_debian_changelog # noqa try: distro = sys.argv[1] except IndexError: distro = 'xenial' build_debian_changelog('help/changelog', 'debian/changelog', 'moneyguru', from_version='1.8.0', distribution=distro)