summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 00000000..329e03ad
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Build for multiarch.
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# Avoid overlinking and reduce library dependencies.
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+# Harden SML executables.
+export MLTONARGS := \
+ -cc-opt "$(shell dpkg-buildflags --get CPPFLAGS) \
+ $(shell dpkg-buildflags --get CFLAGS)" \
+ -link-opt "$(shell dpkg-buildflags --get LDFLAGS)"
+
+%:
+ dh $@ --parallel --with autoreconf
+
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
+ SRCLIB=/usr/share/urweb dh_auto_configure --
+
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
+ make
+ cd doc && make manual.pdf
+
+.PHONY: override_dh_builddeb
+override_dh_builddeb:
+ dh_builddeb -- -Zxz -z9