This repository has been archived by the owner on Jun 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmake.py
66 lines (58 loc) · 2.34 KB
/
make.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/python
# -*- 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 pypackager
import os
import khteditor
if __name__ == "__main__":
try:
os.chdir(os.path.dirname(sys.argv[0]))
except:
pass
p=pypackager.PyPackager("khteditor")
p.version=khteditor.__version__
p.buildversion='1'
p.display_name='KhtEditor'
p.description="KhtEditor is a source code editor specially designed for devices running Maemo and Meego Handset."
p.author="Benoît HERVIER"
p.maintainer="Khertan"
p.email="[email protected]"
p.depends = "python2.5-qt4-gui,python2.5-qt4-core, python2.5-qt4-maemo5, python2.5-qt4-common, python-pygments"
p.suggests = "pylint"
p.section="user/development"
p.arch="armel"
p.urgency="low"
p.bugtracker='http://khertan.net/khteditor/bugs'
p.distribution="fremantle"
p.repository="extras-devel"
p.icon='khteditor.png'
p["/usr/bin"] = ["khteditor_launch.py",]
p["/usr/share/dbus-1/services"] = ["khteditor.service",]
p["/usr/share/icons/hicolor/128x128/apps"] = ["khteditor.png",]
p["/usr/share/pixmaps"] = ["khteditor.png",]
p["/usr/share/applications/hildon"] = ["khteditor.desktop",]
files = []
#Src
for root, dirs, fs in os.walk('/home/user/MyDocs/Projects/khteditor/khteditor'):
for f in fs:
#print os.path.basename(root),dirs,f
prefix = 'khteditor/'
if os.path.basename(root) != 'khteditor':
prefix = prefix + os.path.basename(root) + '/'
files.append(prefix+os.path.basename(f))
print files
p["/usr/lib/python2.5/site-packages"] = files
p.postinstall = """#!/bin/sh
chmod +x /usr/bin/khteditor_launch.py
python -m compileall /usr/lib/python2.5/site-packages/khteditor"""
p.changelog=""" * Fix pylint plugin, * Fix bug #35 loading generic highlighter"""
print p.generate(build_binary=False,build_src=True)
#print p.generate(build_binary=True,build_src=True)