1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export QT_SELECT := qt5
CFLAGS := $(CFLAGS) $(CPPFLAGS)
CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS)
QTCHART_OFF_ARCHITECTURES := ia64 powerpc sparc64
ifneq (,$(findstring $(DEB_HOST_ARCH), $(QTCHART_OFF_ARCHITECTURES)))
QTCHART_FLAG := OFF
else
QTCHART_FLAG := ON
endif
%:
dh $@ --buildsystem=cmake --builddirectory=build
override_dh_auto_configure:
[ -e backup ] || (mkdir backup; cp Makefile gui/*.ts backup)
QTDIR= dh_auto_configure -- \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_BUNDLED_TINYXML2=OFF \
-DUSE_MATCHCOMPILER=ON \
-DHAVE_RULES=ON \
-DBUILD_TESTS=ON \
-DBUILD_GUI=ON \
-DWITH_QCHART=$(QTCHART_FLAG) \
-DFILESDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/cppcheck
override_dh_auto_build:
dh_auto_build
xsltproc -''-nonet -''-param man.charmap.use.subset "0" --output build/cppcheck.1 \
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl \
man/cppcheck.1.xml
sed -e "s/1.70/$(DEB_VERSION_UPSTREAM)/" debian/cppcheck-htmlreport.1.in \
>build/cppcheck-htmlreport.1
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
build/bin/testrunner
endif
override_dh_auto_install:
dh_auto_install
install htmlreport/cppcheck-htmlreport $(CURDIR)/debian/tmp/usr/bin
install -d $(CURDIR)/debian/tmp/usr/share/man/man1
install build/cppcheck.1 $(CURDIR)/debian/tmp/usr/share/man/man1
install build/cppcheck-htmlreport.1 $(CURDIR)/debian/tmp/usr/share/man/man1
dh_install --sourcedir=debian/tmp
override_dh_dwz:
dh_dwz -Xcppcheck
override_dh_clean:
dh_clean
[ ! -e backup ] || (cp backup/Makefile .; cp backup/*.ts gui; rm backup/*; rmdir backup)
|