File: rules

package info (click to toggle)
bluez 5.85-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,016 kB
  • sloc: ansic: 423,507; python: 4,751; sh: 4,580; makefile: 750; xml: 126
file content (100 lines) | stat: -rwxr-xr-x 2,800 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto
CONFIGURE_FLAGS := \
	--with-dbusconfdir=/usr/share \
	--enable-static \
	--enable-tools \
	--enable-cups \
	--enable-mesh \
	--enable-midi	\
	--enable-datafiles \
	--enable-threads \
	--enable-backtrace \
	--enable-debug \
	--enable-library \
	--enable-test \
	--enable-nfc \
	--enable-monitor \
	--enable-udev \
	--enable-obex \
	--enable-client \
	--enable-testing \
	--enable-systemd \
	--enable-threads \
	--enable-sixaxis \
	--enable-deprecated \
	--enable-health \
	--enable-hid2hci \
	--enable-external-ell \
	--enable-experimental

DEB_CFLAGS_MAINT_APPEND += -DFIRMWARE_DIR=/lib/firmware
export DEB_CFLAGS_MAINT_APPEND

ifeq (,$(filter pkg.bluez.noeds,$(DEB_BUILD_PROFILES)))
# Ubuntu doesn't build evolution-data-server on i386
ifeq (,$(filter $(DEB_HOST_ARCH),i386))
  CONFIGURE_FLAGS += --with-phonebook=ebook
endif
endif

ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes) $(DEB_HOST_ARCH), yes i386)
   skip_packages = -Nbluez-cups
endif

export deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)
export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)

%:
	dh $@ --exclude=.la

execute_before_dh_install:
	# Remove test scripts, and these are taken directly into the package
	# from the test directory
	rm -rf debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/bluez

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_installinit:
	dh_installinit -pbluez --name=bluetooth --restart-after-upgrade

override_dh_installsystemd:
	dh_installsystemd -pbluez --name=bluetooth bluetooth.service

override_dh_auto_test:
	# disable

override_dh_builddeb:
	dh_builddeb ${skip_packages}

override_dh_gencontrol:
	dh_gencontrol ${skip_packages}

execute_after_dh_fixperms-indep:
ifneq ($(filter bluez-test-scripts,$(shell dh_listpackages)),)
	chmod 0644 debian/bluez-test-scripts/usr/share/doc/bluez-test-scripts/examples/*
endif

override_dh_auto_install-indep: build_bluez-source
BUILDDIRSOURCE := $(shell pwd)/debian/tmp-source/bluez-source
build_bluez-source:
	install -d debian/bluez-source/usr/src
	mkdir -p $(BUILDDIRSOURCE)
	tar --exclude debian --exclude .git --exclude .pc \
		--exclude autom4te.cache \
		--exclude config.log \
		--exclude config.status \
		--exclude Makefile \
		--exclude libtool \
		-cf - . | (cd $(BUILDDIRSOURCE) && tar -xf -)
	cd $(dir $(BUILDDIRSOURCE)) \
		&& tar --sort=name \
			--mtime="@${SOURCE_DATE_EPOCH}" \
			--owner=0 --group=0 --numeric-owner \
			--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
			-cjf $(shell pwd)/debian/bluez-source/usr/src/bluez.tar.bz2 \
		$(notdir $(BUILDDIRSOURCE))