summaryrefslogtreecommitdiffhomepage
path: root/100.perk.build
blob: cb6d80593ab1698b13a46a7fb1056788e8d22ce4 (plain)
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
#
# . ./build.vars and set -o errexit are assumed.
#

if ! is_build_script_done fetch; then
	fetch_git perk ${GITROOT}/perk;
	set_build_script_done fetch -configure1;
fi;
set_build_dir ${2} native;
if ! is_build_script_done configure1; then
	rm_if_exists -m -c ${PKG_BUILD_DIR};
	../perk/configure --prefix=/usr;
	set_build_script_done configure1 clean1 -build1;
else
	cd ${PKG_BUILD_DIR};
fi;
if ! is_build_script_done clean1; then
	make ${MAKEFLAGS} clean;
	set_build_script_done clean1 -build1;
fi;
if ! is_build_script_done build1; then
	make;
	set_build_script_done build1 -install1;
fi;
if ! is_build_script_done install1; then
	make DESTDIR=${PREFIX} install;
	set_build_script_done install1 -configure2;
fi;
set_build_dir ${2} cross;
if ! is_build_script_done configure2; then
	rm_if_exists -m -c ../${PKG_BUILD_DIR};
	../perk/configure --prefix=/usr --target=${TARGET};
	set_build_script_done configure2 clean2 -build2;
else
	cd ../${PKG_BUILD_DIR};
fi;
if ! is_build_script_done clean2; then
	make ${MAKEFLAGS} clean;
	set_build_script_done clean2 -build2;
fi;
if ! is_build_script_done build2; then
	make;
	set_build_script_done build2 -install2;
fi;
if ! is_build_script_done install2; then
	make DESTDIR=${PREFIX_LVL} install;
	set_build_script_done install2 finish;
fi;

# vim:filetype=sh