started packaging work
[mevemon] / build_mevemon.py
1 #!/usr/bin/python2.5
2 # -*- coding: utf-8 -*-
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published
5 ## by the Free Software Foundation; version 2 only.
6 ##
7 ## This program is distributed in the hope that it will be useful,
8 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
9 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 ## GNU General Public License for more details.
11 ##
12 import py2deb
13 import os
14
15 if __name__ == "__main__":
16     try:
17         os.chdir(os.path.dirname(sys.argv[0]))
18     except:
19         pass
20     print
21     p=py2deb.Py2deb("mevemon")   #This is the package name and MUST be in lowercase! (using e.g. "mClock" fails miserably...)
22     p.description="A character monitor for EVE Online."
23     p.author="Ryan Campbell"
24     p.mail="campbellr@@gmail.com"
25     p.depends = "python2.5, python2.5-gtk2"
26     p.section = "user/games"
27     p.icon = ""
28     p.arch="all"                #should be all for python, any for all arch
29     p.urgency="low"             #not used in maemo onl for deb os
30     p.distribution="fremantle"
31     p.repository="extras-devel"
32     p.xsbc_bugtracker="http://bugs.maemo.org"
33     #  p.postinstall="""#!/bin/sh
34     #  chmod +x /usr/bin/mclock.py""" #Set here your post install script
35     #  p.postremove="""#!/bin/sh
36     #  chmod +x /usr/bin/mclock.py""" #Set here your post remove script
37     #  p.preinstall="""#!/bin/sh
38     #  chmod +x /usr/bin/mclock.py""" #Set here your pre install script
39     #  p.preremove="""#!/bin/sh
40     #  chmod +x /usr/bin/mclock.py""" #Set here your pre remove script
41     version = "0.1"           #Version of your software, e.g. "1.2.0" or "0.8.2"
42     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.
43                                 #Text with changelog information to be displayed in the package "Details" tab of the Maemo Application Manager
44     changeloginformation = "First release." 
45     dir_name = "src"            #Name of the subfolder containing your package source files
46
47     for root, dirs, files in os.walk(dir_name):
48         real_dir = root[len(dir_name):]
49         fake_file = []
50         for f in files:
51             fake_file.append(root + os.sep + f + "|" + f)
52         if len(fake_file) > 0:
53             p[real_dir] = fake_file
54     print p
55     r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True)
56