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

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

OCTPKG_TEST_ENV = xvfb-run

export CFLAGS = $(shell dpkg-buildflags  --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)

# The following rule is needed because an empty lib/ directory is
# needed for building the package correctly.  Even though there is one
# in the tarball, it is not created by gbp-import-orig, hence the
# mkdir command below.
pre-build::
	mkdir -p lib

# Install the architecture independent files
octdir = debian/octave-ltfat-common/usr/share/
install/octave-ltfat-common:: install/octave-ltfat

install/octave-ltfat::
	mkdir -p $(octdir)
	mv debian/octave-ltfat/usr/share/octave $(octdir)
	# Fix file permission
	@echo "************************************************************"
	@echo "Warning: check whether this fix is still needed:"
	find  $(octdir) -name \*.m | xargs chmod -x
	@echo "************************************************************"
