File: rules

package info (click to toggle)
google-perftools 2.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,760 kB
  • sloc: cpp: 82,562; perl: 4,116; python: 4,021; ansic: 817; makefile: 721; sh: 402; ruby: 138; asm: 130
file content (39 lines) | stat: -rwxr-xr-x 1,032 bytes parent folder | download
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