summaryrefslogtreecommitdiffhomepage
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..23fd81e
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,34 @@
+#!/usr/bin/make -f
+
+# Debian's ghc cannot compile anything with -fPIC at present, so we
+# have to disable PIE hardening to avoid build failures on archs like
+# amd64. See discussion on debian-haskell@lists.debian.org
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
+
+# cabal likes to write to $HOME, so use Setup.hs directly
+export BUILDER = ./Setup
+
+# -j1 in the hope of making the build reproducible (see Makefile)
+export BUILDEROPTIONS = -j1
+
+%:
+ dh $@
+
+# Temporarily disable tests until upstream adds a spinner/progress
+# indicator. Otherwise sbuild will time out on some archs
+# override_dh_auto_test:
+# ./keysafe --test
+
+# upstream's install-files target is not sufficient for our split into
+# three binary packages, so disable it here and use dh_* tools
+override_dh_auto_install:
+
+# GHC cannot produce debugging symbols
+override_dh_strip:
+ dh_strip --no-automatic-dbgsym
+
+# ensure service name is 'keysafe' not 'keysafe-server'. This is so
+# we are consistent with other distros despite our package split (see
+# INSTALL)
+override_dh_installinit:
+ dh_installinit --name=keysafe