File: rules

package info (click to toggle)
fwupd 0.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,540 kB
  • sloc: ansic: 27,561; makefile: 1,301; xml: 631; sh: 32; python: 12
file content (41 lines) | stat: -rwxr-xr-x 1,157 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
#!/usr/bin/make -f
# -*- makefile -*-

#GPGME needs this for proper building on 32 bit archs
ifeq "$(DEB_HOST_ARCH_BITS)" "32"
	export DEB_CFLAGS_MAINT_APPEND = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
endif

export COLORHUG="--disable-colorhug"
COLORHUG_VERSION=$(shell dpkg-query -W libcolorhug-dev | awk '{ print $$2 }' | sed 's,-.*,,')
ifeq "1.2.12" "$(word 1, $(sort 1.2.12 $(COLORHUG_VERSION)))"
       export COLORHUG="--enable-colorhug"
endif

%:
	dh $@ --with autoreconf,gir

override_dh_autoreconf:
	NOCONFIGURE=1 dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	if pkg-config --exists fwup; then \
		export UEFI="--enable-uefi"; \
	else \
		export UEFI="--disable-uefi"; \
	fi; \
	dh_auto_configure -- --with-systemdunitdir=/lib/systemd/system \
				--enable-gtk-doc \
				--libexecdir=\$${prefix}/lib \
				$(COLORHUG) $$UEFI

override_dh_install:
	find debian/tmp/usr -name "*a" | xargs rm -f
	rm -f debian/tmp/usr/bin/ebitdo-tool
	sed -i 's,wheel,sudo,' ./debian/tmp/usr/share/polkit-1/rules.d/org.freedesktop.fwupd.rules
	dh_install --fail-missing

override_dh_auto_test:
	if [ -x /usr/bin/valgrind ] ; then \
		dh_auto_test; \
	fi