-
Notifications
You must be signed in to change notification settings - Fork 7
/
conanfile.py
37 lines (32 loc) · 1.24 KB
/
conanfile.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
from conans import ConanFile
class ZeroKernelConan(ConanFile):
name = "zero"
version = "0.4.4"
author = "seppzer0"
url = "https://gitlab.com/api/v4/projects/40803264/packages/conan"
description = "An advanced Android kernel builder with Kali NetHunter support."
topics = ("zero_kernel", "kali-nethunter", "nethunter")
settings = None
options = {
"base": ("los", "pa", "x", "aosp"),
"chroot": ("minimal", "full"),
"codename": ("dumpling", "cheeseburger")
}
def export_sources(self):
self.copy("*", src="source", dst=".")
def build(self):
shared_args = "--build-env=local --base={} --codename={} --chroot={}"\
.format(
self.options.base,
self.options.codename,
self.options.chroot
)
cmd = "python3 builder kernel {0} &&"\
"python3 builder assets {0} --clean"\
.format(shared_args)
print(f"[cmd] {cmd}")
self.run(cmd)
def package(self):
# package built kernel with collected assets
self.copy("*.zip", src="kernel", dst="kernel", keep_path=False)
self.copy("*", src="assets", dst="assets")