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.
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.
16 if __name__ == "__main__":
18 os.chdir(os.path.dirname(sys.argv[0]))
22 p=py2deb.Py2deb("easy-deb-chroot") #This is the package name and MUST be in lowercase!
23 qoledescript = open("control/description", "r")
24 p.description=qoledescript.read()
25 p.xsbc_bugtracker="http://talk.maemo.org/showthread.php?t=34550"
26 p.maemodispname="Easy Debian"
27 version = "0.9.46" #Version of your software, e.g. "1.2.0" or "0.8.2"
28 build = "1fremantle1" #Build number
29 qolechangelog = open("control/changelog", "r")
30 changeloginformation = qolechangelog.read()
31 p.author="Alan Bruce (qole)"
32 p.mail="qole@qole.org"
33 p.depends = "easy-chroot (>=0.2.7), lzma, wget"
34 p.section="user/system"
35 p.icon = "deblet-48.png"
36 p.arch="armel" #should be all for python, any for all arch
37 p.urgency="low" #not used in maemo onl for deb os
38 p.distribution="fremantle"
39 p.repository="extras-devel"
40 qolepostinst = open("control/postinst", "r")
41 p.postinstall=qolepostinst.read()
42 qolepostrm = open("control/postrm", "r")
43 p.postremove=qolepostrm.read()
44 qolepreinst = open("control/preinst", "r")
45 p.preinstall=qolepreinst.read()
46 # p.postinstall="postinst"
47 # p.postremove="postrm"
48 # p.preinstall="preinst"
49 qoleprerm = open("control/prerm", "r")
50 p.preremove=qoleprerm.read()
52 dir_name = "src" #Name of the subfolder containing your package source files
54 #Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list
55 for root, dirs, files in os.walk(dir_name):
56 real_dir = root[len(dir_name):]
59 fake_file.append(root + os.sep + f + "|" + f)
60 if len(fake_file) > 0:
61 p[real_dir] = fake_file
64 r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True)