forked from linuxerwang/rkflashkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
49 lines (33 loc) · 1023 Bytes
/
wscript
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
#! /usr/bin/env python
# -*- coding: utf-8 -*
VERSION='0.1.5'
APPNAME='rkflashkit'
top = '.'
out = 'build'
src = 'src'
install_path = 'debian/usr/share/rkflashkit/lib'
def options(opt):
opt.load('python')
def configure(conf):
conf.load('python')
conf.check_python_version((2,6,0))
def build(bld):
bld(features='py',
source=bld.path.ant_glob(src + '/**/*.py'),
install_from=src,
install_path=install_path)
if bld.cmd == 'install':
start_dir = bld.path.find_dir('src')
bld.install_files(install_path,
bld.path.ant_glob(src + '/rkflashkit/**/*'),
cwd=start_dir, relative_trick=True)
def chmod(ctx):
print('Creating debian package ...')
ctx.exec_command('chmod -R a+rX debian')
def build_debian(ctx):
print('Creating debian package ...')
ctx.exec_command('fakeroot dpkg -b debian .')
def debian(ctx):
from waflib import Options
commands = ['configure', 'build', 'install', 'chmod', 'build_debian']
Options.commands = commands + Options.commands