File: rules

package info (click to toggle)
rdkit 202009.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 129,624 kB
  • sloc: cpp: 288,030; python: 75,571; java: 6,999; ansic: 5,481; sql: 1,968; yacc: 1,842; lex: 1,254; makefile: 572; javascript: 461; xml: 229; fortran: 183; sh: 134; cs: 93
file content (127 lines) | stat: -rwxr-xr-x 5,584 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export CPPFLAGS     := $(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS       := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
export CXXFLAGS     := $(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
export LDFLAGS      := $(shell dpkg-buildflags --get LDFLAGS)

export DOCDIR       := $(CURDIR)/debian/rdkit-doc/usr/share/doc/rdkit/

export RDBASE       := $(CURDIR)

PY3VERS = $(shell py3versions -v -d)
PY3 = $(shell which python$(PY3VERS))
export DEBTMP := $(CURDIR)/debian/tmp

DH_AUTO_CONFIGURE_OPTS := -DCMAKE_BUILD_TYPE=None -DCMAKE_SKIP_RPATH=ON \
                          -DRDK_INSTALL_INTREE=OFF -DRDK_INSTALL_STATIC_LIBS=OFF \
                          -DRDK_BUILD_THREADSAFE_SSS=ON -DRDK_BUILD_PYTHON_WRAPPERS=ON \
                          -DRDK_OPTIMIZE_POPCNT=OFF -DRDK_USE_URF=OFF \
                          -DBoost_NO_BOOST_CMAKE=TRUE \
                          -DCMAKE_INSTALL_PREFIX=/usr \
                          -DCATCH_DIR=/usr/include/catch2

include /usr/share/postgresql-common/pgxs_debian_control.mk

%:
	dh $@ --with python3 --buildsystem=cmake --parallel

override_dh_auto_clean:
	find $(CURDIR) -name "*.pyc" | xargs rm -f
	$(RM) -r Projects/DbCLI/testData/bzr/ rdkit/Chem/inchi.py
	$(RM) -r Docs/Book/_build Code/docs rdkit/docs Code/doxygen_sqlite3.db
	$(RM) \
	Code/ForceField/MMFF/test_data/MMFF94_dative_min.sdf \
	Code/ForceField/MMFF/test_data/MMFF94_dative_min_from_SMILES.sdf \
	Code/ForceField/MMFF/test_data/MMFF94_hypervalent_min.sdf \
	Code/ForceField/MMFF/test_data/MMFF94_hypervalent_min_from_SMILES.sdf \
	Code/ForceField/MMFF/test_data/MMFF94_reference.log \
	Code/ForceField/MMFF/test_data/MMFF94s_reference.log \
	Code/ForceField/MMFF/test_data/testMMFFForceField.log \
	Code/GraphMol/Depictor/test_data/cis_trans_cpp.out.sdf \
	Code/GraphMol/Depictor/test_data/collisions.out.sdf \
	Code/GraphMol/Depictor/test_data/first_200.out.sdf \
	Code/GraphMol/Depictor/test_data/test1.out.sdf \
	Code/GraphMol/FileParsers/test_data/blah.sdf \
	Code/GraphMol/FileParsers/test_data/cdk2_stereo.sdf \
	Code/GraphMol/FileParsers/test_data/outNCI_few.sdf \
	Code/GraphMol/FileParsers/test_data/outNCI_few.tdt \
	Code/GraphMol/FileParsers/test_data/outNCI_first_200.props.sdf \
	Code/GraphMol/FileParsers/test_data/outSmiles.csv \
	Code/GraphMol/ForceFieldHelpers/UFF/test_data/Issue62.sdf \
	Code/GraphMol/MolAlign/test_data/ref_e2_pyCrippenO3A.sdf \
	Code/GraphMol/SLNParse/lex.yysln.cpp \
	Code/GraphMol/SLNParse/sln.tab.cpp \
	Code/GraphMol/SLNParse/sln.tab.hpp \
	Code/GraphMol/SmilesParse/lex.yysmarts.cpp \
	Code/GraphMol/SmilesParse/lex.yysmiles.cpp \
	Code/GraphMol/SmilesParse/smarts.tab.cpp \
	Code/GraphMol/SmilesParse/smarts.tab.hpp \
	Code/GraphMol/SmilesParse/smiles.tab.cpp \
	Code/GraphMol/SmilesParse/smiles.tab.hpp \
	Code/GraphMol/Wrap/test_data/outNCI_few.sdf \
	Code/GraphMol/Wrap/test_data/outSmiles.txt \
	Code/RDGeneral/versions.cpp \
	Docs/Book/Cartridge.rst \
	Docs/Book/Cookbook.rst \
	Docs/Book/Install.rst \
	Docs/Book/Overview.rst \
	rdkit/ML/Data/test_data/testgeneral.dat.pkl \
	rdkit/ML/Data/test_data/testquant.qdat.pkl
	$(RM) Code/RDGeneral/versions.h rdkit/sping/tests/testallps.ps
	dh_auto_clean
	+pg_buildext clean $(CURDIR)/Code/PgSQL/rdkit build-%v

override_dh_auto_configure:
	dh_auto_configure -- $(DH_AUTO_CONFIGURE_OPTS) -DPYTHON_EXECUTABLE=$(PY3) ../

override_dh_auto_build:
	dh_auto_build
	+STATIC_LINK=0 RDKIT_LIBDIR=$(wildcard $(CURDIR)/obj-*/)/lib pg_buildext build $(CURDIR)/Code/PgSQL/rdkit build-%v
	(cd $(CURDIR)/Code; doxygen doxygen/doxygen.config)
	(cd $(CURDIR)/Docs/Book; RDBASE=$(CURDIR) $(MAKE) html)
	(cd $(CURDIR)/Docs/Book; RDBASE=$(CURDIR) $(MAKE) latexpdf)

override_dh_auto_install:
	dh_auto_install

override_dh_install:
	ln -sf /usr/share/fonts/truetype/freefont/FreeSans.ttf $(DEBTMP)/usr/lib/python3/dist-packages/rdkit/Chem/Draw/FreeSans.ttf
	dh_install -ppython3-rdkit /usr/lib/python3
	$(RM) -rf $(DEBTMP)/usr/lib/python3/dist-packages/rdkit/docs/
	$(RM) -rf $(DEBTMP)/usr/share/RDKit/Projects/__pycache__
	dh_numpy3
	dh_install --list-missing
	mkdir -p $(DOCDIR)
	cp $(CURDIR)/Docs/Book/_build/latex/RDKit.pdf $(DOCDIR)
	cp -a $(CURDIR)/Docs/Book/_build/html $(DOCDIR)
	+pg_buildext install $(CURDIR)/Code/PgSQL/rdkit build-%v postgresql-%v-rdkit
	ln -sf /usr/share/javascript/jquery/jquery.js $(DOCDIR)/html/cppapi/jquery.js
	ln -sf /usr/share/javascript/jquery/jquery.js $(DOCDIR)/html/_static/jquery.js
	ln -sf /usr/share/javascript/underscore/underscore.js $(DOCDIR)/html/_static/underscore.js

override_dh_installchangelogs:
	dh_installchangelogs ReleaseNotes.md

override_dh_python3:
	dh_python3 -ppython3-rdkit
	dh_numpy3 -ppython3-rdkit

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	cp -r rdkit obj-*/
	find $(CURDIR) -name rdchem.so
	#export RDBASE=$(CURDIR) PYTHONPATH=$(wildcard $(CURDIR)/obj-*/) LD_LIBRARY_PATH="$(wildcard $(CURDIR)/obj-*/)/lib:$(LD_LIBRARY_PATH)"
	-PYTHONPATH=$(wildcard $(CURDIR)/obj-*/):$(wildcard $(CURDIR)/obj-*/)/rdkit/Chem/ LD_LIBRARY_PATH="$(wildcard $(CURDIR)/obj-*/)/lib:$(LD_LIBRARY_PATH)" dh_auto_test
endif