2018-10-23 11:45:14 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
|
2019-07-25 20:30:15 +00:00
|
|
|
# See debhelper(7) (uncomment to enable)
|
|
|
|
# output every command that modifies files on the build system.
|
|
|
|
#export DH_VERBOSE = 1
|
|
|
|
|
|
|
|
include /usr/share/dpkg/pkg-info.mk
|
2019-09-10 01:55:58 +00:00
|
|
|
include /usr/share/dpkg/architecture.mk
|
|
|
|
|
|
|
|
ifeq ($(DEB_TARGET_ARCH),$(filter $(DEB_TARGET_ARCH),amd64 i386))
|
2020-01-08 22:42:56 +00:00
|
|
|
DEB_CMAKE_ARCH_OPTIONS=-DCMAKE_CXX_FLAGS="-march=x86-64 -mtune=haswell" -DCMAKE_C_FLAGS="-march=x86-64 -mtune=haswell"
|
2019-09-10 01:55:58 +00:00
|
|
|
else ifeq ($(DEB_TARGET_ARCH),arm64)
|
|
|
|
DEB_CMAKE_ARCH_OPTIONS=-DNON_PC_TARGET=ON -DCMAKE_CXX_FLAGS="-march=armv8-a+crc -mtune=cortex-a72" -DCMAKE_C_FLAGS="-march=armv8-a+crc -mtune=cortex-a72"
|
|
|
|
else ifeq ($(DEB_TARGET_ARCH),armhf)
|
|
|
|
DEB_CMAKE_ARCH_OPTIONS=-DNON_PC_TARGET=ON -DCMAKE_CXX_FLAGS="-marm -march=armv6 -mtune=cortex-a53 -mfloat-abi=hard -mfpu=vfp" -DCMAKE_C_FLAGS="-marm -march=armv6 -mtune=cortex-a53 -mfloat-abi=hard -mfpu=vfp"
|
|
|
|
else
|
|
|
|
DEB_CMAKE_ARCH_OPTIONS=
|
|
|
|
endif
|
2019-07-25 20:30:15 +00:00
|
|
|
|
2018-10-23 11:45:14 +00:00
|
|
|
%:
|
2020-09-22 22:43:49 +00:00
|
|
|
dh $@ --buildsystem=cmake+ninja --with-systemd
|
2018-10-23 11:45:14 +00:00
|
|
|
|
|
|
|
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CFLAGS += -O0
|
|
|
|
else
|
|
|
|
CFLAGS += -O2
|
|
|
|
endif
|
|
|
|
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
|
|
|
|
INSTALL_PROGRAM += -s
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
MAKEFLAGS += -j$(NUMJOBS)
|
|
|
|
endif
|
|
|
|
|
2019-07-25 20:30:15 +00:00
|
|
|
override_dh_auto_configure:
|
2020-10-02 01:47:39 +00:00
|
|
|
dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release \
|
2020-03-24 16:03:23 +00:00
|
|
|
-DGIT_VERSION="deb$(DEB_VERSION)" \
|
2019-09-10 01:55:58 +00:00
|
|
|
$(DEB_CMAKE_ARCH_OPTIONS) \
|
2020-09-23 23:07:46 +00:00
|
|
|
-DWITH_TESTS=OFF -DBUILD_SHARED_LIBS=OFF \
|
2020-09-22 21:51:40 +00:00
|
|
|
-DNATIVE_BUILD=OFF -DUSE_AVX2=OFF -DWITH_SETCAP=OFF
|
2018-11-13 15:16:14 +00:00
|
|
|
|
2019-10-29 17:02:40 +00:00
|
|
|
override_dh_installsystemd:
|
2019-10-29 18:34:01 +00:00
|
|
|
dh_installsystemd --name=lokinet
|
2019-10-29 17:02:40 +00:00
|
|
|
dh_installsystemd --name=lokinet-router
|
2019-12-16 03:20:08 +00:00
|
|
|
dh_installsystemd --name=lokinet-testnet --no-enable --no-start
|
|
|
|
dh_installsystemd --name=lokinet-testnet-router --no-enable --no-start
|
2019-10-29 17:02:40 +00:00
|
|
|
|
2020-09-22 23:31:30 +00:00
|
|
|
override_dh_auto_test:
|
2020-09-23 18:49:19 +00:00
|
|
|
true
|
|
|
|
#cd obj-${DEB_HOST_GNU_TYPE} && ninja check
|