PageRenderTime 109ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/debian/rules

http://scim-python.googlecode.com/
Makefile | 106 lines | 73 code | 12 blank | 21 comment | 1 complexity | c93cd7e79ac4274685d8992194b5513f MD5 | raw file
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Uncomment this to turn on verbose mode.
  4. #export DH_VERBOSE=1
  5. # These are used for cross-compiling and for saving the configure script
  6. # from having to guess our platform (since we know it already)
  7. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  8. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  9. #DEB_MAKE_INSTALL_TARGET := install debroot=$(CURDIR)/debian/tmp prefix=$(CURDIR)/debian/tmp/usr
  10. # Get supported python version and destdir
  11. PYVERS = $(shell pyversions -rv)
  12. clean:
  13. dh_testdir
  14. dh_testroot
  15. rm -f *-stamp
  16. [ ! -f Makefile ] || $(MAKE) distclean
  17. rm -f config.sub config.guess
  18. dh_clean
  19. config-common:
  20. dh_testdir
  21. # Add here commands to configure the package.
  22. ifneq "$(wildcard /usr/share/misc/config.sub)" ""
  23. cp -f /usr/share/misc/config.sub config.sub
  24. endif
  25. ifneq "$(wildcard /usr/share/misc/config.guess)" ""
  26. cp -f /usr/share/misc/config.guess config.guess
  27. endif
  28. config-ext-%: config-common configure
  29. dh_testdir
  30. env PYTHON=python$* ./configure \
  31. --disable-static \
  32. --enable-debian-dpkg \
  33. --enable-english-writer=force \
  34. --enable-pinyin \
  35. --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
  36. --prefix=/usr \
  37. CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
  38. #mv -f config.status $@
  39. touch $@
  40. build: build-stamp
  41. build-stamp: $(PYVERS:%=build-ext-%)
  42. build-ext-%: config-ext-%
  43. dh_testdir
  44. # Add here commands to compile the package.
  45. $(MAKE)
  46. touch $@
  47. install: build
  48. dh_testdir
  49. dh_testroot
  50. dh_clean -k
  51. dh_installdirs
  52. # Add here commands to install the package into debian/python-scim.
  53. $(MAKE) DESTDIR=$(CURDIR)/debian/tmp NO_INDEX=true install
  54. dh_install --sourcedir=debian/tmp --fail-missing
  55. # Build architecture-independent files here.
  56. binary-indep: build install
  57. dh_testdir -i
  58. dh_testroot -i
  59. dh_installchangelogs -i ChangeLog
  60. dh_installdocs -i
  61. dh_pycentral -i
  62. # dh_python
  63. # dh_installman
  64. dh_link -i
  65. dh_compress -i -X.py
  66. dh_fixperms -i
  67. dh_installdeb -i
  68. dh_shlibdeps -i
  69. dh_gencontrol -i
  70. dh_md5sums -i
  71. dh_builddeb -i
  72. # Build architecture-dependent files here.
  73. binary-arch: build install
  74. dh_testdir -a
  75. dh_testroot -a
  76. dh_installchangelogs -a ChangeLog
  77. dh_installdocs -a
  78. dh_pycentral
  79. # dh_pycentral -pscim-python-chinese
  80. # dh_pycentral -pscim-python-english
  81. # dh_python
  82. # dh_installman
  83. dh_link -a
  84. dh_strip -ppython-scim
  85. dh_compress -a -X.py
  86. dh_fixperms -a
  87. # dh_makeshlibs
  88. dh_installdeb -a
  89. dh_shlibdeps -a
  90. dh_gencontrol -a
  91. dh_md5sums -a
  92. dh_builddeb -a
  93. binary: binary-indep binary-arch
  94. .PHONY: build clean binary-indep binary-arch binary install