midipix / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone
Blob Blame History Raw
#
# . ./build.vars and set -o errexit are assumed.
#

pkg_mksh_build() {
	env	CC="${PKG_CC_BUILD}"					\
		CFLAGS="${PKG_CFLAGS_CONFIGURE} ${PKG_CFLAGS_BUILD}"	\
	sh Build.sh;
};

pkg_mksh_install() {
	tar -cpf - mksh |\
		tar -C ${PREFIX_LVL}/bin -xpf -;
	if [ ! -f ${PREFIX_LVL}/etc/shells ]; then
		mkdir -p ${PREFIX_LVL}/etc;
		touch ${PREFIX_LVL}/etc/shells;
	fi;
	if ! grep -xq "/bin/mksh" ${PREFIX_LVL}/etc/shells; then
		echo /bin/mksh >> ${PREFIX_LVL}/etc/shells;
	fi;
	if [ ! -d ${PREFIX_LVL}/share/doc/mksh/examples ]; then
		mkdir -p ${PREFIX_LVL}/share/doc/mksh/examples;
	fi;
	tar -cpf - dot.mkshrc |\
		tar -C ${PREFIX_LVL}/share/doc/mksh/examples -xpf -;
	if [ ! -d ${PREFIX_LVL}/share/man/man1 ]; then
		mkdir -p ${PREFIX_LVL}/share/man/man1;
	fi;
	tar -cpf - mksh.1 |\
		tar -C ${PREFIX_LVL}/share/man/man1 -xpf -;
};

# vim:filetype=sh