File: rules

package info (click to toggle)
talloc 2.1.14-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,508 kB
  • sloc: python: 21,259; ansic: 12,718; xml: 812; sh: 196; makefile: 125
file content (68 lines) | stat: -rwxr-xr-x 2,002 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

CFLAGS += -g -Wall

DESTDIR=$(CURDIR)/debian/tmp

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

conf_args = --prefix=/usr --disable-rpath-install --disable-rpath --bundled-libraries=NONE
conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
conf_args += --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
conf_args += -v

export PYTHON="$(shell which `pyversions -d`)"

%:
	dh $* --with python2

override_dh_python2:
	dh_python2 --no-guessing-versions

override_dh_auto_configure:
	LDFLAGS="$(LDFLAGS)" PYTHON="$(PYTHON)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" ./configure $(conf_args)

override_dh_auto_build:
	$(MAKE) all V=1

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LD_LIBRARY_PATH=bin/shared ./bin/talloc_testsuite
endif

override_dh_install:
	DEB_PY2_INCDIR=$(shell python-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
		dh_install --list-missing

get-packaged-orig-source:
	./debian/build-orig.sh

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	# Waf should be doing this; see
	# https://bugzilla.samba.org/show_bug.cgi?id=8854
	rm -f .lock-wscript
	# Waf should be doing this; see
	# https://bugzilla.samba.org/show_bug.cgi?id=8855
	rm -f buildtools/wafsamba/*.pyc \
		third_party/waf/wafadmin/*.pyc \
		third_party/waf/wafadmin/Tools/*.pyc \
		third_party/waf/wafadmin/3rdparty/*.pyc \

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(DESTDIR)
	# Waf really should be doing this:
	ar -rc libtalloc.a bin/default/talloc_*.o
	mv libtalloc.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_makeshlibs:
	dh_makeshlibs -plibtalloc2 -- -c4
	dh_makeshlibs -ppython-talloc -Xtalloc. -- -c3