File: rules

package info (click to toggle)
opendht 2.4.12-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,220 kB
  • sloc: cpp: 23,105; python: 2,189; ansic: 2,073; makefile: 207; sh: 72
file content (57 lines) | stat: -rwxr-xr-x 1,649 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/architecture.mk

# export DH_VERBOSE = 1
PYVERS = $(shell py3versions -vs)

# Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

CONFIGURE_FLAGS += -DOPENDHT_SHARED=ON
CONFIGURE_FLAGS += -DOPENDHT_STATIC=OFF
CONFIGURE_FLAGS += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
CONFIGURE_FLAGS += -DOPENDHT_PROXY_SERVER=ON
CONFIGURE_FLAGS += -DOPENDHT_PROXY_CLIENT=ON
CONFIGURE_FLAGS += -DOPENDHT_PUSH_NOTIFICATIONS=ON
CONFIGURE_FLAGS += -DOPENDHT_PYTHON=ON
CONFIGURE_FLAGS += -DOPENDHT_C=ON

%:
	dh $@ --without autoreconf --with python3

override_dh_auto_configure:
	dh_auto_configure -- ${CONFIGURE_FLAGS}

clean-python%:
	( [ -d "obj-$(DEB_BUILD_GNU_TYPE)"/python ] && \
	    cd "obj-$(DEB_BUILD_GNU_TYPE)"/python && \
	    python$* setup.py clean ) || true

build-python%:
	cd "obj-$(DEB_BUILD_GNU_TYPE)"/python && \
	  python$* setup.py build

install-python%:
	cd "obj-$(DEB_BUILD_GNU_TYPE)"/python && \
	  python$* setup.py install \
	    --root=$(CURDIR)/debian/tmp \
	    --install-layout=deb

execute_after_dh_auto_clean: $(PYVERS:%=clean-python%)
	$(RM) $(CURDIR)/python/opendht.cpp
execute_after_dh_auto_build: $(PYVERS:%=build-python%)
execute_after_dh_auto_install: $(PYVERS:%=install-python%)
	rm -f $(CURDIR)/debian/tmp/usr/share/man/man1/dhtnode.1
execute_after_dh_install:
	rm -f $(CURDIR)/debian/libopendht-dev/usr/include/opendht/opendht_c.h

override_dh_installinit:
	echo override_dh_installinit

# Skip dh_dwz set as it fail on debian/dhtnode/usr/bin/dhtnode in version 2.4.10
override_dh_dwz:
	#dh_dwz