Mirroring more of my other projects
authorEd Page <eopage@byu.net>
Sat, 18 Dec 2010 22:34:47 +0000 (16:34 -0600)
committerEd Page <eopage@byu.net>
Sat, 18 Dec 2010 22:34:47 +0000 (16:34 -0600)
Makefile
support/build_nqaap.py [deleted file]
support/builddeb.py [new file with mode: 0755]

index 471dff5..ef92803 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,18 +39,18 @@ package: $(OBJ)
 
        mkdir -p $(BUILD_PATH)/generic
        cp -R $(SOURCE_PATH) $(BUILD_PATH)/generic
-       cp support/build_nqaap.py $(BUILD_PATH)/generic
+       cp support/builddeb.py $(BUILD_PATH)/generic
        cp support/py2deb.py $(BUILD_PATH)/generic
 
        mkdir -p $(BUILD_PATH)/diablo
        cp -R $(BUILD_PATH)/generic/* $(BUILD_PATH)/diablo
-       cd $(BUILD_PATH)/diablo ; python build_nqaap.py diablo
+       cd $(BUILD_PATH)/diablo ; python builddeb.py diablo
        mkdir -p $(BUILD_PATH)/fremantle
        cp -R $(BUILD_PATH)/generic/* $(BUILD_PATH)/fremantle
-       cd $(BUILD_PATH)/fremantle ; python build_nqaap.py fremantle
+       cd $(BUILD_PATH)/fremantle ; python builddeb.py fremantle
        mkdir -p $(BUILD_PATH)/debian
        cp -R $(BUILD_PATH)/generic/* $(BUILD_PATH)/debian
-       cd $(BUILD_PATH)/debian ; python build_nqaap.py debian
+       cd $(BUILD_PATH)/debian ; python builddeb.py debian
 
 upload:
        dput fremantle-extras-builder $(BUILD_PATH)/fremantle/$(PROJECT_NAME)*.changes
diff --git a/support/build_nqaap.py b/support/build_nqaap.py
deleted file mode 100755 (executable)
index add2235..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env python\r
-# -*- coding: utf-8 -*-\r
-\r
-"""\r
-This program is free software; you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published\r
-by the Free Software Foundation; version 2 only.\r
-\r
-This program is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-"""\r
-\r
-import os\r
-import sys\r
-\r
-import py2deb\r
-\r
-\r
-def build_package(distribution):\r
-    py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]\r
-    try:\r
-        os.chdir(os.path.dirname(sys.argv[0]))\r
-    except:\r
-        pass\r
-    print\r
-    p=py2deb.Py2deb("nqaap") #This is the package name and MUST be in\r
-                               #lowercase! (using e.g. "mClock" fails\r
-                               #miserably...)\r
-    p.prettyName="NQA Audiobook Player"\r
-    p.description="""Very simple Audiobook player.\r
-Supports playing, pausing, seeking (sort of) and saving state when changing book/closing.\r
-Plays books arranged as dirs under myDocs/Audiobooks\r
-.\r
-Homepage: http://wiki.maemo.org/Nqaap"""\r
-    p.author="Soeren 'Pengman' Pedersen"\r
-    p.mail="pengmeister@gmail.com"\r
-    p.license = "lgpl"\r
-    p.depends = ", ".join([\r
-        "python2.6 | python2.5",\r
-        "python-gtk2 | python2.5-gtk2",\r
-        "python-dbus | python2.5-dbus",\r
-        "python-telepathy | python2.5-telepathy",\r
-        "python-gobject | python2.5-gobject",\r
-        "python-simplejson",\r
-    ])\r
-    maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"\r
-    p.depends += {\r
-        "debian": ", python-gst0.10",\r
-        "diablo": maemoSpecificDepends,\r
-        "fremantle": maemoSpecificDepends + ", python-gst0.10",\r
-    }[distribution]\r
-    p.section = {\r
-        "debian": "sound",\r
-        "diablo": "user/multimedia",\r
-        "fremantle": "user/multimedia",\r
-    }[distribution]\r
-    p.icon = "src/usr/share/icons/hicolor/48x48/hildon/nqaap.png"\r
-    p.arch="all"                #should be all for python, any for all arch\r
-    p.urgency="low"             #not used in maemo onl for deb os\r
-    p.distribution=distribution\r
-    p.repository="extras"\r
-    p.bugTracker="https://bugs.maemo.org/enter_bug.cgi?product=nQa%20Audiobook%20Player"\r
-    p.postinstall="""#!/bin/sh\r
-rm -f ~/.nqaap/nqaap.log\r
-"""\r
-    #  p.postremove="""#!/bin/sh\r
-    #  chmod +x /usr/bin/mclock.py""" #Set here your post remove script\r
-    #  p.preinstall="""#!/bin/sh\r
-    #  chmod +x /usr/bin/mclock.py""" #Set here your pre install script\r
-    #  p.preremove="""#!/bin/sh\r
-    #  chmod +x /usr/bin/mclock.py""" #Set here your pre remove script\r
-    version = "0.8.6"           #Version of your software, e.g. "1.2.0" or "0.8.2"\r
-    build = "0" #Build number, e.g. "1" for the first build of this\r
-                                #version of your software. Increment\r
-                                #for later re-builds of the same\r
-                                #version of your software.  Text with\r
-                                #changelog information to be displayed\r
-                                #in the package "Details" tab of the\r
-                                #Maemo Application Manager\r
-    changeloginformation = """\r
-* About window as requested by magnuslu\r
-* Switched how storage of active book, chapter, and chapter position is stored\r
-""".strip()\r
-    dir_name = "src" #Name of the subfolder containing your package\r
-                                #source files\r
-                                #(e.g. usr\share\icons\hicolor\scalable\myappicon.svg,\r
-                                #usr\lib\myapp\somelib.py). We suggest\r
-                                #to leave it named src in all projects\r
-                                #and will refer to that in the wiki\r
-                                #article on maemo.org\r
-    #Thanks to DareTheHair from talk.maemo.org for this snippet that\r
-    #recursively builds the file list\r
-    for root, dirs, files in os.walk(dir_name):\r
-        if any(f.startswith(".") for f in root.split(os.sep)):\r
-            continue # avoid hidden folders, esp svn ones\r
-\r
-        real_dir = root[len(dir_name):]\r
-        fake_file = []\r
-        for f in files:\r
-            fake_file.append(root + os.sep + f + "|" + f)\r
-        if len(fake_file) > 0:\r
-            p[real_dir] = fake_file\r
-\r
-    print p\r
-    if distribution == "debian":\r
-        print p.generate(\r
-            version="%s-%s" % (version, build),\r
-            changelog=changeloginformation,\r
-            build=True,\r
-            tar=False,\r
-            changes=False,\r
-            dsc=False,\r
-        )\r
-    else:\r
-        print p.generate(\r
-            version="%s-%s" % (version, build),\r
-            changelog=changeloginformation,\r
-            build=False,\r
-            tar=True,\r
-            changes=True,\r
-            dsc=True,\r
-        )\r
-    print "Building for %s finished" % distribution\r
-\r
-\r
-if __name__ == "__main__":\r
-    if len(sys.argv) == 1:\r
-        distribution = "fremantle"\r
-    else:\r
-        distribution = sys.argv[1]\r
-    build_package(distribution)\r
diff --git a/support/builddeb.py b/support/builddeb.py
new file mode 100755 (executable)
index 0000000..072ed0e
--- /dev/null
@@ -0,0 +1,133 @@
+#!/usr/bin/env python\r
+# -*- coding: utf-8 -*-\r
+\r
+"""\r
+This program is free software; you can redistribute it and/or modify\r
+it under the terms of the GNU General Public License as published\r
+by the Free Software Foundation; version 2 only.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+GNU General Public License for more details.\r
+"""\r
+\r
+import os\r
+import sys\r
+\r
+import py2deb\r
+\r
+\r
+def build_package(distribution):\r
+    py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution]\r
+    try:\r
+        os.chdir(os.path.dirname(sys.argv[0]))\r
+    except:\r
+        pass\r
+\r
+    p=py2deb.Py2deb("nqaap") #This is the package name and MUST be in\r
+                               #lowercase! (using e.g. "mClock" fails\r
+                               #miserably...)\r
+    p.prettyName="NQA Audiobook Player"\r
+    p.description="""Very simple Audiobook player.\r
+Supports playing, pausing, seeking (sort of) and saving state when changing book/closing.\r
+Plays books arranged as dirs under myDocs/Audiobooks\r
+.\r
+Homepage: http://wiki.maemo.org/Nqaap"""\r
+    p.author="Soeren 'Pengman' Pedersen"\r
+    p.mail="pengmeister@gmail.com"\r
+    p.license = "lgpl"\r
+    p.depends = ", ".join([\r
+        "python2.6 | python2.5",\r
+        "python-gtk2 | python2.5-gtk2",\r
+        "python-dbus | python2.5-dbus",\r
+        "python-telepathy | python2.5-telepathy",\r
+        "python-gobject | python2.5-gobject",\r
+        "python-simplejson",\r
+    ])\r
+    maemoSpecificDepends = ", python-osso | python2.5-osso, python-hildon | python2.5-hildon"\r
+    p.depends += {\r
+        "debian": ", python-gst0.10",\r
+        "diablo": maemoSpecificDepends,\r
+        "fremantle": maemoSpecificDepends + ", python-gst0.10",\r
+    }[distribution]\r
+    p.section = {\r
+        "debian": "sound",\r
+        "diablo": "user/multimedia",\r
+        "fremantle": "user/multimedia",\r
+    }[distribution]\r
+    p.icon = "src/usr/share/icons/hicolor/48x48/hildon/nqaap.png"\r
+    p.arch="all"                #should be all for python, any for all arch\r
+    p.urgency="low"             #not used in maemo onl for deb os\r
+    p.distribution=distribution\r
+    p.repository="extras"\r
+    p.bugTracker="https://bugs.maemo.org/enter_bug.cgi?product=nQa%20Audiobook%20Player"\r
+    p.postinstall="""#!/bin/sh\r
+rm -f ~/.nqaap/nqaap.log\r
+"""\r
+    #  p.postremove="""#!/bin/sh\r
+    #  chmod +x /usr/bin/mclock.py""" #Set here your post remove script\r
+    #  p.preinstall="""#!/bin/sh\r
+    #  chmod +x /usr/bin/mclock.py""" #Set here your pre install script\r
+    #  p.preremove="""#!/bin/sh\r
+    #  chmod +x /usr/bin/mclock.py""" #Set here your pre remove script\r
+    version = "0.8.6"           #Version of your software, e.g. "1.2.0" or "0.8.2"\r
+    build = "0" #Build number, e.g. "1" for the first build of this\r
+                                #version of your software. Increment\r
+                                #for later re-builds of the same\r
+                                #version of your software.  Text with\r
+                                #changelog information to be displayed\r
+                                #in the package "Details" tab of the\r
+                                #Maemo Application Manager\r
+    changeloginformation = """\r
+* About window as requested by magnuslu\r
+* Switched how storage of active book, chapter, and chapter position is stored\r
+""".strip()\r
+    dir_name = "src" #Name of the subfolder containing your package\r
+                                #source files\r
+                                #(e.g. usr\share\icons\hicolor\scalable\myappicon.svg,\r
+                                #usr\lib\myapp\somelib.py). We suggest\r
+                                #to leave it named src in all projects\r
+                                #and will refer to that in the wiki\r
+                                #article on maemo.org\r
+    #Thanks to DareTheHair from talk.maemo.org for this snippet that\r
+    #recursively builds the file list\r
+    for root, dirs, files in os.walk(dir_name):\r
+        if any(f.startswith(".") for f in root.split(os.sep)):\r
+            continue # avoid hidden folders, esp svn ones\r
+\r
+        real_dir = root[len(dir_name):]\r
+        fake_file = []\r
+        for f in files:\r
+            fake_file.append(root + os.sep + f + "|" + f)\r
+        if len(fake_file) > 0:\r
+            p[real_dir] = fake_file\r
+\r
+    print p\r
+    if distribution == "debian":\r
+        print p.generate(\r
+            version="%s-%s" % (version, build),\r
+            changelog=changeloginformation,\r
+            build=True,\r
+            tar=False,\r
+            changes=False,\r
+            dsc=False,\r
+        )\r
+    else:\r
+        print p.generate(\r
+            version="%s-%s" % (version, build),\r
+            changelog=changeloginformation,\r
+            build=False,\r
+            tar=True,\r
+            changes=True,\r
+            dsc=True,\r
+        )\r
+    print "Building for %s finished" % distribution\r
+\r
+\r
+if __name__ == "__main__":\r
+    if len(sys.argv) == 1:\r
+        distribution = "fremantle"\r
+    else:\r
+        distribution = sys.argv[1]\r
+    build_package(distribution)\r