/debian/rules

https://bitbucket.org/lindenlab/apiary/ · Makefile · 65 lines · 48 code · 11 blank · 6 comment · 0 complexity · a29fbfde2a2537ae1d3dd94b26f31a70 MD5 · raw file

  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Uncomment this to turn on verbose mode.
  4. #export DH_VERBOSE=1
  5. PACKAGE := apiary
  6. PKG_ROOT := $(CURDIR)/debian/$(PACKAGE)
  7. # Install for every supported python version (listed in the control file).
  8. PYVERS := $(shell pyversions -vr)
  9. build: build-stamp patch
  10. build-stamp: $(PYVERS:%=build-version-%)
  11. touch $@
  12. build-version-%:
  13. dh_testdir
  14. python$* setup.py build
  15. touch $@
  16. patch: patch-stamp
  17. patch-stamp:
  18. dpatch apply-all
  19. touch $@
  20. unpatch:
  21. dpatch deapply-all
  22. rm -rf patch-stamp debian/patched
  23. clean: unpatch
  24. dh_testdir
  25. dh_testroot
  26. rm -f *-stamp build-version-* install-version-*
  27. rm -rf build dist *.egg-info
  28. -find . -name '*.py[co]' -exec rm -f {} \;
  29. dh_clean
  30. install: install-stamp
  31. install-stamp: build-stamp $(PYVERS:%=install-version-%)
  32. install-version-%:
  33. dh_testdir
  34. dh_testroot
  35. dh_clean -k
  36. dh_installdirs
  37. python$* setup.py install \
  38. --root=$(PKG_ROOT) --single-version-externally-managed
  39. binary-indep: build install
  40. dh_testdir
  41. dh_testroot
  42. dh_installchangelogs
  43. dh_installdocs
  44. #dh_installexamples -X.svn examples/*
  45. dh_pycentral
  46. dh_compress -X.py
  47. dh_fixperms
  48. dh_installdeb
  49. dh_gencontrol
  50. dh_md5sums
  51. dh_builddeb
  52. binary-arch: build install
  53. binary: binary-indep binary-arch
  54. .PHONY: build clean binary-indep binary-arch binary install configure patch unpatch