File: rules

package info (click to toggle)
gnome-builder 49.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,412 kB
  • sloc: ansic: 270,495; xml: 3,485; python: 1,863; javascript: 82; makefile: 65; sh: 21; cpp: 14
file content (61 lines) | stat: -rwxr-xr-x 1,776 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1

# Explicitly disable this plugin which defaults to enabled
# unless we're on linux architectures.
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifeq (linux,$(DEB_HOST_ARCH_OS))
SYSPROF_PLUGIN = -Dplugin_sysprof=true
else
SYSPROF_PLUGIN = -Dplugin_sysprof=false
endif

# https://lists.debian.org/debian-devel/2022/02/msg00259.html
ifeq "$(shell which valgrind > /dev/null && echo true)" "true"
VALGRIND_PLUGIN = -Dplugin_valgrind=true
else
VALGRIND_PLUGIN = -Dplugin_valgrind=false
endif

# Enable Flatpak support on supported architectures
ifneq (,$(filter $(DEB_HOST_ARCH), alpha hurd-i386 hurd-amd64))
	FLATPAK_PLUGIN = -Dplugin_flatpak=false
else
	FLATPAK_PLUGIN = -Dplugin_flatpak=true
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dnetwork_tests=false \
		-Dplugin_update_manager=false \
		$(FLATPAK_PLUGIN) \
		$(SYSPROF_PLUGIN) \
		$(VALGRIND_PLUGIN)

# force debian/tmp installation for now until we ship
# more than one binary package, then this can be dropped...
override_dh_auto_install:
	dh_auto_install --destdir=$(CURDIR)/debian/tmp

override_dh_auto_test:
	dbus-run-session -- xvfb-run dh_auto_test

override_dh_makeshlibs:
	dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder

override_dh_shlibdeps:
	dh_shlibdeps -ldebian/gnome-builder/usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder/

override_dh_girepository:
	dh_girepository -ldebian/tmp/usr/share/gnome-builder/gir-1.0 \
	  /usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder/ \
	  /usr/lib/$(DEB_HOST_MULTIARCH)/gnome-builder/girepository-1.0/

override_dh_python3:
# https://bugs.debian.org/838342
	dh_python3 -X.*/plugins/meson_templates/resources/.*