Conan_Kudo / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

Blame 207.libz.build

Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
parse_with_pkg_name ${2} libz gzip;
lalbornoz 340f4c
if is_build_script_done finished; then
lalbornoz 340f4c
        exit 212;
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
else
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
	fetch ${_pkg_url} ${_pkg_sha256sum};
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done extracted; then
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	rm_if_exists ${_pkg_fname%%.tar*};
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	tar -axf ${_pkg_fname};
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
	set_build_script_done extracted -configured;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done configured; then
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
	set_build_dir ${_pkg_fname%%-*} native;
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	rm_if_exists -c -m ${_build_dir};
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
	cp ../portage/config.cache .;
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	../${_pkg_subdir}/configure		\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		--host=${HOST_NATIVE}		\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		--prefix=			\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		--target=${TARGET};
lalbornoz 340f4c
	set_build_script_done configured -built;
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
else
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
	cd ${_build_dir};
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done built; then
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
	if [ "x${2}" = "xlibz" ]; then
lalbornoz 340f4c
		make -j18;
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
	elif [ "x${2}" = "xgzip" ]; then
lalbornoz 340f4c
		make clean;
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
		make;
lalbornoz 340f4c
	fi;
lalbornoz 340f4c
	set_build_script_done built -installed;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done installed; then
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
	if [ "x${2}" = "xlibz" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		make -j18 DESTDIR=${PREFIX_NATIVE} install;
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
	elif [ "x${2}" = "xgzip" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) d30b8f
		cp gunzip gzip zcat ${PREFIX_NATIVE}/bin;
lalbornoz 340f4c
	fi;
lalbornoz 340f4c
	set_build_script_done installed finished;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
lalbornoz 340f4c
# vim:filetype=sh