#!/usr/bin/make -f

include ../source.mk

ARGS = \
	PREFIX=/usr \
	LIBDIR=/usr/lib/$(OPK_HOST_ARCH) \
	MANDIR=/usr/share/man \
	BUILD_STATIC_LIB=0

nop:
	@:

build:
	oh-autobuild -- $(ARGS)
	touch $@

install: build
	oh-autoinstall -- $(ARGS)
	# Bash scripts (and their manual pages):
	rm \
		dest/usr/sbin/fancontrol \
		dest/usr/share/man/man8/fancontrol.8 \
		dest/usr/sbin/pwmconfig \
		dest/usr/share/man/man8/pwmconfig.8
	# Perl scripts (and their manual pages):
	rm \
		dest/usr/bin/sensors-conf-convert \
		dest/usr/share/man/man8/sensors-conf-convert.8 \
		dest/usr/sbin/sensors-detect \
		dest/usr/share/man/man8/sensors-detect.8
	# Tools we simply do not (yet) need:
	rm \
		dest/usr/sbin/isadump \
		dest/usr/share/man/man8/isadump.8 \
		dest/usr/sbin/isaset \
		dest/usr/share/man/man8/isaset.8
	oh-fixperms
	oh-strip
	oh-installfiles
	oh-shlibdeps