#! /usr/bin/make -f ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) export DH_VERBOSE = 1 else export DH_QUIET = 1 endif #export DH_BUILD_DDEBS = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/pkg-info.mk export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export PYBUILD_DESTDIR_python2=debian/python-pycuda/ export PYBUILD_DESTDIR_python2-dbg=debian/python-pycuda-dbg/ export PYBUILD_DESTDIR_python3=debian/python3-pycuda/ export PYBUILD_DESTDIR_python3-dbg=debian/python3-pycuda-dbg/ ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) DEB_CXXFLAGS_MAINT_STRIP=-O2 DEB_CXXFLAGS_MAINT_APPEND=-O0 endif BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)") SPHINXOPTS:=-D today=\"$(BUILD_DATE)\" SPHINXOPTS+=-D html_last_updated_fmt=\"$(BUILD_DATE)\" %: dh $@ --with python2,python3,sphinxdoc --buildsystem pybuild override_dh_auto_configure: ./configure.py --boost-python-libname=boost_python \ --boost-thread-libname=boost_thread \ --cuda-root=/usr --cuda-enable-gl override_dh_auto_install: dh_auto_install dh_numpy dh_numpy3 override_dh_installdocs: ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) $(MAKE) -C doc html SPHINXOPTS="$(SPHINXOPTS)" dh_installdocs endif # Sphinx documentation is architecture-independent override_dh_sphinxdoc-arch: # Do not run test automatically - they require CUDA-capable hardware override_dh_auto_test: override_dh_compress: dh_compress --all -X.py -X.txt -X.js -X.rst -X.json -X.doctree -Xobjects.inv override_dh_strip: ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) dh_strip -ppython-pycuda --dbg-package=python-pycuda-dbg dh_strip -ppython3-pycuda --dbg-package=python3-pycuda-dbg endif GIT_REVISION=v2018.1.1 GIT_SUBMODULES=pycuda/compyte GIT_URL=https://git.tiker.net/trees/pycuda.git get-orig-source: rm -rf $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz git clone $(GIT_URL) $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) cd $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) && git submodule init $(GIT_SUBMODULES) && git submodule update $(GIT_SUBMODULES) && git checkout $(GIT_REVISION) rm -rf $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/examples/demo_cdpSimplePrint.py rm -rf $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/.git* rm -rf $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/examples/.gitignore rm -rf $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/$(GIT_SUBMODULES)/.git $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/$(GIT_SUBMODULES)/.gitignore tar caf $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM) rm -rf $(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)