rules 1.4 KB

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