File: rules

package info (click to toggle)
mapproxy 1.13.0-1~bpo10%2B1
  • links: PTS, VCS
  • area: main
  • in suites: buster-backports
  • size: 6,332 kB
  • sloc: python: 39,206; xml: 6,328; javascript: 866; makefile: 162
file content (82 lines) | stat: -rwxr-xr-x 3,495 bytes parent folder | download | duplicates (3)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/make -f

#export DH_VERBOSE=1

export PYBUILD_NAME=mapproxy

include /usr/share/dpkg/pkg-info.mk

BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")

MANPAGES := $(wildcard debian/man/*.*.xml)

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

override_dh_clean:
	dh_clean debian/man/*.1

override_dh_auto_clean:
	dh_auto_clean

	$(RM) -r doc/_build/

override_dh_auto_build:
	# Create man page from DocBook XML
	for x in $(MANPAGES) ; do \
	    docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \
	    mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
	done

	dh_auto_build

	(cd doc && PYTHONPATH=$(CURDIR) $(MAKE) html)

override_dh_auto_test:
	dh_auto_test || echo "Ignoring test failures"

override_dh_auto_install:
	PYBUILD_INSTALL_ARGS="--install-scripts=/usr/lib/{package}" dh_auto_install

	# Remove duplicate license file
	$(RM) debian/*/usr/lib/python*/dist-packages/mapproxy/image/fonts/LICENSE

	for V in `py3versions -v -s`; do \
		for F in DejaVuSans.ttf DejaVuSansMono.ttf; do \
			$(RM) debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/image/fonts/$$F ; \
			ln -s /usr/share/fonts/truetype/dejavu/$$F \
			      debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/image/fonts/$$F ; \
		done ; \
		if [ ! -e debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/service/templates ]; then \
			mkdir -p debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/service ; \
			mv debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/service/templates \
			   debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/service/ ; \
		else \
			$(RM) -r debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/service/templates ; \
		fi ; \
		ln -s /usr/share/python3-$(PYBUILD_NAME)/service/templates \
		      debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/service/templates ; \
		if [ ! -e debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/test/schemas ]; then \
			mkdir -p debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/test ; \
			mv debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/test/schemas \
			   debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/test/ ; \
		else \
			$(RM) -r debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/test/schemas ; \
		fi ; \
		ln -s /usr/share/python3-$(PYBUILD_NAME)/test/schemas \
		      debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/test/schemas ; \
		if [ ! -e debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/test/system/fixture/cache_data ]; then \
			mkdir -p debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/test/system/fixture ; \
			mv debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/test/system/fixture/cache_data \
			   debian/python3-$(PYBUILD_NAME)/usr/share/python3-$(PYBUILD_NAME)/test/system/fixture/ ; \
		else \
			$(RM) -r debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/test/system/fixture/cache_data ; \
		fi ; \
		ln -s /usr/share/python3-$(PYBUILD_NAME)/test/system/fixture/cache_data \
		      debian/python3-$(PYBUILD_NAME)/usr/lib/python$$V/dist-packages/mapproxy/test/system/fixture/cache_data ; \
	done

override_dh_install:
	dh_install --list-missing

	$(RM) debian/*/usr/share/python*-mapproxy/test/schemas/*/*/ReadMe.txt