File: rules

package info (click to toggle)
pyro4 4.53-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,220 kB
  • ctags: 2,587
  • sloc: python: 15,995; makefile: 178; sh: 55
file content (42 lines) | stat: -rwxr-xr-x 1,310 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

export PYBUILD_NAME = pyro4
export PYBUILD_DESTDIR_python2=debian/python2-pyro4/

DOCDIR=$(CURDIR)/debian/pyro4-doc/usr/share/doc/pyro4-doc/
EXAMPLESDIR=$(CURDIR)/debian/pyro4-examples/usr/share/doc/pyro4/examples/

override_dh_auto_build:
	dh_auto_build
	cd $(CURDIR)/docs/ && $(MAKE) html

override_dh_installdocs:
	dh_installdocs
	find $(DOCDIR) -name \*.html -exec \
		sed -i 's|_static/jquery.js|/usr/share/javascript/jquery/jquery.js|' {} \;
	find $(DOCDIR) -name \*.html -exec \
		sed -i 's|_static/underscore.js|/usr/share/javascript/underscore/underscore.js|' {} \;
	rm $(DOCDIR)/html/_sources/license.txt
	rm $(DOCDIR)/html/_static/jquery.js
	rm $(DOCDIR)/html/_static/underscore.js

override_dh_fixperms:
	find $(EXAMPLESDIR) -type f -exec chmod a-x {} \;
	dh_fixperms

override_dh_installinit:
	dh_installinit -ppyro4 --name=pyro4-nsd --onlyscripts
	# Due to --onlyscripts above, default file is not installed
	# automatically
	install -m0644 -D $(CURDIR)/debian/pyro4.pyro4-nsd.default \
		$(CURDIR)/debian/pyro4/etc/default/pyro4-nsd

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

.PHONY: override_dh_auto_build override_dh_installdocs \
	override_dh_fixperms override_dh_installinit