X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=build_nqaap_maemo5.py;h=2c585a351533941264d8185d6f2ea9d7fb4247dd;hb=5443f3617ce3fb45f13e3dddc969357085f504d3;hp=5854d83885eedb834fa18d792c3e27fa61dd1ad4;hpb=019292533f5129702dc90928a7a1c57d4a62e953;p=nqaap diff --git a/build_nqaap_maemo5.py b/build_nqaap_maemo5.py index 5854d83..2c585a3 100644 --- a/build_nqaap_maemo5.py +++ b/build_nqaap_maemo5.py @@ -1,17 +1,22 @@ -#!/usr/bin/python2.5 - # -*- coding: utf-8 -*- - ## This program is free software; you can redistribute it and/or modify - ## it under the terms of the GNU General Public License as published - ## by the Free Software Foundation; version 2 only. - ## - ## This program is distributed in the hope that it will be useful, - ## but WITHOUT ANY WARRANTY; without even the implied warranty of - ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ## GNU General Public License for more details. - ## +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published +by the Free Software Foundation; version 2 only. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +""" + import py2deb import os -if __name__ == "__main__": + + +def build_package(distribution): try: os.chdir(os.path.dirname(sys.argv[0])) except: @@ -20,19 +25,39 @@ if __name__ == "__main__": p=py2deb.Py2deb("nqaap") #This is the package name and MUST be in #lowercase! (using e.g. "mClock" fails #miserably...) - p.description="Very simple Audiobook player. \nSupports playing, pausing, seeking (sort of) and saving state when changing book/closing.\nPlays books arranged as dirs under myDocs/Audiobooks" + p.description="""Very simple Audiobook player. +Supports playing, pausing, seeking (sort of) and saving state when changing book/closing. +Plays books arranged as dirs under myDocs/Audiobooks +Homepage: http://nqaap.garage.maemo.org/""" p.author="Soeren 'Pengman' Pedersen" p.mail="pengmeister@gmail.com" - p.depends = "python2.5, python2.5-gtk2, python2.5-dbus, python2.5-telepathy, python2.5-gobject, python-gst0.10" - p.section="user/multimedia" + p.depends = ", ".join([ + "python2.6 | python2.5", + "python-gtk2 | python2.5-gtk2", + "python-dbus | python2.5-dbus", + "python-telepathy | python2.5-telepathy", + "python-gobject | python2.5-gobject", + ]) + maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon" + p.depends += { + "debian": ", python-gst0.10", + "diablo": maemoSpecificDepends, + "fremantle": maemoSpecificDepends+", python-gst0.10", + }[distribution] + p.section = { + "debian": "multimedia", + "diablo": "user/multimedia", + "fremantle": "user/multimedia", + }[distribution] p.icon = "/usr/share/icons/hicolor/48x48/hildon/nqaap.png" p.arch="all" #should be all for python, any for all arch p.urgency="low" #not used in maemo onl for deb os - p.distribution="fremantle" - p.repository="extras-devel" + p.distribution=distribution + p.repository="extras" p.xsbc_bugtracker="http://talk.maemo.org/showthread.php?p=619738" - # p.postinstall="""#!/bin/sh - # chmod +x /usr/bin/mclock.py""" #Set here your post install script + p.postinstall="""#!/bin/sh +rm -f ~/.nqaap/nqaap.log +""" # p.postremove="""#!/bin/sh # chmod +x /usr/bin/mclock.py""" #Set here your post remove script # p.preinstall="""#!/bin/sh @@ -64,7 +89,6 @@ if __name__ == "__main__": #to leave it named src in all projects #and will refer to that in the wiki #article on maemo.org - #Thanks to DareTheHair from talk.maemo.org for this snippet that #recursively builds the file list for root, dirs, files in os.walk(dir_name): @@ -78,5 +102,32 @@ if __name__ == "__main__": fake_file.append(root + os.sep + f + "|" + f) if len(fake_file) > 0: p[real_dir] = fake_file + print p - r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True) + if distribution == "debian": + print p.generate( + version, + build, + changelog=changeloginformation, + build=True, + tar=False, + changes=False, + dsc=False, + src=False, + ) + else: + print p.generate( + version, + build, + changelog=changeloginformation, + build=False, + tar=True, + changes=True, + dsc=True, + src=True, + ) + print "Building for %s finished" % distribution + + +if __name__ == "__main__": + build_package("fremantle")