File: rules

package info (click to toggle)
libgpuarray 0.7.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,552 kB
  • sloc: ansic: 19,235; python: 4,621; makefile: 219; sh: 9
file content (69 lines) | stat: -rwxr-xr-x 2,048 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
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow
export DEB_CPPFLAGS_MAINT_APPEND=-fmacro-prefix-map=$(CURDIR)=.

export PYBUILD_NAME=pygpu
export PYBUILD_SYSTEM=distutils
export PYBUILD_BEFORE_BUILD={interpreter} setup.py build_ext -b {build_dir} -I $(CURDIR)/src -L $(CURDIR)/lib
export PYBUILD_AFTER_INSTALL_python2-dbg=rm -f {destdir}/{install_dir}/pygpu/*.h
export PYBUILD_AFTER_INSTALL_python3-dbg=rm -f {destdir}/{install_dir}/pygpu/*.h

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

override_dh_auto_clean-arch:
	dh_auto_clean --buildsystem=cmake
	dh_auto_clean

override_dh_auto_clean-indep:
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	find $(CURDIR) -type f -name ".so" -delete
	$(MAKE) -C doc clean
endif

override_dh_auto_configure:
	#force generated files in source to be rebuilt
	rm -f src/gpuarray/types.h src/gpuarray_types.c src/cluda_cuda.h.c src/cluda_opencl.h.c
	dh_auto_configure --buildsystem=cmake
	dh_auto_configure

override_dh_auto_build-arch:
	dh_auto_build --buildsystem=cmake
	dh_auto_build

override_dh_auto_build-indep: export http_proxy=127.0.0.1:9
override_dh_auto_build-indep: export https_proxy=127.0.0.1:9
override_dh_auto_build-indep:
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	#can't build the documentation without first building the library - #901111
	dh_auto_build --buildsystem=cmake
	python3 setup.py build_ext --inplace -I $(CURDIR)/src -L $(CURDIR)/lib
	LD_LIBRARY_PATH=$(CURDIR)/lib PYTHONPATH=$(CURDIR) $(MAKE) -C doc html
endif

override_dh_auto_test:

override_dh_auto_install-arch:
	dh_auto_install --buildsystem=cmake
	dh_auto_install

override_dh_auto_install-indep:

override_dh_python2:
	dh_python2
	dh_numpy

override_dh_python3:
	dh_python3
	dh_numpy3

override_dh_strip-arch:
	dh_strip --package=python-$(PYBUILD_NAME) \
		--dbg-package=python-$(PYBUILD_NAME)-dbg
	dh_strip --package=python3-$(PYBUILD_NAME) \
		--dbg-package=python3-$(PYBUILD_NAME)-dbg
	dh_strip --arch