File: rules

package info (click to toggle)
vala 0.56.18-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 57,520 kB
  • sloc: ansic: 581,293; sh: 5,357; makefile: 3,980; xml: 3,161; yacc: 1,219; lex: 374; javascript: 23
file content (112 lines) | stat: -rwxr-xr-x 3,699 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
101
102
103
104
105
106
107
108
109
110
111
112
#!/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

VALA_VERSION = 0.56

configure_options := --enable-unversioned
configure_options += GI_GIRDIR=/usr/lib/${DEB_HOST_MULTIARCH}/gir-1.0

ifneq (,$(filter pkg.vala.nographviz,$(DEB_BUILD_PROFILES)))
configure_options += --disable-valadoc
endif

%:
	dh $@

execute_before_dh_clean:
	rm -rf bootstrap

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

ifeq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
configure-bootstrap:
	dh_auto_configure --builddirectory=bootstrap/build -- \
		$(configure_options)

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-${VALA_VERSION}:$$LD_LIBRARY_PATH" \
		dh_auto_configure -- \
			VALAC="$(CURDIR)/bootstrap/install/usr/bin/valac" \
			$(configure_options)

override_dh_auto_build:
	LD_LIBRARY_PATH="$(CURDIR)/bootstrap/install/usr/lib/$(DEB_HOST_MULTIARCH):$(CURDIR)/bootstrap/install/usr/lib/$(DEB_HOST_MULTIARCH)/vala-${VALA_VERSION}:$$LD_LIBRARY_PATH" \
		dh_auto_build
else
override_dh_auto_configure: debian/cross/${DEB_HOST_GNU_TYPE}-valac-${VALA_VERSION}
	find -name '*.vala.stamp' -delete
	dh_auto_configure -- \
		VALAC=${CURDIR}/debian/cross/${DEB_HOST_GNU_TYPE}-valac-${VALA_VERSION} \
		$(configure_options)
endif

# 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

debian/cross/${DEB_HOST_GNU_TYPE}-valac-${VALA_VERSION}: debian/cross/cross-valac.in debian/rules
	sed \
		-e 's|@bindir@|/usr/bin|g' \
		-e 's|@DEB_HOST_GNU_TYPE@|${DEB_HOST_GNU_TYPE}|g' \
		-e 's|@VALA_VERSION@|${VALA_VERSION}|g' \
		< $< > $@.tmp
	chmod 0755 $@.tmp
	mv $@.tmp $@

debian/cross/${DEB_HOST_GNU_TYPE}-vapigen-${VALA_VERSION}: debian/cross/cross-vapigen.in debian/rules
	sed \
		-e 's|@bindir@|/usr/bin|g' \
		-e 's|@DEB_HOST_MULTIARCH@|${DEB_HOST_MULTIARCH}|g' \
		-e 's|@VALA_VERSION@|${VALA_VERSION}|g' \
		< $< > $@.tmp
	chmod 0755 $@.tmp
	mv $@.tmp $@

debian/cross/${DEB_HOST_GNU_TYPE}-vala.ini: debian/cross/cross-vala.ini.in debian/rules
	sed \
		-e 's|@bindir@|/usr/bin|g' \
		-e 's|@DEB_HOST_GNU_TYPE@|$(DEB_HOST_GNU_TYPE)|g' \
		-e 's|@VALA_VERSION@|${VALA_VERSION}|g' \
		< $< > $@.tmp
	mv $@.tmp $@

execute_after_dh_auto_install: debian/cross/${DEB_HOST_GNU_TYPE}-vala.ini
execute_after_dh_auto_install: debian/cross/${DEB_HOST_GNU_TYPE}-valac-${VALA_VERSION}
execute_after_dh_auto_install: debian/cross/${DEB_HOST_GNU_TYPE}-vapigen-${VALA_VERSION}

execute_after_dh_auto_install:
	find debian -name '*.la' -print -delete
	sed -i \
		-e 's|^vapigen=.*|vapigen=$${bindir}/${DEB_HOST_GNU_TYPE}-vapigen-${VALA_VERSION}|g' \
		debian/tmp/usr/lib/*/pkgconfig/vapigen-*.pc \
		debian/tmp/usr/lib/*/pkgconfig/libvala-*.pc \
		${NULL}

override_dh_link:
	VALA_VERSION=${VALA_VERSION} dh_link

override_dh_installdocs:
	dh_installdocs -A NEWS README README.md THANKS

override_dh_gnome_clean: