File: rules.in

package info (click to toggle)
ucx 1.20.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,268 kB
  • sloc: ansic: 163,705; cpp: 76,831; sh: 11,640; java: 2,962; makefile: 2,107; asm: 297; xml: 51; awk: 29
file content (48 lines) | stat: -rwxr-xr-x 1,681 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

CUDA_OPT = $(shell echo ${DEB_BUILD_PROFILES} | grep -qw cuda \
	&& echo --with-cuda=/usr/local/cuda || echo --without-cuda)

XPMEM_OPT = $(shell echo ${DEB_BUILD_PROFILES} | grep -qw xpmem \
	&& echo --with-xpmem || echo --without-xpmem)

CUDA_SUBSTVARS = debian/ucx-cuda.substvars

%:
	dh $@ 

override_dh_auto_configure:
	./contrib/configure-release-mt --prefix=/usr \
		--with-rdmacm --with-verbs --with-mlx5 --enable-cma \
		--enable-examples --without-java --without-go \
		$(CUDA_OPT) $(XPMEM_OPT)
	chmod +x debian/rules

# We may have a single package or two packages. We can't tell in advance.
# Therefore set destdir for the default of multiple packages (that also
# works for a single package):
override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
	if [ -e debian/ucx-cuda.substvars ]; then \
	  sed -i -e 's/libnvidia-compute-\([0-9]\+\)/libnvidia-compute | libnvidia-ml1/' \
	    debian/ucx-cuda.substvars \
	; fi
	if [ -e $(CUDA_SUBSTVARS) ]; then \
		sed -i -e 's/libnvidia-compute-\([0-9]\+\), //g' $(CUDA_SUBSTVARS); \
		echo "shlibs:Recommends=libnvidia-compute | libnvidia-ml1" >> \
			$(CUDA_SUBSTVARS); \
	fi

override_dh_auto_clean: