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
|
#!/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_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
override_dh_clean:
dh_clean
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
# Converting a shipped .ico file into an installed .png icon
mkdir -p debian/invesalius/usr/share/icons/hicolor/64x64/apps/
convert icons/invesalius_64x64.ico -resize 64x64\! debian/invesalius/usr/share/icons/hicolor/64x64/apps/invesalius.png
override_dh_installchangelogs:
dh_installchangelogs changelog.md
override_dh_auto_install: ;
|