#!/usr/bin/make -f

include ../source.mk

nop:
	@:

build:
	chmod a+rx src
	oh-autoconfigure -- \
		--disable-bundled-libtom
	cp ../localoptions.h src/localoptions.h
	oh-autobuild -- \
		PROGRAMS='dropbear dbclient dropbearkey scp' \
		MULTI=1 \
		SCPPROGRESS=1
	oh-autobuild -- \
		PROGRAMS='dropbearconvert'
	touch $@

install: build
	oh-autoinstall -- \
		PROGRAMS='dropbear dbclient dropbearkey scp' \
		MULTI=1
	oh-autoinstall -- \
		PROGRAMS='dropbearconvert'
	install -d -m 0755 dest/etc/init.d
	install -p -m 0755 ../dropbear.pkg/dropbear.init \
		dest/etc/init.d/dropbear
	oh-fixperms
	oh-strip
	oh-installfiles