#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/pkg-info.mk # Debian flags invented usage of LTO, which in combination with google test on # Ubuntu 22.04.4 causes the errors supressed below export CXXFLAGS += -Wno-lto-type-mismatch -Wno-odr VERSION1=$(shell echo ${DEB_VERSION_UPSTREAM} | cut -f1 -d.) VERSION2=$(shell echo ${DEB_VERSION_UPSTREAM} | cut -f2 -d.) VERSION3=$(shell echo ${DEB_VERSION_UPSTREAM} | cut -f3 -d.) execute_before_dh_auto_configure: sed -i "s#set(VZLOGGER_MAJOR_VERSION.*)#set(VZLOGGER_MAJOR_VERSION ${VERSION1})#" CMakeLists.txt sed -i "s#set(VZLOGGER_MINOR_VERSION.*)#set(VZLOGGER_MINOR_VERSION ${VERSION2})#" CMakeLists.txt sed -i "s#set(VZLOGGER_SUB_VERSION.*)#set(VZLOGGER_SUB_VERSION ${VERSION3})#" CMakeLists.txt ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_configure: dh_auto_configure -- -DBUILD_TEST=off endif override_dh_installsystemd: # stop the service during install, see man dh_installsystemd dh_installsystemd --no-restart-after-upgrade ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: ; endif execute_after_dh_auto_build: pandoc -o vzlogger.8 -s -t man debian/vzlogger.8.md %: dh $@