File: rules

package info (click to toggle)
openbabel 2.3.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 75,356 kB
  • ctags: 41,971
  • sloc: cpp: 321,256; ansic: 89,228; python: 7,262; perl: 6,418; pascal: 793; sh: 194; xml: 97; ruby: 55; makefile: 48; java: 23
file content (64 lines) | stat: -rwxr-xr-x 2,093 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
#
#export DH_VERBOSE=1

-include /usr/share/python/python.mk

PYVERS=$(shell pyversions -vs)
PERL_ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')

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 DEB_CXXFLAGS_MAINT_APPEND = -std=gnu++98

DH_AUTO_CONFIGURE_OPTS := -DCMAKE_BUILD_TYPE=None \
                          -DPYTHON_BINDINGS=ON -DPERL_BINDINGS=ON \
                          -DOBPERL_INSTALLDIRS=vendor \
                          -DCMAKE_SKIP_RPATH=ON -DBUILD_GUI=ON \
                          -DENABLE_OPENMP=ON
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
DH_AUTO_CONFIGURE_OPTS += -DENABLE_TESTS=OFF
endif

%:
	dh $@ --with=python2 --builddirectory=$(CURDIR)/build --parallel

override_dh_auto_configure:
	dh_auto_configure -- $(DH_AUTO_CONFIGURE_OPTS)

override_dh_auto_build:
	dh_auto_build
	for pyversion in $(PYVERS); do \
	  cd $(CURDIR)/build/scripts && CPPFLAGS=-I/usr/include/eigen2 \
	  python$$pyversion $(CURDIR)/scripts/python/setup.py build --force; \
	done

override_dh_auto_install:
	dh_auto_install
	for pyversion in $(PYVERS); do \
	  cd $(CURDIR)/build/scripts && \
	  python$$pyversion $(CURDIR)/scripts/python/setup.py install \
	  --force --root $(CURDIR)/debian/python-openbabel --prefix=/usr --no-compile -O0 \
	  $(py_setup_install_args); \
	done

override_dh_install:
	dh_install --list-missing -Nlibchemistry-openbabel-perl
	dh_install --list-missing -plibchemistry-openbabel-perl -Xperllocal.pod --autodest $(PERL_ARCHLIB)

override_dh_installdocs:
	dh_installdocs -Xjquery.js

override_dh_compress:
	dh_compress -Xusr/share/doc/libopenbabel-doc/html/ \
	            -Xusr/share/doc/python-openbabel/examples

override_dh_auto_test:
	-BABEL_LIBDIR=$(CURDIR)/build/lib \
	LD_LIBRARY_PATH=$(CURDIR)/build/lib \
	dh_auto_test

override_dh_strip:
	dh_strip --dbg-package=openbabel-dbg