add files to make package
authorJuke <juke@free.fr>
Mon, 8 Feb 2010 23:50:48 +0000 (00:50 +0100)
committerJuke <juke@free.fr>
Mon, 8 Feb 2010 23:50:48 +0000 (00:50 +0100)
build_myapp.py [new file with mode: 0644]
masstransit.desktop [new file with mode: 0644]

diff --git a/build_myapp.py b/build_myapp.py
new file mode 100644 (file)
index 0000000..2cb7dce
--- /dev/null
@@ -0,0 +1,54 @@
+#!/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.
+##
+import py2deb
+import os
+if __name__ == "__main__":
+       try:
+               os.chdir(os.path.dirname(sys.argv[0]))
+       except:
+               pass
+       print
+       p=py2deb.Py2deb("masstransit")   #This is the package name and MUST be in lowercase! (using e.g. "mClock" fails miserably...)
+       p.description="Les horaires de rer"
+       p.author="Julien Hebert"
+       p.mail="juke@free.fr"
+       p.depends = "python2.5, python2.5-gtk2"
+       p.section="user/navigation"
+       #p.icon = "/home/user/MyDocs/masstransit/mClock.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.xsbc_bugtracker="http://bugs.maemo.org"
+       #  p.postinstall="""#!/bin/sh
+       #  chmod +x /usr/bin/mclock.py""" #Set here your post install script
+       #  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.1.3"           #Version of your software, e.g. "1.2.0" or "0.8.2"
+       build = "1"                 #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 = "Fixed (large) icon." 
+       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):
+               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
+       r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True)
diff --git a/masstransit.desktop b/masstransit.desktop
new file mode 100644 (file)
index 0000000..03f0117
--- /dev/null
@@ -0,0 +1,13 @@
+ [Desktop Entry]
+ Version=1.0.0 Version of this file, NOT of the app. Keep it at 1.0.0
+ Encoding=UTF-8
+ Name=masstransit      Name of the app as seen in Menu
+ Comment=Horaires de bus       Description of the app as seen as subtitle in Menu in Finger mode 
+ Exec=/opt/masstransit/masstransit.py  Link to the app
+ Icon=masstransit      Name of our icon file, without the trailing .png part
+ X-Icon-path=/usr/share/icons  Path to the icon
+ X-Window-Icon=masstransit     Name of our icon file, without the trailing .png part (again?!)
+ Type=Application
+# X-Osso-Service=com.nokia.masstransit 
+ X-Osso-Type=application/x-executable
+# StartupWMClass=mClock        Only needed because it's a PyGame app (would be automatic with GTK)