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
|