File: rules

package info (click to toggle)
sasview 4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 89,008 kB
  • sloc: python: 63,922; xml: 10,220; cpp: 5,356; ansic: 3,195; sh: 292; makefile: 171
file content (49 lines) | stat: -rwxr-xr-x 1,596 bytes parent folder | download
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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=sasview

# Enable additional hardening options for the binaries but not PIE since it is
# not wanted for shared libraries.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

# SasView insists on writing to ~/sasview.log
export HOME = $(CURDIR)/build/

# Force pdflatex to use SOURCE_DATE_EPOCH for \today too
export FORCE_SOURCE_DATE = 1


%:
	dh $@ --with python2,sphinxdoc --buildsystem=pybuild

override_dh_auto_clean:
	dh_auto_clean
	# clean up docs
	rm -rf docs/sphinx-docs/build docs/sphinx-docs/source-temp otherdocs
	# clean up tests
	find test -name logs -type d -exec rm -rf {} +
	rm -rf test/tests.log .cache test/.cache

override_dh_auto_build-indep:
	# build the arch-dep packages to be able to build the docs
	dh_auto_build
	# reassemble the docs from dependent packages to make the overall
	./debian/fetchdocs
	python ./docs/sphinx-docs/build_sphinx.py
	# Strip absolute build paths from HTML documentation
	find -type f -name '*.html' -print0 | \
	  xargs -0r sed -i -e "s@$(CURDIR)/`echo build/lib.*`@path/to@g"
	ln -sf /usr/share/javascript/mathjax/ docs/sphinx-docs/build/html/_static/

override_dh_auto_test-indep:
	# nothing to do

override_dh_install:
	mkdir -p debian/sasview/usr/bin
	mv debian/python-sasview/usr/bin/sasview debian/sasview/usr/bin/sasview
	dh_install -p sasview debian/sasview.desktop usr/share/applications
	dh_install -p sasview debian/sasview.{png,svg} usr/share/pixmaps
	dh_numpy