#!/usr/bin/make -f
# debian/rules for loki using dh
# Andreas Tille <tille@debian.org>, GPL

pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')

MANPAGES=check_het.1 \
         hist.1 \
         loki_count.1 \
         loki_dist.1 \
         loki_ext.1 \
         loki_freq.1 \
         loki_sort_error.1 \
         prep.1 \
         qavg.1


%:
	dh $@

override_dh_auto_install:
	for man in $(MANPAGES) ; do \
	    ln -s loki.1.gz debian/$(pkg)/usr/share/man/man1/$${man}.gz ; \
	done
	make install prefix=$(CURDIR)/debian/loki/usr bindir=$(CURDIR)/debian/loki/usr/bin LDFLAGS="$(LDFLAGS)"
