/debian/rules

https://bitbucket.org/nmk/chouwa · Makefile · 76 lines · 53 code · 12 blank · 11 comment · 3 complexity · 4e74c5dd6851cdfb61eac04a7849c5db MD5 · raw file

  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Sample debian/rules that uses debhelper.
  4. # This file was originally written by Joey Hess and Craig Small.
  5. # As a special exception, when this file is copied by dh-make into a
  6. # dh-make output file, you may use that output file without restriction.
  7. # This special exception was added by Craig Small in version 0.37 of dh-make.
  8. # Uncomment this to turn on verbose mode.
  9. #export DH_VERBOSE=1
  10. include /usr/share/python/python.mk
  11. PYVERS = $(shell pyversions -r)
  12. CFLAGS = -Wall -g
  13. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  14. CFLAGS += -O0
  15. else
  16. CFLAGS += -O2
  17. endif
  18. configure: configure-stamp
  19. configure-stamp:
  20. dh_testdir
  21. touch configure-stamp
  22. build: build-stamp
  23. build-stamp: configure-stamp
  24. dh_testdir
  25. for py in $(PYVERS); do \
  26. $$py setup.py build; \
  27. done
  28. touch build-stamp
  29. clean:
  30. dh_testdir
  31. dh_testroot
  32. -rm -f build-stamp configure-stamp
  33. for py in $(PYVERS); do \
  34. $$py setup.py clean; \
  35. done
  36. python setup.py clean
  37. find $(CURDIR) -name "*.pyc" -exec rm -f '{}' \;
  38. dh_clean
  39. install: build
  40. dh_testdir
  41. dh_testroot
  42. dh_clean -k
  43. dh_installdirs
  44. for py in $(PYVERS); do \
  45. $$py setup.py install --root=$(CURDIR)/debian/python-chouwa $(py_setup_install_args); \
  46. done
  47. # Build architecture-independent files here.
  48. binary-indep: build install
  49. dh_testdir
  50. dh_testroot
  51. dh_link
  52. dh_strip
  53. dh_compress
  54. dh_fixperms
  55. dh_pysupport
  56. dh_installdeb
  57. dh_shlibdeps
  58. dh_gencontrol
  59. dh_md5sums
  60. dh_builddeb
  61. # Build architecture-dependent files here.
  62. binary-arch: build install
  63. binary: binary-indep binary-arch
  64. .PHONY: build clean binary-indep binary-arch binary install configure