debian.rules 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #!/usr/bin/make -f
  2. # Sample debian/rules that uses debhelper.
  3. # GNU copyright 1997 to 1999 by Joey Hess.
  4. PROJECT_NAME = av-caster
  5. BUILD_DIR = Builds/Makefile
  6. ASSETS_DIR = Assets
  7. PACKAGING_DIR = /usr/src/packages/BUILD/debian/$(PROJECT_NAME)
  8. PACKAGE_BIN_DIR = $(PACKAGING_DIR)/usr/bin
  9. PACKAGE_APPS_DIR = $(PACKAGING_DIR)/usr/share/applications
  10. PACKAGE_ICONS_DIR = $(PACKAGING_DIR)/usr/share/icons/hicolor/48x48/apps/
  11. BINARY_ARTEFACT = $(BUILD_DIR)/build/$(PROJECT_NAME)
  12. DESKTOP_FILE = $(ASSETS_DIR)/av-caster.desktop
  13. ICON_FILE = $(ASSETS_DIR)/avcaster-logo-48.png
  14. # Uncomment this to turn on verbose mode.
  15. #export DH_VERBOSE=1
  16. # This is the debhelper compatibility version to use.
  17. export DH_COMPAT=4
  18. CFLAGS = -g
  19. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  20. CFLAGS += -O0
  21. else
  22. CFLAGS += -O2
  23. endif
  24. build: build-stamp
  25. build-stamp:
  26. dh_testdir
  27. # Add here commands to compile the package.
  28. make --directory=$(BUILD_DIR)/ CONFIG=Release TARGET_ARCH="-mtune=generic"
  29. # --- end custom part for compiling
  30. touch build-stamp
  31. clean:
  32. dh_testdir
  33. dh_testroot
  34. rm -f build-stamp
  35. # Add here commands to clean up after the build process.
  36. make --directory=$(BUILD_DIR)/ clean || true
  37. # --- end custom part for cleaning up
  38. dh_clean
  39. install: build
  40. dh_testdir
  41. dh_testroot
  42. dh_clean -k
  43. dh_installdirs
  44. # Add here commands to install the package
  45. mkdir -p $(PACKAGE_BIN_DIR)
  46. mkdir -p $(PACKAGE_APPS_DIR)
  47. mkdir -p $(PACKAGE_ICONS_DIR)
  48. install -m 755 $(BINARY_ARTEFACT) $(PACKAGE_BIN_DIR)/
  49. install -m 644 $(DESKTOP_FILE) $(PACKAGE_APPS_DIR)/
  50. install -m 644 $(ICON_FILE) $(PACKAGE_ICONS_DIR)/
  51. # --- end custom part for installing
  52. # Build architecture-independent files here.
  53. binary-indep: build install
  54. # We have nothing to do by default.
  55. # Build architecture-dependent files here.
  56. binary-arch: build install
  57. dh_testdir
  58. dh_testroot
  59. # dh_installdebconf
  60. dh_installdocs
  61. dh_installexamples
  62. dh_installmenu
  63. # dh_installlogrotate
  64. # dh_installemacsen
  65. # dh_installpam
  66. # dh_installmime
  67. # dh_installinit
  68. dh_installcron
  69. dh_installman
  70. dh_installinfo
  71. # dh_undocumented
  72. dh_installchangelogs
  73. dh_link
  74. dh_strip
  75. dh_compress
  76. dh_fixperms
  77. # dh_makeshlibs
  78. dh_installdeb
  79. # dh_perl
  80. dh_shlibdeps
  81. dh_gencontrol
  82. dh_md5sums
  83. dh_builddeb
  84. binary: binary-indep binary-arch
  85. .PHONY: build clean binary-indep binary-arch binary install