From: Ed Page Date: Sat, 18 Dec 2010 22:34:47 +0000 (-0600) Subject: Mirroring more of my other projects X-Git-Url: http://vcs.maemo.org/git/?p=nqaap;a=commitdiff_plain;h=43690776f23d8f9075a76f42ea396906b7982240 Mirroring more of my other projects --- diff --git a/Makefile b/Makefile index 471dff5..ef92803 100644 --- 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 index add2235..0000000 --- a/support/build_nqaap.py +++ /dev/null @@ -1,133 +0,0 @@ -#!/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 os -import sys - -import py2deb - - -def build_package(distribution): - py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution] - try: - os.chdir(os.path.dirname(sys.argv[0])) - except: - pass - print - p=py2deb.Py2deb("nqaap") #This is the package name and MUST be in - #lowercase! (using e.g. "mClock" fails - #miserably...) - p.prettyName="NQA Audiobook Player" - 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://wiki.maemo.org/Nqaap""" - p.author="Soeren 'Pengman' Pedersen" - p.mail="pengmeister@gmail.com" - p.license = "lgpl" - 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", - "python-simplejson", - ]) - 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": "sound", - "diablo": "user/multimedia", - "fremantle": "user/multimedia", - }[distribution] - p.icon = "src/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=distribution - p.repository="extras" - p.bugTracker="https://bugs.maemo.org/enter_bug.cgi?product=nQa%20Audiobook%20Player" - 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 - # chmod +x /usr/bin/mclock.py""" #Set here your pre install script - # p.preremove="""#!/bin/sh - # chmod +x /usr/bin/mclock.py""" #Set here your pre remove script - version = "0.8.6" #Version of your software, e.g. "1.2.0" or "0.8.2" - build = "0" #Build number, e.g. "1" for the first build of this - #version of your software. Increment - #for later re-builds of the same - #version of your software. Text with - #changelog information to be displayed - #in the package "Details" tab of the - #Maemo Application Manager - changeloginformation = """ -* About window as requested by magnuslu -* Switched how storage of active book, chapter, and chapter position is stored -""".strip() - dir_name = "src" #Name of the subfolder containing your package - #source files - #(e.g. usr\share\icons\hicolor\scalable\myappicon.svg, - #usr\lib\myapp\somelib.py). We suggest - #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): - if any(f.startswith(".") for f in root.split(os.sep)): - continue # avoid hidden folders, esp svn ones - - real_dir = root[len(dir_name):] - fake_file = [] - for f in files: - fake_file.append(root + os.sep + f + "|" + f) - if len(fake_file) > 0: - p[real_dir] = fake_file - - print p - if distribution == "debian": - print p.generate( - version="%s-%s" % (version, build), - changelog=changeloginformation, - build=True, - tar=False, - changes=False, - dsc=False, - ) - else: - print p.generate( - version="%s-%s" % (version, build), - changelog=changeloginformation, - build=False, - tar=True, - changes=True, - dsc=True, - ) - print "Building for %s finished" % distribution - - -if __name__ == "__main__": - if len(sys.argv) == 1: - distribution = "fremantle" - else: - distribution = sys.argv[1] - build_package(distribution) diff --git a/support/builddeb.py b/support/builddeb.py new file mode 100755 index 0000000..072ed0e --- /dev/null +++ b/support/builddeb.py @@ -0,0 +1,133 @@ +#!/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 os +import sys + +import py2deb + + +def build_package(distribution): + py2deb.Py2deb.SECTIONS = py2deb.SECTIONS_BY_POLICY[distribution] + try: + os.chdir(os.path.dirname(sys.argv[0])) + except: + pass + + p=py2deb.Py2deb("nqaap") #This is the package name and MUST be in + #lowercase! (using e.g. "mClock" fails + #miserably...) + p.prettyName="NQA Audiobook Player" + 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://wiki.maemo.org/Nqaap""" + p.author="Soeren 'Pengman' Pedersen" + p.mail="pengmeister@gmail.com" + p.license = "lgpl" + 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", + "python-simplejson", + ]) + 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": "sound", + "diablo": "user/multimedia", + "fremantle": "user/multimedia", + }[distribution] + p.icon = "src/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=distribution + p.repository="extras" + p.bugTracker="https://bugs.maemo.org/enter_bug.cgi?product=nQa%20Audiobook%20Player" + 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 + # chmod +x /usr/bin/mclock.py""" #Set here your pre install script + # p.preremove="""#!/bin/sh + # chmod +x /usr/bin/mclock.py""" #Set here your pre remove script + version = "0.8.6" #Version of your software, e.g. "1.2.0" or "0.8.2" + build = "0" #Build number, e.g. "1" for the first build of this + #version of your software. Increment + #for later re-builds of the same + #version of your software. Text with + #changelog information to be displayed + #in the package "Details" tab of the + #Maemo Application Manager + changeloginformation = """ +* About window as requested by magnuslu +* Switched how storage of active book, chapter, and chapter position is stored +""".strip() + dir_name = "src" #Name of the subfolder containing your package + #source files + #(e.g. usr\share\icons\hicolor\scalable\myappicon.svg, + #usr\lib\myapp\somelib.py). We suggest + #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): + if any(f.startswith(".") for f in root.split(os.sep)): + continue # avoid hidden folders, esp svn ones + + real_dir = root[len(dir_name):] + fake_file = [] + for f in files: + fake_file.append(root + os.sep + f + "|" + f) + if len(fake_file) > 0: + p[real_dir] = fake_file + + print p + if distribution == "debian": + print p.generate( + version="%s-%s" % (version, build), + changelog=changeloginformation, + build=True, + tar=False, + changes=False, + dsc=False, + ) + else: + print p.generate( + version="%s-%s" % (version, build), + changelog=changeloginformation, + build=False, + tar=True, + changes=True, + dsc=True, + ) + print "Building for %s finished" % distribution + + +if __name__ == "__main__": + if len(sys.argv) == 1: + distribution = "fremantle" + else: + distribution = sys.argv[1] + build_package(distribution)