| 12
 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
 
 | #!/usr/bin/make -f
# -*- GNUmakefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
# export DH_OPTIONS=-v
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
else
CROSS=
endif
# see FEATURE AREAS in dpkg-buildflags(1)
DEB_BUILD_MAINT_OPTIONS=hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
# Improve manpage from perldoc
MOAR_VERSION=$(shell cat VERSION)
MOAR_DATE=$(subst .,-, $(MOAR_VERSION))
# Package specific directory as libmoar is not versioned
# https://github.com/MoarVM/MoarVM/issues/74
MOAR_LIB_DIR=/usr/lib/moar
LDFLAGS += -Wl,-rpath=$(MOAR_LIB_DIR)
.PHONY: build
# This looks redundant with the implicit rule for %, but it isn't: .PHONY
# is ignored for implicit rules, so we need a separate rule for build.
build:
	dh $@
%:
	dh $@
override_dh_auto_configure:
	perl Configure.pl $(CROSS) \
		--prefix=/usr \
		--libdir=$(MOAR_LIB_DIR) \
		--debug \
		--has-libtommath \
		--has-libuv \
		--has-libatomic_ops \
		--has-libffi
override_dh_auto_build:
	perldoc -F -onroff \
		-w center:MoarVM \
		-w "release:MoarVM-$(MOAR_VERSION)" \
		-w "date:$(MOAR_DATE)" \
		docs/moar.pod > debian/moar.1
	dh_auto_build -- NOISY=1
override_dh_missing:
	dh_missing --list-missing
 |