2
0

rules 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #!/usr/bin/make -f
  2. # Uncomment this to turn on verbose mode.
  3. #export DH_VERBOSE=1
  4. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  5. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  6. DEBVERSION:=$(shell head -n 1 debian/changelog \
  7. | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
  8. ORIGTARVER:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//')# -e 's/.dfsg$$//' -e 's/~//')
  9. UPVERSION:=$(shell echo $(ORIGTARVER) | tr -d '~')
  10. FILENAME := spandsp_$(ORIGTARVER).orig.tar.gz
  11. FULLNAME := spandsp-$(UPVERSION)
  12. URL := http://soft-switch.org/downloads/spandsp/spandsp-$(UPVERSION).tgz
  13. CFLAGS = -Wall -g
  14. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  15. CFLAGS += -O0
  16. else
  17. CFLAGS += -O2
  18. endif
  19. include /usr/share/dpatch/dpatch.make
  20. autotools: patch-stamp
  21. ln -s /usr/share/misc/config.sub config.sub
  22. ln -s /usr/share/misc/config.guess config.guess
  23. touch autotools
  24. config.status: autotools configure
  25. dh_testdir
  26. CFLAGS="$(CFLAGS)" ./configure \
  27. --host=$(DEB_HOST_GNU_TYPE) \
  28. --build=$(DEB_BUILD_GNU_TYPE) \
  29. --prefix=/usr \
  30. --mandir=\$${prefix}/share/man \
  31. --infodir=\$${prefix}/share/info \
  32. --enable-doc
  33. build: build-stamp
  34. build-stamp: config.status
  35. dh_testdir
  36. $(MAKE)
  37. touch build-stamp
  38. clean: clean-patched unpatch
  39. clean-patched:
  40. dh_testdir
  41. dh_testroot
  42. rm -f build-stamp autotools
  43. -$(MAKE) distclean
  44. -$(RM) -f config.sub
  45. -$(RM) -f config.guess
  46. dh_clean
  47. install: build-stamp
  48. dh_testdir
  49. dh_testroot
  50. dh_clean -k
  51. $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
  52. binary-indep: build-stamp install
  53. dh_testdir -i
  54. dh_testroot -i
  55. dh_installchangelogs -i ChangeLog
  56. dh_installdocs -i DueDiligence
  57. dh_install -i
  58. dh_compress -i
  59. dh_fixperms -i
  60. dh_installdeb -i
  61. dh_gencontrol -i
  62. dh_md5sums -i
  63. dh_builddeb -i
  64. binary-arch: build-stamp install
  65. dh_testdir -a
  66. dh_testroot -a
  67. dh_installchangelogs -a ChangeLog
  68. dh_installdocs -a DueDiligence
  69. dh_install -a
  70. dh_strip -a
  71. dh_compress -a
  72. dh_fixperms -a
  73. dh_makeshlibs -a
  74. dh_installdeb -a
  75. dh_shlibdeps -a
  76. dh_gencontrol -a
  77. dh_md5sums -a
  78. dh_builddeb -a
  79. get-orig-source:
  80. -@@dh_testdir
  81. @@[ -d ../tarballs/. ]||mkdir -p ../tarballs
  82. @@echo Downloading $(FILENAME) from $(URL) ...
  83. @@wget -N -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
  84. binary: binary-indep binary-arch
  85. .PHONY: build clean binary-indep binary-arch binary install patch unpatch