summaryrefslogtreecommitdiffhomepage
path: root/337.mksh.vars
blob: b7b4582fdc413d4692aa6501ade20cb57b74877d (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
#
# . ./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