1
0

Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #
  2. # Copyright (C) 2012-2013 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=bluelog
  9. PKG_VERSION:=1.1.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=ftp://ftp.digifail.com/software/bluelog
  13. PKG_MD5SUM:=614d0fe65bae68acff1d33d9f86e4805
  14. OUI_SOURCE:=oui-2016-05-30.txt.gz
  15. OUI_URL:=http://sources.lede-project.org/
  16. OUI_MD5SUM:=38048729fdb5a7a7e0c5db6a51dc2dd1
  17. PKG_LICENSE:=GPL-2.0
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/bluelog/Default
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=Bluetooth scanner and logger
  26. URL:=http://www.digifail.com/software/bluelog.shtml
  27. DEPENDS:=+bluez-libs +kmod-bluetooth
  28. endef
  29. define Package/bluelog/Default/description
  30. Bluelog is a simple Bluetooth scanner designed to tell you how many
  31. discoverable devices there are in an area as quickly as possible. It is
  32. intended to be used as a site survey tool, identifying the number of possible
  33. Bluetooth targets there are in the surrounding environment.
  34. endef
  35. define Package/bluelog
  36. $(call Package/bluelog/Default)
  37. endef
  38. define Package/bluelog/description
  39. $(call Package/bluelog/Default/description)
  40. endef
  41. define Package/bluelog-live
  42. $(call Package/bluelog/Default)
  43. TITLE+= (live output)
  44. DEPENDS+= bluelog
  45. endef
  46. define Package/bluelog-live/description
  47. $(call Package/bluelog/Default/description)
  48. This package contains the files for "Bluelog Live", an optional mode of
  49. Bluelog which creates a real-time webpage of discovered Bluetooth devices.
  50. endef
  51. define Download/oui.txt
  52. FILE:=$(OUI_SOURCE)
  53. URL:=$(OUI_URL)
  54. MD5SUM:=$(OUI_MD5SUM)
  55. endef
  56. TARGET_CFLAGS += -DOPENWRT
  57. MAKE_FLAGS += \
  58. LIBS="$(TARGET_LDFLAGS) -lbluetooth -lm"
  59. define Build/Prepare
  60. $(eval $(call Download,oui.txt))
  61. $(Build/Prepare/Default)
  62. zcat $(DL_DIR)/$(OUI_SOURCE) > $(PKG_BUILD_DIR)/oui.tmp
  63. endef
  64. define Package/bluelog/install
  65. $(INSTALL_DIR) $(1)/usr/bin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluelog $(1)/usr/bin/
  67. $(INSTALL_DIR) $(1)/etc/init.d
  68. $(INSTALL_BIN) ./files/bluelog.init $(1)/etc/init.d/bluelog
  69. endef
  70. define Package/bluelog-live/install
  71. $(INSTALL_DIR) $(1)/www/bluelog
  72. $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/*.html $(1)/www/bluelog/
  73. $(CP) \
  74. $(PKG_INSTALL_DIR)/usr/share/bluelog/openwrt.css \
  75. $(1)/www/bluelog/style.css
  76. $(INSTALL_DIR) $(1)/www/bluelog/images
  77. $(CP) \
  78. $(PKG_INSTALL_DIR)/usr/share/bluelog/images/digifail_logo.png \
  79. $(PKG_INSTALL_DIR)/usr/share/bluelog/images/email.png \
  80. $(PKG_INSTALL_DIR)/usr/share/bluelog/images/favicon.png \
  81. $(PKG_INSTALL_DIR)/usr/share/bluelog/images/openwrt_logo.png \
  82. $(PKG_INSTALL_DIR)/usr/share/bluelog/images/qrcontact.png \
  83. $(1)/www/bluelog/images/
  84. $(INSTALL_DIR) $(1)/www/cgi-bin
  85. $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/cgi-bin/* $(1)/www/cgi-bin/
  86. endef
  87. $(eval $(call BuildPackage,bluelog))
  88. $(eval $(call BuildPackage,bluelog-live))