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 p.description="Scripts to run Debian applications easily in maemo\n for users not familiar with the command line.\n NB: A large image file must be downloaded\n and installed before this package will work!\n You will need approx. 1.5 GB free in either\n your MyDocs directory or your MicroSD card.\n Instructions and an automated installer\n are provided in the package.\n (This is the Easy Debian 'Stable Lenny' Fremantle version.)"
25 p.author="Alan Bruce (qole)"
26 p.mail="alan@thebruces.ca"
27 p.depends = "easy-chroot, bzip2, wget"
28 p.section="user/system"
29 p.icon = "deblet-48.png"
30 p.arch="armel" #should be all for python, any for all arch
31 p.urgency="low" #not used in maemo onl for deb os
32 p.distribution="fremantle"
33 p.repository="extras-devel"
34 qolepostinst = open("control/postinst", "r")
35 p.postinstall=qolepostinst.read()
36 qolepostrm = open("control/postrm", "r")
37 p.postremove=qolepostrm.read()
38 qolepreinst = open("control/preinst", "r")
39 p.preinstall=qolepreinst.read()
40 # p.postinstall="postinst"
41 # p.postremove="postrm"
42 # p.preinstall="preinst"
43 qoleprerm = open("control/prerm", "r")
44 p.preremove=qoleprerm.read()
47 version = "0.9.35" #Version of your software, e.g. "1.2.0" or "0.8.2"
48 build = "3fremantle1" #Build number
49 #Text with changelog information to be displayed in the package "Details" tab of the HAM
50 qolechangelog = open("control/changelog", "r")
51 changeloginformation = qolechangelog.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)