mariadb: update to 10.9.8
[feed/packages.git] / utils / bluelog / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bluelog
11 PKG_VERSION:=1.1.2
12 PKG_RELEASE:=5
13
14 PKG_SOURCE:=Bluelog-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/MS3FGX/Bluelog/tar.gz/$(PKG_VERSION)?
16 PKG_HASH:=ebbc1357e14bc46cbddd8390cdbd29c0131b09b8ab680a1c382164ef076cb53e
17 PKG_BUILD_DIR:=$(BUILD_DIR)/Bluelog-$(PKG_VERSION)
18
19 OUI_SOURCE:=oui-2016-05-30.txt.gz
20 OUI_URL:=https://sources.openwrt.org/
21 OUI_HASH:=19d0b02eeb0d42507ee17b637a295782c14956fe1ac4803589ed93ef92c4fad5
22
23 PKG_LICENSE:=GPL-2.0
24 PKG_LICENSE_FILES:=COPYING
25 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
26
27 PKG_BUILD_PARALLEL:=1
28 PKG_INSTALL:=1
29
30 include $(INCLUDE_DIR)/package.mk
31
32 define Package/bluelog/Default
33 SECTION:=utils
34 CATEGORY:=Utilities
35 TITLE:=Bluetooth scanner and logger
36 URL:=https://github.com/MS3FGX/Bluelog
37 DEPENDS:=+bluez-libs +kmod-bluetooth
38 endef
39
40 define Package/bluelog/Default/description
41 Bluelog is a simple Bluetooth scanner designed to tell you how many
42 discoverable devices there are in an area as quickly as possible. It is
43 intended to be used as a site survey tool, identifying the number of possible
44 Bluetooth targets there are in the surrounding environment.
45 endef
46
47 define Package/bluelog
48 $(call Package/bluelog/Default)
49 endef
50
51 define Package/bluelog/description
52 $(call Package/bluelog/Default/description)
53 endef
54
55 define Package/bluelog-live
56 $(call Package/bluelog/Default)
57 TITLE+= (live output)
58 DEPENDS+= bluelog
59 endef
60
61 define Package/bluelog-live/description
62 $(call Package/bluelog/Default/description)
63 This package contains the files for "Bluelog Live", an optional mode of
64 Bluelog which creates a real-time webpage of discovered Bluetooth devices.
65 endef
66
67 define Download/oui.txt
68 FILE:=$(OUI_SOURCE)
69 URL:=$(OUI_URL)
70 HASH:=$(OUI_HASH)
71 endef
72
73 TARGET_CFLAGS += -DOPENWRT
74
75 MAKE_FLAGS += \
76 LIBS="$(TARGET_LDFLAGS) -lbluetooth -lm"
77
78 define Build/Prepare
79 $(eval $(call Download,oui.txt))
80 $(Build/Prepare/Default)
81 gzip -dc $(DL_DIR)/$(OUI_SOURCE) > $(PKG_BUILD_DIR)/oui.tmp
82 endef
83
84 define Package/bluelog/install
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluelog $(1)/usr/bin/
87 $(INSTALL_DIR) $(1)/etc/init.d
88 $(INSTALL_BIN) ./files/bluelog.init $(1)/etc/init.d/bluelog
89 endef
90
91 define Package/bluelog-live/install
92 $(INSTALL_DIR) $(1)/www/bluelog
93 $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/*.html $(1)/www/bluelog/
94 $(CP) \
95 $(PKG_INSTALL_DIR)/usr/share/bluelog/openwrt.css \
96 $(1)/www/bluelog/style.css
97 $(INSTALL_DIR) $(1)/www/bluelog/images
98 $(CP) \
99 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/digifail_logo.png \
100 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/email.png \
101 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/favicon.png \
102 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/openwrt_logo.png \
103 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/qrcontact.png \
104 $(1)/www/bluelog/images/
105 $(INSTALL_DIR) $(1)/www/cgi-bin
106 $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/cgi-bin/* $(1)/www/cgi-bin/
107 endef
108
109 $(eval $(call BuildPackage,bluelog))
110 $(eval $(call BuildPackage,bluelog-live))