File: rules

package info (click to toggle)
tdb 1.3.11-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,000 kB
  • ctags: 3,906
  • sloc: python: 21,301; ansic: 20,544; xml: 459; sh: 213; makefile: 131
file content (72 lines) | stat: -rwxr-xr-x 2,082 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
71
72
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -g -Wall
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)

DESTDIR=$(CURDIR)/debian/tmp
export PYTHON=$(shell which `pyversions -d`)

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

%:
	dh $* --with python2,python3

override_dh_auto_configure:
	PYTHON="$(PYTHON)" \
	CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
		./configure --prefix=/usr --disable-rpath-install \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--extra-python=python3 \
		-v

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

override_dh_python2:
	dh_python2 --no-guessing-versions

override_dh_auto_build:
	$(MAKE) all V=2

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check
endif

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -rf build
	# 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_install:
	dh_install --list-missing

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(DESTDIR)
	# Waf should be doing this..
	ar cr libtdb.a bin/default/common/*.o
	mv libtdb.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
	mv $(DESTDIR)/usr/bin/tdbbackup \
		$(DESTDIR)/usr/bin/tdbbackup.tdbtools
	mv $(DESTDIR)//usr/share/man/man8/tdbbackup.8 \
		$(DESTDIR)/usr/share/man/man8/tdbbackup.tdbtools.8

override_dh_strip:
	dh_strip --dbgsym-migration='libtdb1-dbg (<< 1.3.11-2~), python-tdb-dbg (<< 1.3.11-2~), python3-tdb-dbg (<< 1.3.11-2~)'

override_dh_makeshlibs:
	dh_makeshlibs -Npython-tdb -Npython3-tdb -- -c4