File: rules

package info (click to toggle)
pftools 3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,344 kB
  • sloc: fortran: 11,706; ansic: 10,085; makefile: 85; sh: 65
file content (38 lines) | stat: -rwxr-xr-x 1,150 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	# Avoid name spacing conflict with htop and consequently also rename gtop
	mv debian/$(DEB_SOURCE)/usr/bin/gtop debian/$(DEB_SOURCE)/usr/bin/pfgtop
	mv debian/$(DEB_SOURCE)/usr/bin/htop debian/$(DEB_SOURCE)/usr/bin/pfhtop

override_dh_installman:
	dh_installman
	mv debian/$(DEB_SOURCE)/usr/share/man/man1/gtop.1 debian/$(DEB_SOURCE)/usr/share/man/man1/pfgtop.1
	mv debian/$(DEB_SOURCE)/usr/share/man/man1/htop.1 debian/$(DEB_SOURCE)/usr/share/man/man1/pfhtop.1

override_dh_installexamples:
	dh_installexamples
	sed -i \
	    -e 's:^\([gh]top\) :pf\1 :' \
	    debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples/test.sh

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test
	export PATH=$(CURDIR)/src/Fortran/:$(PATH) ; \
	echo $${PATH} ; \
	cd data ; \
	. ./test.sh | \
	    sed -e '/^MA/s/\(N_SCORE=[68].5\)0*/\1/' \
	        -e '/^DT  */d' > test.build ; \
	grep -v '^DT  *' test.out > test.compare ; \
	diff -u test.compare test.build || true
endif