rules 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/make -f
  2. # Get the supported Python versions
  3. PYVERS = $(shell pyversions -r -v)
  4. # Get the default Python version
  5. PYVERSION = $(shell pyversions -d -v)
  6. # Callable functions to determine the correct PYTHONPATH
  7. pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
  8. pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib_d.*-$(1) 2>/dev/null || ls -d $(CURDIR)/build/lib.*$(1)-pydebug)
  9. %:
  10. dh --buildsystem=python_distutils --with python2 $*
  11. override_dh_auto_install:
  12. dh_auto_install --destdir=debian/tmp
  13. # Install everything excluding the *_d.so debug extensions to python-dulwich
  14. dh_install -X"*_d.so" "debian/tmp/*" -p python-dulwich
  15. # Install the debug extensions to python-dulwich-dbg
  16. dh_install "debian/tmp/usr/lib/python*/*-packages/dulwich/*_d.so" -p python-dulwich-dbg
  17. override_dh_installdocs:
  18. dh_installdocs --link-doc=python-dulwich
  19. dh_installdocs -ppython-dulwich docs/tutorial -X.gitignore -XMakefile
  20. override_dh_auto_test:
  21. ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
  22. $(MAKE) check
  23. endif
  24. override_dh_strip:
  25. ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
  26. dh_strip --dbg-package=python-dulwich-dbg
  27. endif