summaryrefslogtreecommitdiff
path: root/ports/dash
blob: aa154352e381e621e9b9a994def10e2949d424f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
set -eu
camellia_path_check

VERSION=dash-0.5.12

fetch() {
	wget -nc https://gondor.apana.org.au/~herbert/dash/files/dash-0.5.12.tar.gz
	echo "6a474ac46e8b0b32916c4c60df694c82058d3297d8b385b74508030ca4a8f28a  dash-0.5.12.tar.gz" | sha256sum --check
	tar xf ${VERSION}.tar.gz
}

prep() {
	[ -d ${VERSION} ] || (fetch)
	cd ${VERSION}
	[ -e Makefile ] || ./configure CC=x86_64-camellia-gcc "CFLAGS=-Wno-error=format -Wno-error=unused-but-set-variable" --prefix"=$PREFIX" --host=x86_64-camellia
}

case $1 in
	install) (prep; make; make install) ;;
	clean)   (prep; make clean) ;;
	*)       echo "usage: $0 install|clean"; false ;;
esac