1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#!/usr/bin/make -f
# debian/rules for invesalius
# Andreas Tille <tille@debian.org>
# GPL
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
export PYBUILD_NAME=invesalius
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_configure: create-cython-dir
dh_auto_configure
override_dh_auto_build:
python3 setup.py build_ext --inplace
override_dh_auto_clean:
# dh_auto_clean
rm -f invesalius3
override_dh_compress:
dh_compress --exclude=LICENSE.pt.txt --exclude=.inv3
create-cython-dir:
mkdir -p invesalius_cy/
touch invesalius_cy/__init__.py
cp invesalius/data/*.pyx invesalius_cy
cp invesalius/data/*.pxd invesalius_cy
override_dh_clean:
dh_clean
rm -rf invesalius_cy
rm -rf build
create-launcher:
echo '#!/bin/sh' > invesalius3
echo 'export INV_SAMPLE_DIR="/usr/share/doc/invesalius-examples/examples/"' >> invesalius3
echo 'export GDK_BACKEND=x11' >> invesalius3
echo 'export PYTHONPATH=$$PYTHONPATH:"/usr/lib/invesalius"' >> invesalius3
echo 'export INVESALIUS_LIBRARY_PATH="/usr/share/invesalius/"' >> invesalius3
echo 'cd $$INVESALIUS_LIBRARY_PATH' >> invesalius3
echo 'python3 app.py $$@' >> invesalius3
override_dh_install: create-launcher
dh_install
override_dh_installchangelogs:
dh_installchangelogs changelog.md
override_dh_auto_install: ;
|