File: rules

package info (click to toggle)
pyke 1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,456 kB
  • sloc: python: 12,872; sh: 441; xml: 203; sql: 39; makefile: 39
file content (60 lines) | stat: -rwxr-xr-x 1,931 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
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f
%:
	dh $@

override_dh_auto_configure:
	rm -rf pyke/krb_compiler/ply/ pyke/krb_compiler/*_tables.py
	# Regenerating python-ply cached tables
	python -c "from pyke.krb_compiler import kfbparser, krbparser, scanner; \
		scanner.init(scanner, 0, True); \
		krbparser.init(krbparser, True); \
		kfbparser.init(kfbparser, True)"
	# Set the correct debug path inside tables
	sed -i 's:pyke/krb_compiler:/usr/share/pyshared/pyke/krb_compiler:' \
		pyke/krb_compiler/*_tables.py

override_dh_auto_test:
	# Run tests twice to make sure that all of the tests run properly
	# whether they have to compile the knowledge base sources or not.
	# Compilation of the knowledge base will occur on first run.
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	set -e; \
	for python in $(shell pyversions -r); do \
		$$python /usr/bin/nosetests --with-doctest pyke/; \
		$$python /usr/bin/nosetests --with-doctest pyke/; \
		rm -rf compiled_krb/; \
	done
endif

override_dh_auto_install:
	dh_auto_install
	# Correct Metadata-Version; see bug #645125
	find debian/tmp/ -name '*.egg-info' \
		-exec sed -i -e 's/^\(Metadata-Version:\) 1.0$$/\1 1.1/' {} +

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES-1.txt upstream

override_dh_installdocs:
	# Preserve stylesheets moving outside built documentation
	mv doc/html/stylesheets doc/
	# Remove built documentation shipped in upstream package
	rm -rf doc/html/
	# Add target links using upstream script
	cd doc/source; bin/add_links
	# Build documentation from source
	cd doc/; /usr/bin/r2w
	# Restore documentation source
	cd doc/source; bin/strip_links
	# Copy documentation images
	cp -r doc/source/images doc/html
	# Restore documentation stylesheets
	mv doc/stylesheets doc/html/
	dh_installdocs

override_dh_installexamples:
	dh_installexamples -Xtestall.config

override_dh_gencontrol:
	dh_python-ply -p python-pyke pyke/krb_compiler/*_tables.py
	dh_gencontrol