File: rules

package info (click to toggle)
pmix 4.0.0-4.1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,148 kB
  • sloc: ansic: 114,533; makefile: 2,071; python: 1,360; sh: 1,214; perl: 1,197; lex: 414
file content (70 lines) | stat: -rwxr-xr-x 2,211 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
#!/usr/bin/make -f

export DH_VERBOSE=1

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)
AUTOGENERATED:= pmix-mca-params.conf
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)  -fPIC

PSM_ARCH= amd64 i386
PSM2_ARCH= amd64 
PSM2:= $(if $(filter $(DEB_TARGET_ARCH),$(PSM2_ARCH)), --with-psm2, )

ifneq (,$(filter $(DEB_HOST_ARCH), armel mipsel sh4 m68k ))
  export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
endif

export LD_LIBRARY_PATH:=$(CURDIR)/debian/tmp/$(LIBDIR):$(LD_LIBRARY_PATH)

%:
	dh $@ 

BUILD_FLAGS:= \
	$(PSM2) \
	--sysconfdir=$(LIBDIR)/pmix2/share \
	--datarootdir=$(LIBDIR)/pmix2/share \
	--with-zlib=/usr \
	--with-jansson=/usr \
	--with-hwloc=/usr \
	--enable-python-bindings \
	#--disable-man-pages

override_dh_auto_clean:
	dh_auto_clean
	rm -f $(patsubst %, debian/%, ${AUTOGENERATED})
	rm -rf debian/static-build debian/shared-build

override_dh_autoreconf:
	./autogen.pl --force
	for f in ${AUTOGENERATED} ; do \
                sed -e 's%@DEB_HOST_MULTIARCH@%${DEB_HOST_MULTIARCH}%g' < debian/$$f.in  > debian/$$f ; \
                done

override_dh_auto_configure:
	# Hack to fix quilt issue in 4.0.0
	patch -p1 < debian/patches/python3.patch
	patch -p1 < debian/patches/Do-not-follow-links-when-doing-chown.patch
	dh_auto_configure --builddirectory=debian/static-build -- $(BUILD_FLAGS) \
		--enable-static 
	dh_auto_configure --builddirectory=debian/shared-build -- $(BUILD_FLAGS) \
		--enable-shared

override_dh_auto_build:
	# Hack - build system doesn't work well with builddirs
	cp include/*.h debian/static-build/include
	cp include/*.h debian/shared-build/include
	cp debian/static-build/include/pmix_version.h include
	cp bindings/python/pmix.* debian/static-build/bindings/python
	cp bindings/python/pmix.* debian/shared-build/bindings/python
	dh_auto_build  --builddirectory=debian/static-build
	dh_auto_build  --builddirectory=debian/shared-build

override_dh_auto_install:
	dh_auto_install --builddirectory=debian/static-build
	dh_auto_install --builddirectory=debian/shared-build
	find debian/tmp -name '*.la' -delete