summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2016-10-06 23:53:36 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2016-10-06 23:53:36 +0200
commit95f11f17ad90ddabd4b3e1bd31559fb1c8ecce21 (patch)
treef34b277a5238146e62ed1b39f67f2dac2e0ea5a3 /debian/rules
parentcdf205e398eaa88b76ee1cb7da2de422e926b170 (diff)
Install .oct files at the correct place
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules8
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index c14726e..d4bea57 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,11 @@ PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+OCTAVE_BPATH = usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)/octave/packages
+OCTAVE_HOSTTYPE = $(shell octave-config -p CANONICAL_HOST_TYPE)
+OCTAVE_API_VERSION = $(shell octave-config -p API_VERSION)
+OCTAVE_FULLBPATH = $(OCTAVE_BPATH)/openEMS-0.0.34/$(OCTAVE_HOSTTYPE)-$(OCTAVE_API_VERSION)
+
%:
dh $@
@@ -29,6 +34,9 @@ override_dh_auto_install:
cd AppCSXCAD && make
cd AppCSXCAD && make install DESTDIR=../debian/tmp
cd debian/tmp/usr/share/openEMS/matlab && CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" mkoctfile -lhdf5_cpp -DH5_USE_16_API h5readatt_octave.cc
+ mkdir debian/tmp/$(OCTAVE_FULLBPATH)
+ mv debian/tmp/usr/share/openEMS/matlab/h5readatt_octave.oct /$(OCTAVE_FULLBPATH)/
+ rm debian/tmp/usr/share/openEMS/matlab/h5readatt_octave.o