File: rules

package info (click to toggle)
python-gevent 1.1.2-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 12,308 kB
  • ctags: 17,633
  • sloc: python: 73,807; ansic: 26,302; sh: 11,090; makefile: 932; awk: 18
file content (77 lines) | stat: -rwxr-xr-x 2,725 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f
# -*- makefile -*-

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

export SHELL = /bin/bash

DOCDIR:=$(CURDIR)/debian/python-gevent-doc/usr/share/doc/python-gevent-doc

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=.. make --directory doc/ html

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(CURDIR)/gevent/*.so
	cd doc && make clean
	rm -f $(CURDIR)/doc/gevent.*.rst $(CURDIR)/doc/changelog.rst
	rm -rf $(CURDIR)/gevent.egg-info/
	rm -f $(CURDIR)/greentest/testresults.sqlite3
	[ ! -f libev/Makefile ] || (cd $(CURDIR)/libev/ && $(MAKE) distclean)
	rm -f $(CURDIR)/c-ares/ares_config.h $(CURDIR)/c-ares/config.log \
		$(CURDIR)/c-ares/config.status \
		$(CURDIR)/c-ares/stamp-h1 $(CURDIR)/c-ares/stamp-h2

override_dh_install:
	dh_install -O--parallel -O--buildsystem=pybuild --list-missing
	: # remove the compat stuff for 2/3
	rm -v -f debian/python-gevent/usr/lib/python2.7/dist-packages/gevent/_{util_py,ssl,fileobject,socket}3*
	rm -v -f debian/python3-gevent/usr/lib/python3*/dist-packages/gevent/_{util_py,ssl,fileobject,socket}2*

override_dh_compress:
	dh_compress -X.js -X_static/* -X _sources/* -X_sources/*/* -X.inv

override_dh_strip:
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
	dh_strip -p python-gevent --dbg-package=python-gevent-dbg
	dh_strip -p python3-gevent --dbg-package=python3-gevent-dbg
endif

# TODO: check for failures, but disable for now
override_dh_auto_test:
	chmod +x $(CURDIR)/greentest/testrunner.py
#	cd $(CURDIR)/greentest && PYTHONPATH=.. ./testrunner.py

override_dh_installdocs-arch:
	dh_installdocs -Npython-gevent-dbg -Npython3-gevent-dbg
	dh_installdocs -ppython-gevent-dbg --link-doc=python-gevent
	dh_installdocs -ppython3-gevent-dbg --link-doc=python3-gevent

override_dh_installdocs-indep:
	dh_installdocs -i
	# remove privacy tracking links
	sed -i 's|http.*/btn_donateCC_LG.gif||' \
		$(DOCDIR)/html/sfc.html
	sed -i 's|http.*/pixel.gif||' \
		$(DOCDIR)/html/sfc.html
	sed -i 's|<a .\+twitter.com.\+>\(.\+\)</a>|\1|' \
		$(DOCDIR)/html/index.html
	sed -i 's|<script>.\+platform.twitter.com.\+</script>||' \
		$(DOCDIR)/html/index.html

override_dh_installexamples-indep:
	dh_installexamples -i
	# remove privacy tracking links
	sed -i 's|http.*/jquery.min.js|file://usr/share/javascript/jquery/jquery.min.js|' \
		debian/python-gevent-doc/usr/share/doc/python-gevent-doc/examples/webchat/templates/index.html


.PHONY: override_dh_auto_build override_dh_auto_clean override_dh_install \
	override_dh_compress override_dh_strip override_dh_auto_test \
	override_dh_installdocs-arch override_dh_installdocs-indep \
	override_dh_installexamples-indep