Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
#
Lucio Andrés Illanes Albornoz (arab, vxp) 820be1
# . ./build.vars and set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
#
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done fetch; then
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	fetch_git perk ${GITROOT}/perk;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done fetch -configure1;
lalbornoz 340f4c
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
set_build_dir ${2} native;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done configure1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 392fef
	rm_if_exists -m -c ${PKG_BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) ad1a1c
	../perk/configure --prefix=/usr;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done configure1 clean1 -build1;
lalbornoz 340f4c
else
Lucio Andrés Illanes Albornoz (arab, vxp) 392fef
	cd ${PKG_BUILD_DIR};
lalbornoz 340f4c
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done clean1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	make ${MAKEFLAGS} clean;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done clean1 -build1;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done build1; then
lalbornoz 340f4c
	make;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done build1 -install1;
lalbornoz 340f4c
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done install1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	make DESTDIR=${PREFIX} install;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done install1 -configure2;
lalbornoz 340f4c
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
set_build_dir ${2} cross;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done configure2; then
Lucio Andrés Illanes Albornoz (arab, vxp) 392fef
	rm_if_exists -m -c ../${PKG_BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) ad1a1c
	../perk/configure --prefix=/usr --target=${TARGET};
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done configure2 clean2 -build2;
lalbornoz 340f4c
else
Lucio Andrés Illanes Albornoz (arab, vxp) 392fef
	cd ../${PKG_BUILD_DIR};
lalbornoz 340f4c
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done clean2; then
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	make ${MAKEFLAGS} clean;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done clean2 -build2;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done build2; then
lalbornoz 340f4c
	make;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done build2 -install2;
lalbornoz 340f4c
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
if ! is_build_script_done install2; then
Lucio Andrés Illanes Albornoz (arab, vxp) 820be1
	make DESTDIR=${PKG_PREFIX} install;
Lucio Andrés Illanes Albornoz (arab, vxp) 1d0876
	set_build_script_done install2 finish;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
lalbornoz 340f4c
# vim:filetype=sh