#!/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 VERSION=$(shell dpkg-parsechangelog --show-field Version 2>/dev/null | cut -f1 -d-) VERSION1=$(shell echo ${VERSION} | cut -f1 -d.) VERSION2=$(shell echo ${VERSION} | cut -f2 -d.) VERSION3=$(shell echo ${VERSION} | 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 execute_after_dh_clean: rm -f vzlogger.8 %: dh $@