2011-10-25 22:48:36 +02:00
|
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
# -*- mode: makefile; coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
#DEB_MAKE_CHECK_TARGET = test_bitcoin
|
|
|
|
|
#build/bitcoind::
|
|
|
|
|
# $(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),,src/test_bitcoin)
|
|
|
|
|
|
|
|
|
|
%:
|
2018-04-20 12:34:12 +02:00
|
|
|
|
dh --with bash-completion --with systemd $@
|
2011-10-25 22:48:36 +02:00
|
|
|
|
|
|
|
|
|
override_dh_auto_clean:
|
2014-04-27 02:18:18 +02:00
|
|
|
|
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
|
2011-10-25 22:48:36 +02:00
|
|
|
|
|
2017-05-04 23:15:16 +02:00
|
|
|
|
QT=$(shell dpkg-vendor --derives-from Ubuntu && echo qt4 || echo qt5)
|
2018-04-20 12:31:58 +02:00
|
|
|
|
# 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
|
2017-05-04 23:15:16 +02:00
|
|
|
|
|
2014-04-27 02:18:18 +02:00
|
|
|
|
# Yea, autogen should be run on the source archive, but I like doing git archive
|
2011-10-25 22:48:36 +02:00
|
|
|
|
override_dh_auto_configure:
|
2014-04-27 02:18:18 +02:00
|
|
|
|
./autogen.sh
|
2017-05-05 19:29:18 +02:00
|
|
|
|
./configure --with-gui=$(QT)
|
2011-10-25 22:48:36 +02:00
|
|
|
|
|
|
|
|
|
override_dh_auto_test:
|
2018-04-20 12:31:58 +02:00
|
|
|
|
ifeq ($(QT), qt4)
|
|
|
|
|
xvfb-run -n 99 -l make check
|
|
|
|
|
else
|
2014-04-27 02:18:18 +02:00
|
|
|
|
make check
|
2018-04-20 12:31:58 +02:00
|
|
|
|
endif
|
2018-04-20 12:34:12 +02:00
|
|
|
|
|
|
|
|
|
# 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
|