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
|
#!/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
DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
export CFGDIR=/usr/share/cppcheck/cfg
DESTDIR=$(CURDIR)/debian/cppcheck
BIN = $(DESTDIR)/usr/bin
override_dh_auto_build:
sed -i.nocppflags -e 's/\$$(CXX) \$$(CXXFLAGS)/$$(CXX) $$(CPPFLAGS) $$(CXXFLAGS)/' Makefile
dh_auto_build -- HAVE_RULES=yes TINYXML=-ltinyxml2 INCLUDE_FOR_LIB=-Ilib INCLUDE_FOR_CLI=-Ilib INCLUDE_FOR_TEST="-Ilib -Icli"
$(XP) $(DB2MAN) man/cppcheck.1.xml
override_dh_auto_clean:
dh_auto_clean
[ ! -f Makefile.nocppflags ] || mv -f Makefile.nocppflags Makefile
override_dh_auto_test:
# This is currently disabled because testing requires configuration files that are added only during the install
# dh_auto_test -- HAVE_RULES=yes TINYXML=-ltinyxml2 INCLUDE_FOR_LIB=-Ilib INCLUDE_FOR_CLI=-Ilib INCLUDE_FOR_TEST="-Ilib -Icli"
override_dh_auto_install:
install -d ${BIN}
install cppcheck ${BIN}
install -d ${DESTDIR}${CFGDIR}
install -m 644 cfg/* ${DESTDIR}${CFGDIR}
# Changelog disabled, because it doesn't seem to work
# install -D -g 0 -o 0 -m 644 -p debian/changelog.upstream ${DESTDIR}/usr/share/doc/cppcheck/
%:
dh $@
|