#!/usr/bin/make -f # -*- makefile -*- #export DH_VERBOSE=1 INSTALL_DIR = $(CURDIR)/debian/tmp BUILD_FLAGS = \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_BINDIR=lib/nrn/bin \ -DCMAKE_INSTALL_LIBDIR=lib/nrn \ -DNRN_3RDPARTY_USE_BACKWARD:BOOL=OFF \ -DNRN_3RDPARTY_USE_CATCH2:BOOL=OFF \ -DNRN_3RDPARTY_USE_RANDOM123:BOOL=OFF \ -DNRN_ENABLE_INTERVIEWS:BOOL=ON \ -DNRN_ENABLE_PYTHON:BOOL=ON \ -DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DNRN_ENABLE_PYTHON_DYNAMIC:BOOL=ON \ -DNRN_MODULE_INSTALL_OPTIONS:STRING=--prefix=$(INSTALL_DIR)/usr \ -DCMAKE_INSTALL_RPATH=/usr/lib/nrn %: dh $@ --with python3 --buildsystem=cmake override_dh_auto_configure: dh_auto_configure -- $(BUILD_FLAGS) override_dh_auto_install: dh_auto_install --buildsystem=cmake --destdir=$(INSTALL_DIR) # files conflicting with nrn InterViews rm $(INSTALL_DIR)/usr/include/ivstream.h # unneeded files rm -f $(INSTALL_DIR)/usr/lib/python/neuron/rxd/geometry3d/setup.py # fix paths sed -i '/exec_prefix=/{s|.*| exec_prefix=/usr/lib/nrn/|; :a;n;ba}' $(INSTALL_DIR)/usr/lib/nrn/bin/nrnivmodl mv $(INSTALL_DIR)/usr/bin/modlunit $(INSTALL_DIR)/usr/lib/nrn/bin mv $(INSTALL_DIR)/usr/bin/nocmodl $(INSTALL_DIR)/usr/lib/nrn/bin # sort out private libraries mkdir -p $(INSTALL_DIR)/usr/lib/nrn mv $(INSTALL_DIR)/usr/lib/*.so $(INSTALL_DIR)/usr/lib/nrn chrpath -r /usr/lib/nrn $(INSTALL_DIR)/usr/bin/nrniv chrpath -d $(INSTALL_DIR)/usr/lib/nrn/libnrniv.so find $(INSTALL_DIR)/usr/lib/ \ -name 'hoc.cpython*.so' \ -exec chrpath -r '/usr/lib/nrn' '{}' \;