#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_FCFLAGS_MAINT_APPEND = -ffree-line-length-none -fallow-argument-mismatch 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 symlinks in src directory find src -type l | xargs rm -f # clean up test suite rm -rf tests/Test_suite rm -f tests/test_suite.cpkl find tests -name "*.pyc" -delete config/scripts/makemake --clean override_dh_update_autotools_config: override_dh_autoreconf: if [ ! -f Makefile.am ]; then config/scripts/makemake; fi override_dh_auto_configure: dh_auto_configure -- \ --with-linalg-ldflags="-lblas -llapack" \ --with-libxc \ --with-netcdf \ --with-netcdf-fortran 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 pseudo subdirectories as we install the files in there # directly to /usr/share/abinit/psp rm -rf debian/$(DATPKGNAME)/usr/share/abinit/psp/Pseudo* 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: