3
include /usr/share/cdbs/1/rules/buildcore.mk
4
include /usr/share/cdbs/1/class/autotools.mk
5
include /usr/share/cdbs/1/rules/debhelper.mk
6
include /usr/share/cdbs/1/rules/dpatch.mk
8
DEB_CONFIGURE_EXTRA_FLAGS := --bindir=/usr/lib/psi --docdir=/usr/share/doc/psi3
9
DEB_CONFIGURE_EXTRA_FLAGS += --with-fc=gfortran --with-debug="-Wall -g"
10
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
11
DEB_CONFIGURE_EXTRA_FLAGS += --with-opt="-O0"
6
export SCRATCH="$(CURDIR)/tmp-scratch"
11
override_dh_auto_clean:
13
-(cd tests; $(MAKE) quicktestsclean)
14
-(cd doc/userman; $(MAKE) realclean)
15
find $(CURDIR) \( -name Makefile -o -name MakeVars -o -name MakeRules -o -name "*_config.h" \) -delete
16
(cd doc; rm -f doxygen/doxygen.cfg macros.tex progman/svn.eps userman/prsty.bst)
17
(cd tests; rm -f runtest.pl psi_start/psi_start.pl uhf-stab/uhf-stab.pl rhf-stab/rhf-stab.pl rohf-stab/rohf-stab.pl)
18
(cd include; rm -f psiconfig.h chkpt_params.h)
19
rm -f lib/*.a a.out config.*
22
override_dh_auto_configure:
23
dh_auto_configure -- --bindir=/usr/lib/psi --docdir=/usr/share/doc/psi3
25
override_dh_auto_build:
26
(cd doc/userman; $(MAKE))
29
override_dh_auto_install:
31
rm -rf debian/psi3/usr/lib/libPSI*
32
rm -rf debian/psi3/usr/include
33
rm -rf debian/psi3/usr/share/psi/ruby
34
mv debian/psi3/usr/lib/psi/psi3 debian/psi3/usr/bin
35
for i in scf-opt scf-freq scf-polar rhf-stab \
36
rhf-oeprop cc1 mp2-opt mp2-direct-sp mp2-scs \
37
dboc-rhf1 mp2r12-sp1 rhf-lindep1 cisd-sp casscf-sp; \
38
do cp tests/$$i/input.dat \
39
debian/psi3/usr/share/doc/psi3/examples/$$i.dat;\
41
cp doc/userman/userman.ps debian/psi3/usr/share/doc/psi3
43
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
44
override_dh_auto_test:
45
-(cd tests; $(MAKE) quicktests)
13
DEB_MAKE_INSTALL_TARGET += txtdir=/usr/share/doc/psi3
14
DEB_MAKE_CLEAN_TARGET := clean
15
DEB_MAKE_CHECK_TARGET := -k tests || true
16
DEB_MAKE_ENVVARS := SCRATCH="$(CURDIR)/tmp-scratch"
18
# Remove static libraries too, sf.net #1900682
20
find $(CURDIR) \( -name Makefile -o -name MakeVars -o -name MakeRules \) -delete
22
dh_clean lib/*.a config.*
25
# Move over the psi3 executable
26
mv $(CURDIR)/debian/psi3/usr/lib/psi/psi3 $(CURDIR)/debian/psi3/usr/bin
27
# Do not ship development stuff and ruby bindings for now
28
rm -rf $(CURDIR)/debian/psi3/usr/include
29
rm -f $(CURDIR)/debian/psi3/usr/lib/lib*
30
rm -rf $(CURDIR)/debian/psi3/usr/share/psi/ruby
31
# we put the helper tools into /usr/lib/psi/, so delete all
32
# manual pages except psi3.1
33
find $(CURDIR)/debian/psi3/usr/share/man/man1/ -type f ! -name "psi3.1" -delete