File: rules

package info (click to toggle)
xmds2 3.0.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,956 kB
  • sloc: python: 64,216; cpp: 3,929; ansic: 1,463; makefile: 115; sh: 54
file content (45 lines) | stat: -rwxr-xr-x 1,592 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
#!/usr/bin/make -f
# -*- makefile -*-

#DH_VERBOSE=1

%:
	dh $@ --with python3

override_dh_auto_install:
	python3 setup.py install --root=debian/xmds2 --install-layout=deb
	python3 debian/fix-cheetah-build-str.py

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	debian/tests/run-tests -b
endif

override_dh_auto_clean:
	cd xpdeint; waf/waf-light configure
	make clean
	dh_clean

JSDIR = /usr/share/javascript
INSTDIR = $(CURDIR)/debian/xmds2-doc
DOCDIR = $(INSTDIR)/usr/share/doc/xmds2
override_dh_installdocs:
	dh_installdocs
	# Fix Lintian error privacy-breach-may-use-debian-package
	sed -i 's|http://cdn.mathjax.org/mathjax/latest/|file:///usr/share/javascript/mathjax/|g;s|http://www.xmds.org/|file:///usr/share/doc/xmds2/|g' $(DOCDIR)/*.html $(DOCDIR)/_static/*.js
	for i in underscore jquery ; do						\
		ln -fs $(JSDIR)/$$i/$$i.js $$(find $(INSTDIR) -name $$i.js) ;	\
	done

CHEETAH_MAJOR_VERSION = $(shell dpkg -s python3-cheetah | grep ^Version: | cut -f2 -d\  | cut -f1 -d.)
override_dh_gencontrol:
	dh_gencontrol -- -VCheetah-Depends="python3-cheetah (>= $(CHEETAH_MAJOR_VERSION)), python3-cheetah (<< $$(($(CHEETAH_MAJOR_VERSION) + 1)))"

override_dh_installdeb:
	# Remove pre-compiled Python source files, as per the Debian
	# Python Policy section 3.7 (Modules Byte-Compilation)
	@echo "*********************************************************"
	@echo "Warning: check whether the following fix is still needed:"
	@echo "*********************************************************"
	find debian/xmds2 -name __pycache__ -exec rm -r '{}' \;
	dh_installdeb