#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/cdbs/1/class/octave-pkg.mk

export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -SDate | date -f- +%s)

pkg = communications
archshr = $(CURDIR)/debian/octave-$(pkg)/usr/share
indepshr = $(CURDIR)/debian/octave-$(pkg)-common/usr/share

DEB_DH_INSTALL_SOURCEDIR = debian/octave-$(pkg)

build/octave-$(pkg)::
	for i in awgn.pdf eyediagram.pdf scatterplot.pdf ; do		\
	    make -C doc $$i ;						\
	    sed -i -e 's|/tmp/oct-.......eps|/tmp/oct.eps|' doc/$$i ;	\
	done
	make -C doc comms.pdf comms.info

install/octave-$(pkg)-common:: install/octave-$(pkg)

install/octave-$(pkg)::
	# Move the architecture independent files into the appropriate
	# package
	mkdir -p $(indepshr)
	mv $(archshr)/octave $(indepshr)
