Virgil Dupras avatar Virgil Dupras committed fde5414

In Debian packaging, create package for both precise and quantal.

Comments (0)

Files changed (2)

 62a55da0cd9750c2f67e6e95a1516649ae8a8ec5 ambuttonbar
 cfb29fa3d85b7ed88ffca9a0674d1ea6f218918e cocoalib
-0d67cda31b7bb500e6029c58a85a42959bb52ec8 hscommon
+3e164f0cfeccb6bc4d8a0f59ab3ae93c2f51fd54 hscommon
 bbc3cc9d5986f4a9b96e400298a2dbd0ff614173 psmtabbarcontrol
 b2e1dea7a9f763563fdf523c84d7eb4fd4b50549 qtlib
         os.remove('installer_tmp.aip')
     
 
-def package_debian(source_pkg):
-    destpath = op.join('build', 'moneyguru-{0}'.format(MoneyGuru.VERSION))
+def package_debian(distribution):
+    version = '{}~{}'.format(MoneyGuru.VERSION, distribution)
+    destpath = op.join('build', 'moneyguru-{}'.format(version))
     if op.exists(destpath):
         shutil.rmtree(destpath)
     srcpath = op.join(destpath, 'src')
     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')
+        'moneyguru', from_version='1.8.0', distribution=distribution)
     shutil.copytree(op.join('build', 'help'), op.join(srcpath, 'help'))
     shutil.copytree(op.join('build', 'locale'), op.join(srcpath, 'locale'))
     shutil.copy(op.join('images', 'logo_big.png'), srcpath)
     compileall.compile_dir(srcpath)
     os.chdir(destpath)
-    cmd = "dpkg-buildpackage"
-    if source_pkg:
-        cmd += " -S"
+    cmd = "dpkg-buildpackage -S"
     os.system(cmd)
+    os.chdir('../..')
 
 def main():
     args = parse_args()
         if ISWINDOWS:
             package_windows(dev)
         elif ISLINUX:
-            package_debian(args.source_pkg)
+            for distribution in ['precise', 'quantal']:
+                package_debian(distribution)
         else:
             print("Qt packaging only works under Windows or Linux.")
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.