rules 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. # These are used for cross-compiling and for saving the configure script
  11. # from having to guess our platform (since we know it already)
  12. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  13. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  14. CFLAGS = -Wall -g
  15. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  16. CFLAGS += -O0
  17. else
  18. CFLAGS += -O2
  19. endif
  20. ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  21. INSTALL_PROGRAM += -s
  22. endif
  23. # shared library versions, option 1
  24. #version=2.0.5
  25. #major=2
  26. # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
  27. version=`ls src/.libs/lib*.so.* | \
  28. awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
  29. major=`ls src/.libs/lib*.so.* | \
  30. awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
  31. config.status: configure
  32. dh_testdir
  33. # Add here commands to configure the package.
  34. CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
  35. build: build-stamp
  36. build-stamp: config.status
  37. dh_testdir
  38. # Add here commands to compile the package.
  39. $(MAKE)
  40. touch build-stamp
  41. clean:
  42. dh_testdir
  43. dh_testroot
  44. rm -f build-stamp
  45. # Add here commands to clean up after the build process.
  46. -$(MAKE) distclean
  47. ifneq "$(wildcard /usr/share/misc/config.sub)" ""
  48. cp -f /usr/share/misc/config.sub config.sub
  49. endif
  50. ifneq "$(wildcard /usr/share/misc/config.guess)" ""
  51. cp -f /usr/share/misc/config.guess config.guess
  52. endif
  53. dh_clean
  54. install: build
  55. dh_testdir
  56. dh_testroot
  57. dh_clean -k
  58. dh_installdirs
  59. # Add here commands to install the package into debian/tmp
  60. $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
  61. # Build architecture-independent files here.
  62. binary-indep: build install
  63. # We have nothing to do by default.
  64. # Build architecture-dependent files here.
  65. binary-arch: build install
  66. dh_testdir
  67. dh_testroot
  68. dh_installchangelogs ChangeLog
  69. dh_installdocs
  70. dh_installexamples
  71. dh_install --sourcedir=debian/tmp
  72. # dh_installmenu
  73. # dh_installdebconf
  74. # dh_installlogrotate
  75. # dh_installemacsen
  76. # dh_installpam
  77. # dh_installmime
  78. # dh_installinit
  79. # dh_installcron
  80. # dh_installinfo
  81. dh_installman
  82. dh_link
  83. dh_strip
  84. dh_compress
  85. dh_fixperms
  86. # dh_perl
  87. # dh_python
  88. dh_makeshlibs
  89. dh_installdeb
  90. dh_shlibdeps
  91. dh_gencontrol
  92. dh_md5sums
  93. dh_builddeb
  94. binary: binary-indep binary-arch
  95. .PHONY: build clean binary-indep binary-arch binary install