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) 990c25
	set_build_script_done fetch -configure;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
if [ "${3}" = native ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	set_build_dir ${2} native;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done configure; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		rm_if_exists -m -c ${PKG_BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		../perk/configure --prefix=/usr;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done configure clean -build;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	else
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		cd ${PKG_BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done clean; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		make ${MAKEFLAGS} clean;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done clean -build;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done build; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		make;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done build -install;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done install; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		make DESTDIR=${PREFIX} install;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done install finish;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
elif [ "${3}" = cross ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	set_build_dir ${2} cross;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done configure; then
Lucio Andrés Illanes Albornoz (arab, vxp) 990c25
		rm_if_exists -m -c ${PKG_BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		../perk/configure --prefix=/usr --target=${TARGET};
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done configure clean -build;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	else
Lucio Andrés Illanes Albornoz (arab, vxp) 990c25
		cd ${PKG_BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done clean; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		make ${MAKEFLAGS} clean;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done clean -build;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done build; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		make;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done build -install;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	if ! is_build_script_done install; then
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		make DESTDIR=${PKG_PREFIX} install;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
		set_build_script_done install finish;
Lucio Andrés Illanes Albornoz (arab, vxp) 806c98
	fi;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
lalbornoz 340f4c
# vim:filetype=sh