File: rules

package info (click to toggle)
nflog-bindings 0.2-3.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 192 kB
  • ctags: 37
  • sloc: ansic: 180; perl: 46; python: 36; makefile: 28
file content (34 lines) | stat: -rwxr-xr-x 804 bytes parent folder | download | duplicates (5)
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
#!/usr/bin/make -f
# -*- makefile -*-

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

PYVERS=$(shell pyversions -vr)

# do not add +all because pie causes a FTBFS with cmake
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

# CMake doesn't respect CPPFLAGS.
CFLAGS += $(CPPFLAGS)

%:
	dh $@ --with=python2

override_dh_auto_build: $(PYVERS:%=build-python%)

build-python%:
	make BUILD_DIR="build$*" PREFIX=/usr CMAKE_EXTRA_OPTIONS="-DPython_ADDITIONAL_VERSIONS=$* -DPythonInterp_FIND_VERSION=$*"
	touch $@

override_dh_auto_clean:
	rm -f build-python2.*
	rm -rf build build2.[67]
	dh_auto_clean

override_dh_auto_install: $(PYVERS:%=install-python%)

install-python%:
	$(MAKE) -C build$* DESTDIR=$(CURDIR)/debian/tmp install
	chrpath -d $(CURDIR)/debian/tmp/usr/lib/python2.*/*/*.so