#!/usr/bin/make -f #export DH_VERBOSE=1 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export DEB_BUILD_MAINT_OPTIONS = hardening=+all PKD = $(abspath $(dir $(MAKEFILE_LIST))) 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 $@ override_dh_auto_configure: override_dh_auto_build: override_dh_auto_install: cd fparser && cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) . && make && make install DESTDIR=../debian/tmp cd CSXCAD && cmake -DCMAKE_INSTALL_PREFIX=/usr -DFPARSER_ROOT_DIR=../debian/tmp/usr -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) . && make && make install DESTDIR=../debian/tmp cd QCSXCAD && cmake -DCMAKE_INSTALL_PREFIX=/usr -DFPARSER_ROOT_DIR=../debian/tmp/usr -DCSXCAD_ROOT_DIR=../debian/tmp/usr -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) . && make && make install DESTDIR=../debian/tmp cd openEMS && cmake -DCMAKE_INSTALL_PREFIX=/usr -DFPARSER_ROOT_DIR=../debian/tmp/usr -DCSXCAD_ROOT_DIR=../debian/tmp/usr -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) . cd openEMS && make cd openEMS && make install DESTDIR=../debian/tmp cd AppCSXCAD && cmake -DCMAKE_INSTALL_PREFIX=/usr -DFPARSER_ROOT_DIR=../debian/tmp/usr -DCSXCAD_ROOT_DIR=../debian/tmp/usr -DQCSXCAD_ROOT_DIR=../debian/tmp/usr -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) . 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 get-orig-source: $(info I: $(PKG)_$(VER)) @echo "# Downloading..." uscan --noconf --verbose --rename --destdir=$(CURDIR) --force-download --download-version $(VER) $(PKD)