File: rules

package info (click to toggle)
abinit 8.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 285,072 kB
  • sloc: f90: 490,206; python: 44,892; xml: 30,323; perl: 7,298; sh: 5,533; ansic: 5,309; fortran: 557; objc: 323; cpp: 284; makefile: 49; csh: 42; pascal: 31
file content (64 lines) | stat: -rwxr-xr-x 2,355 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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# DEB_BUILD_OPTIONS=nocheck

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

%:
	dh $@ --with autotools_dev

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_auto_configure:
	dh_auto_configure -- --with-linalg-ldflags="-lblas -llapack"
	dh_auto_configure --sourcedirectory=doc -- --prefix=/usr

override_dh_auto_build:
	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:
	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)/help_make
	# change example input files psp location to /usr/share/abinit/psp
	for i in `ls debian/$(DATPKGNAME)/usr/share/doc/abinit/examples/*.files`; do	\
		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 $$i;		\
	done
	# 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_compress:
	dh_compress -X.pdf -X.in -X.in_freq

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