new logo in control file, added autobuilder files
[comic-widget] / build_setup.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 if __name__ == "__main__":
15         try:
16                 os.chdir(os.path.dirname(sys.argv[0]))
17         except:
18                 pass
19         p=py2deb.Py2deb("comic-widget")   #This is the package name and MUST be in lowercase! (using e.g. "mClock" fails miserably...)
20         p.description="A widget that displays comics taken from the web."
21         p.author="Marcus Wikstrom"
22         p.mail="mece@ovi.com"
23         p.depends = "python2.5, python-osso, python-gtk2, python-hildon, python-hildondesktop, python2.5-cairo, hildon-desktop-python-loader"
24         p.section="user/desktop"
25         p.icon = "/home/user/MyDocs/python/comic-widget/source-images/icon2.png"
26         p.arch="all"                #should be all for python, any for all arch
27         p.urgency="low"             #not used in maemo onl for deb os
28         p.distribution="fremantle"
29         p.repository="extras-devel"
30         p.xsbc_bugtracker="http://bugs.maemo.org"
31         #  p.postinstall="""#!/bin/sh
32         #  chmod +x /usr/bin/mclock.py""" #Set here your post install script
33         #  p.postremove="""#!/bin/sh
34         #  chmod +x /usr/bin/mclock.py""" #Set here your post remove script
35         #  p.preinstall="""#!/bin/sh
36         #  chmod +x /usr/bin/mclock.py""" #Set here your pre install script
37         #  p.prer 1000 emove="""#!/bin/sh
38         #  chmod +x /usr/bin/mclock.py""" #Set here your pre remove script
39         version = "0.2.5"           #Version of your software, e.g. "1.2.0" or "0.8.2"
40         build = "2"                 #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.
41                                      #Text with changelog information to be displayed in the package "Details" tab of the Maemo Application Manager
42         changeloginformation = "New logo!" 
43         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
44         #Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list 
45         for root, dirs, files in os.walk(dir_name):
46                 real_dir = root[len(dir_name):]
47                 fake_file = []
48                 for f in files:
49                         fake_file.append(root + os.sep + f + "|" + f)
50                 if len(fake_file) > 0:
51                         p[real_dir] = fake_file
52         print p
53         r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True)
54