Prepping for Mer support
[gc-dialer] / support / builddeb.py
index aeece00..f373c47 100755 (executable)
@@ -122,7 +122,7 @@ def unflatten_files(files):
        return d
 
 
-if __name__ == "__main__":
+def build_package(distribution):
        try:
                os.chdir(os.path.dirname(sys.argv[0]))
        except:
@@ -133,8 +133,11 @@ if __name__ == "__main__":
        p.author = __author__
        p.mail = __email__
        p.license = "lgpl"
-       p.depends = "python2.5, python2.5-gtk2, python2.5-xml"
-       p.section = "user/communication"
+       p.depends = {
+               "diablo": "python2.5, python2.5-gtk2, python2.5-xml",
+               "mer": "python2.6, python-gtk2, python-xml, python-glade2",
+       }
+       p.section = "user/utilities"
        p.arch = "all"
        p.urgency = "low"
        p.distribution = "chinook diablo fremantle"
@@ -161,3 +164,19 @@ if __name__ == "__main__":
                __version__, __build__, changelog=__changelog__,
                tar=True, dsc=True, changes=True, build=False, src=True
        )
+
+
+if __name__ == "__main__":
+       if len(sys.argv) > 1:
+               try:
+                       import optparse
+               except ImportError:
+                       optparse = None
+
+               if optparse is not None:
+                       parser = optparse.OptionParser()
+                       (commandOptions, commandArgs) = parser.parse_args()
+       else:
+               commandArgs = None
+               commandArgs = ["diablo"]
+       build_package()