File: rules

package info (click to toggle)
vala 0.56.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 55,940 kB
  • sloc: ansic: 576,097; sh: 5,325; makefile: 3,816; xml: 3,161; yacc: 1,219; lex: 374; javascript: 23
file content (62 lines) | stat: -rwxr-xr-x 2,338 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
export DEB_CFLAGS_MAINT_APPEND = -Wall
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
include /usr/share/dpkg/architecture.mk

%:
	dh $@

execute_before_dh_clean:
	rm -rf bootstrap

override_dh_autoreconf:
	# handle timestamp skew
	touch vala/vala.vala.stamp
	dh_autoreconf --as-needed

configure-bootstrap:
	dh_auto_configure --builddirectory=bootstrap/build

bootstrap: configure-bootstrap
	dh_auto_build --builddirectory=bootstrap/build
	dh_auto_install --builddirectory=bootstrap/build -- DESTDIR=$(CURDIR)/bootstrap/install

override_dh_auto_configure: bootstrap
	find -name '*.vala.stamp' -delete
	LD_LIBRARY_PATH="$(CURDIR)/bootstrap/install/usr/lib/$(DEB_HOST_MULTIARCH):$(CURDIR)/bootstrap/install/usr/lib/$(DEB_HOST_MULTIARCH)/vala-0.56:$$LD_LIBRARY_PATH" \
		dh_auto_configure -- \
			VALAC="$(CURDIR)/bootstrap/install/usr/bin/valac" \
			--enable-unversioned

override_dh_auto_build:
	LD_LIBRARY_PATH="$(CURDIR)/bootstrap/install/usr/lib/$(DEB_HOST_MULTIARCH):$(CURDIR)/bootstrap/install/usr/lib/$(DEB_HOST_MULTIARCH)/vala-0.56:$$LD_LIBRARY_PATH" \
		dh_auto_build

# Make testsuite failures non-fatal for these architectures. The DBus
# tests are failing there and an yet unknown reason.
NO_TESTSUITE_ARCHS := kfreebsd-i386 kfreebsd-amd64 hurd-i386

override_dh_auto_test:
ifeq ($(filter $(DEB_BUILD_ARCH),$(NO_TESTSUITE_ARCHS)),$(DEB_BUILD_ARCH))
	# do not run the tests under fakeroot, that breaks D-Bus
	-LD_PRELOAD= dh_auto_test
else
	LD_PRELOAD= dh_auto_test
endif

execute_after_dh_auto_install:
	find debian -name '*.la' -print -delete

override_dh_install-arch:
	dh_install
	printf '#!/bin/sh\nexec valac-0.56 "--cc=$${CC:-${DEB_HOST_GNU_TYPE}-gcc}" "--pkg-config=$${PKG_CONFIG:-${DEB_HOST_GNU_TYPE}-pkg-config}" "$$@"\n' > debian/valac/usr/bin/${DEB_HOST_GNU_TYPE}-valac-0.56
	chmod 755 debian/valac/usr/bin/${DEB_HOST_GNU_TYPE}-valac-0.56
	ln -s valac-0.56.1.gz debian/valac/usr/share/man/man1/${DEB_HOST_GNU_TYPE}-valac-0.56.1.gz
	ln -s ${DEB_HOST_GNU_TYPE}-valac-0.56 debian/valac/usr/bin/${DEB_HOST_GNU_TYPE}-valac
	ln -s ${DEB_HOST_GNU_TYPE}-valac-0.56.1.gz debian/valac/usr/share/man/man1/${DEB_HOST_GNU_TYPE}-valac.1.gz

override_dh_installdocs:
	dh_installdocs -A NEWS README README.md THANKS