#!/usr/bin/make -f PROLOG_ABI = $(shell swipl --abi_version | sed 's/^swipl-abi-//') cmd = eye.pvm # generate manpage with help2man from --help option of executable _mkman = help2man $(if $3,--name "$(strip $3)") --no-info --no-discard-stderr --output $2 $1 \ || { $1 --help; false; } %: dh $@ override_dh_auto_build: swipl -o eye.pvm --emulator=/usr/bin/swipl -g main -c eye.pl -- --image $(cmd) $(call _mkman, ./$(cmd), debian/$(cmd).1, \ Euler Yet another proof Engine (EYE) semantic web reasoning engine) override_dh_installchangelogs: dh_installchangelogs RELEASE # fix hashbang execute_after_dh_installexamples: find debian/*/usr/share/doc/*/examples -type f -name test -print0 | \ xargs -r0 sed -i -e '2s|^eye |eye.pvm |' override_dh_gencontrol: dh_gencontrol -- -V"prolog:ABI=$(PROLOG_ABI)"