rules 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #!/usr/bin/make -f
  2. # Sample debian/rules that uses debhelper.
  3. # GNU copyright 1997 to 1999 by Joey Hess.
  4. # Uncomment this to turn on verbose mode.
  5. #export DH_VERBOSE=1
  6. # This is the debhelper compatibility version to use.
  7. export DH_COMPAT=3
  8. # These are used for cross-compiling and for saving the configure script
  9. # from having to guess our platform (since we know it already)
  10. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  11. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  12. ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  13. CFLAGS += -g
  14. endif
  15. ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  16. INSTALL_PROGRAM += -s
  17. endif
  18. # shared library versions, option 1
  19. version=0.1.8
  20. major=0
  21. # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
  22. #version=`ls src/.libs/lib*.so.* | \
  23. # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
  24. #major=`ls src/.libs/lib*.so.* | \
  25. # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
  26. config.status: configure
  27. dh_testdir
  28. # Add here commands to configure the package.
  29. ./bootstrap
  30. CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
  31. build: build-stamp
  32. build-stamp: config.status
  33. dh_testdir
  34. # Add here commands to compile the package.
  35. $(MAKE)
  36. doxygen
  37. touch build-stamp
  38. clean:
  39. dh_testdir
  40. dh_testroot
  41. rm -f build-stamp
  42. # Add here commands to clean up after the build process.
  43. -$(MAKE) distclean
  44. -test -r /usr/share/misc/config.sub && \
  45. cp -f /usr/share/misc/config.sub config.sub
  46. -test -r /usr/share/misc/config.guess && \
  47. cp -f /usr/share/misc/config.guess config.guess
  48. dh_clean
  49. install: build
  50. dh_testdir
  51. dh_testroot
  52. dh_clean -k
  53. dh_installdirs
  54. # Add here commands to install the package into debian/tmp
  55. $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
  56. install -d $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/latex
  57. install -d $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/html
  58. install -d $(CURDIR)/debian/tmp/usr/share/man/man3
  59. # install -D docs/README $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/README
  60. install -D docs/latex/* $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/latex
  61. install -D docs/html/* $(CURDIR)/debian/tmp/usr/share/doc/libphysfs0-dev/html
  62. install -D docs/man/man3/* $(CURDIR)/debian/tmp/usr/share/man/man3
  63. # Build architecture-independent files here.
  64. binary-indep: build install
  65. # We have nothing to do by default.
  66. # Build architecture-dependent files here.
  67. binary-arch: build install
  68. dh_testdir
  69. dh_testroot
  70. dh_movefiles
  71. # dh_installdebconf
  72. dh_installdocs
  73. dh_installexamples
  74. dh_installmenu
  75. # dh_installlogrotate
  76. # dh_installemacsen
  77. # dh_installpam
  78. # dh_installmime
  79. # dh_installinit
  80. dh_installcron
  81. dh_installman
  82. dh_installinfo
  83. # dh_undocumented
  84. dh_installchangelogs CHANGELOG
  85. dh_link
  86. dh_strip
  87. dh_compress
  88. dh_fixperms
  89. dh_makeshlibs
  90. dh_installdeb
  91. # dh_perl
  92. dh_shlibdeps
  93. dh_gencontrol
  94. dh_md5sums
  95. dh_builddeb
  96. binary: binary-indep binary-arch
  97. .PHONY: build clean binary-indep binary-arch binary install