1 #!/usr/bin/env python
\r
2 # -*- coding: utf-8 -*-
\r
5 This program is free software; you can redistribute it and/or modify
\r
6 it under the terms of the GNU General Public License as published
\r
7 by the Free Software Foundation; version 2 only.
\r
9 This program is distributed in the hope that it will be useful,
\r
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 GNU General Public License for more details.
\r
21 def build_package(distribution):
\r
22 py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]
\r
24 os.chdir(os.path.dirname(sys.argv[0]))
\r
28 p=py2deb.Py2deb("nqaap")
\r
29 p.prettyName="NQA Audiobook Player"
\r
30 p.description="""Very simple Audiobook player.
\r
31 Supports playing, pausing, seeking (sort of) and saving state when changing book/closing.
\r
32 Plays books arranged as dirs under myDocs/Audiobooks
\r
34 Homepage: http://wiki.maemo.org/Nqaap"""
\r
35 p.author="Soeren 'Pengman' Pedersen"
\r
36 p.mail="pengmeister@gmail.com"
\r
38 p.depends = ", ".join([
\r
39 "python2.6 | python2.5",
\r
40 "python-gtk2 | python2.5-gtk2",
\r
41 "python-dbus | python2.5-dbus",
\r
42 "python-telepathy | python2.5-telepathy",
\r
43 "python-gobject | python2.5-gobject",
\r
44 "python-simplejson",
\r
46 maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"
\r
48 "debian": ", python-gst0.10",
\r
49 "diablo": maemoSpecificDepends,
\r
50 "fremantle": maemoSpecificDepends + ", python-gst0.10",
\r
54 "diablo": "user/multimedia",
\r
55 "fremantle": "user/multimedia",
\r
58 "debian": "src/usr/share/icons/hicolor/26x26/hildon/nqaap.png",
\r
59 "diablo": "src/usr/share/icons/hicolor/26x26/hildon/nqaap.png",
\r
60 "fremantle": "src/usr/share/icons/hicolor/48x48/hildon/nqaap.png",
\r
64 p.distribution=distribution
\r
65 p.repository="extras"
\r
66 p.bugTracker="https://bugs.maemo.org/enter_bug.cgi?product=nQa%%20Audiobook%%20Player"
\r
67 p.postinstall="""#!/bin/sh
\r
68 rm -f ~/.nqaap/nqaap.log
\r
72 changeloginformation = """
\r
73 * Fixing a bug with initially configuring the book location
\r
76 #Thanks to DareTheHair from talk.maemo.org for this snippet that
\r
77 #recursively builds the file list
\r
78 for root, dirs, files in os.walk(dir_name):
\r
79 if any(f.startswith(".") for f in root.split(os.sep)):
\r
80 continue # avoid hidden folders, esp svn ones
\r
82 real_dir = root[len(dir_name):]
\r
85 fake_file.append(root + os.sep + f + "|" + f)
\r
86 if len(fake_file) > 0:
\r
87 p[real_dir] = fake_file
\r
90 if distribution == "debian":
\r
92 version="%s-%s" % (version, build),
\r
93 changelog=changeloginformation,
\r
101 version="%s-%s" % (version, build),
\r
102 changelog=changeloginformation,
\r
108 print "Building for %s finished" % distribution
\r
111 if __name__ == "__main__":
\r
112 if len(sys.argv) == 1:
\r
113 distribution = "fremantle"
\r
115 distribution = sys.argv[1]
\r
116 build_package(distribution)
\r