rules 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Sample debian/rules that uses debhelper.
  4. #
  5. # This file was originally written by Joey Hess and Craig Small.
  6. # As a special exception, when this file is copied by dh-make into a
  7. # dh-make output file, you may use that output file without restriction.
  8. # This special exception was added by Craig Small in version 0.37 of dh-make.
  9. #
  10. # Modified to make a template file for a multi-binary package with separated
  11. # build-arch and build-indep targets by Bill Allombert 2001
  12. # Uncomment this to turn on verbose mode.
  13. #export DH_VERBOSE=1
  14. # This has to be exported to make some magic below work.
  15. export DH_OPTIONS
  16. # These are used for cross-compiling and for saving the configure script
  17. # from having to guess our platform (since we know it already)
  18. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  19. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  20. ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  21. CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
  22. else
  23. CROSS= --build $(DEB_BUILD_GNU_TYPE)
  24. endif
  25. config.status: configure
  26. dh_testdir
  27. # Add here commands to configure the package.
  28. ifneq "$(wildcard /usr/share/misc/config.sub)" ""
  29. cp -f /usr/share/misc/config.sub config.sub
  30. endif
  31. ifneq "$(wildcard /usr/share/misc/config.guess)" ""
  32. cp -f /usr/share/misc/config.guess config.guess
  33. endif
  34. ./configure $(CROSS) --prefix=/usr --bindir=\$${prefix}/games --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --datadir=\$${prefix}/share/games CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
  35. #Architecture
  36. build: build-arch build-indep
  37. build-arch: build-arch-stamp
  38. build-arch-stamp: config.status
  39. # Add here commands to compile the arch part of the package.
  40. #$(MAKE)
  41. touch $@
  42. build-indep: build-indep-stamp
  43. build-indep-stamp: config.status
  44. # Add here commands to compile the indep part of the package.
  45. #$(MAKE) doc
  46. touch $@
  47. clean:
  48. dh_testdir
  49. dh_testroot
  50. rm -f build-arch-stamp build-indep-stamp
  51. # Add here commands to clean up after the build process.
  52. [ ! -f Makefile ] || $(MAKE) distclean
  53. rm -f config.sub config.guess
  54. dh_clean
  55. install: install-indep install-arch
  56. install-indep:
  57. dh_testdir
  58. dh_testroot
  59. dh_prep -i
  60. dh_installdirs -i
  61. # Add here commands to install the indep part of the package into
  62. # debian/<package>-doc.
  63. #INSTALLDOC#
  64. dh_install -i
  65. install-arch:
  66. dh_testdir
  67. dh_testroot
  68. dh_prep -s
  69. dh_installdirs -s
  70. # Add here commands to install the arch part of the package into
  71. # debian/tmp.
  72. $(MAKE) DESTDIR=$(CURDIR)/debian/vcmi install
  73. dh_install -s
  74. # Must not depend on anything. This is to be called by
  75. # binary-arch/binary-indep
  76. # in another 'make' thread.
  77. binary-common:
  78. dh_testdir
  79. dh_testroot
  80. dh_installchangelogs ChangeLog
  81. dh_installdocs
  82. dh_installexamples
  83. # dh_installmenu
  84. # dh_installdebconf
  85. # dh_installlogrotate
  86. # dh_installemacsen
  87. # dh_installpam
  88. # dh_installmime
  89. # dh_python
  90. # dh_installinit
  91. # dh_installcron
  92. # dh_installinfo
  93. dh_installman
  94. dh_link
  95. dh_strip
  96. dh_compress
  97. dh_fixperms
  98. # dh_perl
  99. dh_makeshlibs
  100. dh_installdeb
  101. dh_shlibdeps
  102. dh_gencontrol
  103. dh_md5sums
  104. dh_builddeb
  105. # Build architecture independant packages using the common target.
  106. binary-indep: build-indep install-indep
  107. $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
  108. # Build architecture dependant packages using the common target.
  109. binary-arch: build-arch install-arch
  110. $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
  111. binary: binary-arch binary-indep
  112. .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch