aboutsummaryrefslogtreecommitdiff
path: root/contrib/debian/rules
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-05-01 16:51:56 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-05-01 16:52:57 +0200
commit35eb9d6c880ec4dd732b9cb4443f84cec2c2cd4e (patch)
tree5a8ef2ee612b8a5304036033e09f8e8ee5b92e95 /contrib/debian/rules
parentc5f7efe3312ffb63567d7a4d6653245c745a062f (diff)
parent2a87b1b07c5c4f8b9b34747c5f254c2ae1e824bf (diff)
Merge #12769: Add systemd service to bitcoind in debian package
2a87b1b Add systemd service for bitcoind (ctp-tsteenholdt) 9085532 Sync contrib/debian from Matt Corallo's PPA (ctp-tsteenholdt) Pull request description: On suggestion from @TheBlueMatt I have updated `contrib/debian` files to include a systemd service in the `bitcoind` build. Tested and working on Ubuntu 16.04 and 17.10. This fixes Issue #12758 Tree-SHA512: b6137fafee940c7410df1242c8716a87f47c5bc60eb8df3ad0184a50c2d67ef3f2728761c742670a0ad546ab6e7ad60472a721350cd6280b3bcbdc582e50ee07
Diffstat (limited to 'contrib/debian/rules')
-rwxr-xr-xcontrib/debian/rules28
1 files changed, 27 insertions, 1 deletions
diff --git a/contrib/debian/rules b/contrib/debian/rules
index 6885e38521..fcd0c39413 100755
--- a/contrib/debian/rules
+++ b/contrib/debian/rules
@@ -6,13 +6,20 @@
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_bitcoin)
%:
- dh --with bash-completion $@
+ dh --with bash-completion --with systemd $@
override_dh_auto_clean:
if [ -f Makefile ]; then $(MAKE) distclean; fi
rm -rf Makefile.in aclocal.m4 configure src/Makefile.in src/bitcoin-config.h.in src/build-aux src/qt/Makefile.in src/qt/test/Makefile.in src/test/Makefile.in
QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt5)
+# qt4 is very broken on arm
+ifeq ($(findstring arm,$(shell uname -m)),arm)
+ QT=qt5
+endif
+ifeq ($(findstring aarch64,$(shell uname -m)),aarch64)
+ QT=qt5
+endif
# Yea, autogen should be run on the source archive, but I like doing git archive
override_dh_auto_configure:
@@ -20,4 +27,23 @@ override_dh_auto_configure:
./configure --with-gui=$(QT)
override_dh_auto_test:
+ifeq ($(QT), qt4)
+ xvfb-run -n 99 -l make check
+else
make check
+endif
+
+# No SysV or Upstart init scripts included
+override_dh_installinit:
+ dh_installinit \
+ --noscripts
+
+# Don’t enable service by default
+override_dh_systemd_enable:
+ dh_systemd_enable \
+ --no-enable
+
+# Restart after upgrade
+override_dh_systemd_start:
+ dh_systemd_start \
+ --restart-after-upgrade