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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/dpkg/architecture.mk
TEST_ARCHS = i386 amd64
DESTDIR = $(CURDIR)/debian/tmp
override_dh_auto_install:
dh_auto_install
# rename binary
cd $(DESTDIR)/usr/bin && mv pprof google-pprof
cd $(DESTDIR)/usr/share/man/man1 && \
mv pprof.1 google-pprof.1 && \
sed -i 's/pprof/google-pprof/g' google-pprof.1
cd $(DESTDIR)/usr/share/doc/gperftools/ && \
sed -i 's/pprof/google-pprof/g' README
# remove unwanted documentation
cd $(DESTDIR)/usr/share/doc/gperftools/ && \
rm -f ChangeLog ChangeLog.old INSTALL README_windows.txt TODO
# remove .la files
find $(DESTDIR) -name \*.la -exec rm {} \;
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
# List of architectures for which test execution is enabled
ifneq (,$(findstring $(DEB_HOST_ARCH), $(TEST_ARCHS)))
$(MAKE) check
endif # TEST_ARCHS
endif # nocheck
%:
dh $@
.PHONY: override_dh_auto_install override_dh_auto_test
|