File: rules

package info (click to toggle)
python-gdata 2.0.18+dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 8,460 kB
  • ctags: 17,143
  • sloc: python: 70,779; ansic: 150; makefile: 27; sh: 3
file content (37 lines) | stat: -rwxr-xr-x 1,087 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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

DEB_DIRECTORY = $(dir $(firstword $(MAKEFILE_LIST)))
SOURCE_DIRECTORY = $(realpath $(DEB_DIRECTORY)/..)
EXAMPLES_DIRECTORY = $(DEB_DIRECTORY)/python-gdata-doc/usr/share/doc/python-gdata-doc/examples

%:
	dh $@ --with python2

override_dh_auto_build:
	dh_auto_build
	cd pydocs; sh ./generate_docs
	sed -i 's|$(SOURCE_DIRECTORY)/src|/usr/lib/python2.7/dist-packages|g' pydocs/*.html

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	set -ex; for pyversion in $(shell pyversions -vr); do \
		PYTHONPATH=src python$$pyversion tests/run_data_tests.py; \
	done	
endif

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES.txt

override_dh_installexamples:
	dh_installexamples
	rm -rf $(EXAMPLES_DIRECTORY)/apps/marketplace_sample
	rm -rf $(EXAMPLES_DIRECTORY)/apps/provisioning_oauth_example
	rm -rf $(EXAMPLES_DIRECTORY)/blogger/app
	rm -rf $(EXAMPLES_DIRECTORY)/blogger/oauth-appengine

override_dh_compress:
	dh_compress -X.py -X.c

get-orig-source:
	uscan --verbose --download-current-version