File: rules

package info (click to toggle)
abinit 8.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 353,520 kB
  • sloc: f90: 529,369; xml: 212,361; python: 46,692; perl: 7,303; ansic: 6,365; sh: 5,634; fortran: 557; objc: 323; cpp: 285; makefile: 62; csh: 42; pascal: 31
file content (83 lines) | stat: -rwxr-xr-x 3,012 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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export HOME = /nonexistent

# DEB_BUILD_OPTIONS=nocheck

DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
DOCPKGNAME := $(DEBPKGNAME)-doc
DATPKGNAME := $(DEBPKGNAME)-data

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	dh_auto_clean --sourcedirectory=doc
	rm -f doc/presentation/presentation*.pdf
	find doc -name "*.aux" -delete
	find doc -name "*.log" -delete
	rm -f doc/theory/ELF/wf_elecden_kinden_elf.pdf doc/theory/ELF/test_report/test_report_elf.pdf
	# clean up test suite
	rm -rf tests/Test_suite
	rm -f  tests/test_suite.cpkl
	find tests -name "*.pyc" -delete

override_dh_update_autotools_config:

override_dh_autoreconf:
	config/scripts/makemake

override_dh_auto_configure:
	FCFLAGS="-ffree-line-length-none -g" dh_auto_configure -- --with-linalg-ldflags="-lblas -llapack"
	dh_auto_configure --sourcedirectory=doc -- --prefix=/usr

override_dh_auto_build-indep:
	dh_auto_build
	dh_auto_build --sourcedirectory=doc
	cd doc/theory/ELF && pdflatex -interaction=nonstopmode --shell-escape wf_elecden_kinden_elf.tex
	cd doc/theory/ELF/test_report && pdflatex -interaction=nonstopmode --shell-escape test_report_elf.tex
	cd doc/theory/KDEN && pdflatex -interaction=nonstopmode --shell-escape test_report_kden.tex
	cd doc/theory/MGGA && pdflatex -interaction=nonstopmode --shell-escape report_MGGA.tex

override_dh_auto_install-indep:
	dh_auto_install
	dh_auto_install --sourcedirectory=doc
	# Installing the LaTeX source inside the abinit-doc package does not
	# make any sense
	find debian -type f -name "*.tex" -delete
	# remove documentation for building the software from user docs
	rm -rf debian/$(DOCPKGNAME)/usr/share/doc/$(DEBPKGNAME)/html/help_make
	# remove HGH subdirectory as we install the files in there directly to
	# /usr/share/abinit/psp
	rm -rf debian/$(DATPKGNAME)/usr/share/abinit/psp/HGH

override_dh_install-indep:
	dh_install
	# change example input files psp location to /usr/share/abinit/psp
	find debian/$(DATPKGNAME)/usr/share/doc/abinit/examples -name '*.files' \
		| xargs	sed -i -e s#../../../Psps_for_tests/HGH/#/usr/share/abinit/psp/#g	\
		               -e s#../../../Psps_for_tests/#/usr/share/abinit/psp/#g		\
		               -e s#../../Psps_for_tests/#/usr/share/abinit/psp/#g

override_dh_installman-arch:
	mkdir --parents debian/tmp/usr/share/man/man1/
	help2man --name 'Ab initio atomic-scale simulation software' \
		debian/tmp/usr/bin/abinit > debian/tmp/usr/share/man/man1/abinit.1
	help2man --name 'Ab initio atomic-scale simulation software' \
		debian/tmp/usr/bin/multibinit > debian/tmp/usr/share/man/man1/multibinit.1
	dh_installman

override_dh_compress:
	dh_compress -X.pdf -X.in -X.in_freq -X.md

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test-arch:
	(cd tests; ./runtests.py -t 1800 fast)
endif

# Tests are not needed for arch-indep packages:
override_dh_auto_test-indep: