Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 export QT_API = PyQt5
8
9 DESTDIR = debian/geophar
10
11 %:
12 dh $@ --buildsystem=pybuild --with python3
13
14 override_dh_auto_clean:
15 rm -rf .pybuild/ Geophar.egg-info/ debian/.debhelper/ \
16 debian/debhelper-build-stamp debian/files \
17 debian/geophar.postinst.debhelper \
18 debian/geophar.prerm.debhelper \
19 debian/geophar.substvars \
20 debian/geophar/ \
21 $$(find . -type d -name __pycache__) \
22 $$(find wxgeometrie/ -name tools) \
23 config/log/* \
24 config/preferences/* \
25 config/session/*
26
27 PIXMAPDIR = debian/geophar/usr/share/pixmaps
28 override_dh_install:
29 dh_install
30 # install an icon
31 install -d $(PIXMAPDIR)
32 install -m 644 debian/geophar.png $(PIXMAPDIR)/geophar.png
33 #######################################################
34 # replace javascript libraries which were bundled in the
35 # upstream package by symlinks
36 #######################################################
37
38 ###################### jsMath #########################
39 ln -s /usr/share/jsmath \
40 debian/geophar/usr/share/geophar/wxgeometrie/doc/html/_static/jsMath
41
42 # remove extra license files
43 find debian/geophar -name "LICENSE" -exec rm {} \;
44 find debian/geophar -name "license*" -exec rm {} \;
45 # fix a few wrong permissions
46 find debian/geophar -name "*.py" -exec chmod 644 {} \;
47 chmod 644 debian/geophar/usr/share/geophar/tools/bash_autocompletion
48 chmod 755 debian/geophar/usr/share/geophar/tools/resources/geophar
49 chmod 755 debian/geophar/usr/share/geophar/tools/hooks/pre-commit
50 chmod 755 debian/geophar/usr/share/geophar/tools/hooks/post-commit
51 # remove files which cannot be compiled by python 2
52 rm -rf debian/geophar/usr/share/geophar/wxgeometrie/sympy/mpmath/tests
53 rm -f debian/geophar/usr/share/geophar/wxgeometrie/sympy/mpmath/libmp/exec_py3.py
54 # replace all the privacy-breaches
55 for f in $$(grep -rl 'script.*src.*mathjax' $(DESTDIR)/usr/share/geophar/wxgeometrie/doc/html); do \
56 sed -i 's%https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML%http://localhost/javascript/mathjax/MathJax.js%' $$f; \
57 done
58 # modify the version number
59 date=$$(date --utc --date="@$$(dpkg-parsechangelog --show-field Timestamp)" +"(%Y, %-m, %-d)"); \
60 version=$$(dpkg-parsechangelog --show-field Version); \
61 fileToChange=debian/geophar/usr/share/geophar/wxgeometrie/version.py; \
62 echo version = $$version, date_version = $$date; \
63 sed -i -e "s/^version =.*/version = '$$version'/" \
64 -e "s/^date_version =.*/date_version = $$date/" $$fileToChange
65
66 override_dh_auto_test:
67 echo "no test for now"
68 : # export QT_QPA_PLATFORM=offscreen; \
69 : # export QTWEBENGINE_DISABLE_SANDBOX=1; \
70 : # export MPLCONFIGDIR=.pybuild/tmp; \
71 : # ln -s ../../../../tools wxgeometrie/modules/tablatex/tests/; \
72 : # ln -s ../../../../tools wxgeometrie/modules/probabilites/tests/; \
73 : # ln -s ../../../tools wxgeometrie/geolib/tests/; \
74 : # ln -s ../../../tools wxgeometrie/mathlib/tests/; \
75 : # python3 -m unittest discover -v --pattern="test_*.py"
76