File: rules

package info (click to toggle)
dulwich 0.9.7-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,392 kB
  • ctags: 3,088
  • sloc: python: 18,874; ansic: 835; makefile: 153; sh: 2
file content (42 lines) | stat: -rwxr-xr-x 1,386 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

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

# Get the supported Python versions
PYVERS = $(shell pyversions -r -v)
# Get the default Python version
PYVERSION = $(shell pyversions -d -v)

# Callable functions to determine the correct PYTHONPATH
pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib_d.*-$(1) 2>/dev/null || ls -d $(CURDIR)/build/lib.*$(1)-pydebug)

%:
	dh $* --with python2 --buildsystem=python_distutils

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp
	# Install everything excluding the *_d.so debug extensions to python-dulwich
	dh_install -X"*_d.so" "debian/tmp/*" -p python-dulwich
	# Install the debug extensions to python-dulwich-dbg
	dh_install "debian/tmp/usr/lib/python*/*-packages/dulwich/*_d.so" -p python-dulwich-dbg

override_dh_installdocs:
	dh_installdocs --link-doc=python-dulwich
	dh_installdocs -ppython-dulwich docs/tutorial  -X.gitignore -XMakefile

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check
endif

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

override_dh_installchangelogs:
	dh_installchangelogs NEWS