Merge pull request #840 from cjkoenig/update_liburcu
[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:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.digifail.com/software/bluelog
16 PKG_MD5SUM:=614d0fe65bae68acff1d33d9f86e4805
17
18 PKG_LICENSE:=GPL-2.0
19 PKG_LICENSE_FILES:=COPYING
20 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/bluelog/Default
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=Bluetooth scanner and logger
30 URL:=http://www.digifail.com/software/bluelog.shtml
31 DEPENDS:=+bluez-libs +kmod-bluetooth
32 endef
33
34 define Package/bluelog/Default/description
35 Bluelog is a simple Bluetooth scanner designed to tell you how many
36 discoverable devices there are in an area as quickly as possible. It is
37 intended to be used as a site survey tool, identifying the number of possible
38 Bluetooth targets there are in the surrounding environment.
39 endef
40
41 define Package/bluelog
42 $(call Package/bluelog/Default)
43 endef
44
45 define Package/bluelog/description
46 $(call Package/bluelog/Default/description)
47 endef
48
49 define Package/bluelog-live
50 $(call Package/bluelog/Default)
51 TITLE+= (live output)
52 DEPENDS+= bluelog
53 endef
54
55 define Package/bluelog-live/description
56 $(call Package/bluelog/Default/description)
57 This package contains the files for "Bluelog Live", an optional mode of
58 Bluelog which creates a real-time webpage of discovered Bluetooth devices.
59 endef
60
61 TARGET_CFLAGS += -DOPENWRT
62
63 MAKE_FLAGS += \
64 LIBS="$(TARGET_LDFLAGS) -lbluetooth -lm"
65
66 define Package/bluelog/install
67 $(INSTALL_DIR) $(1)/usr/bin
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluelog $(1)/usr/bin/
69 $(INSTALL_DIR) $(1)/etc/init.d
70 $(INSTALL_BIN) ./files/bluelog.init $(1)/etc/init.d/bluelog
71 endef
72
73 define Package/bluelog-live/install
74 $(INSTALL_DIR) $(1)/www/bluelog
75 $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/*.html $(1)/www/bluelog/
76 $(CP) \
77 $(PKG_INSTALL_DIR)/usr/share/bluelog/openwrt.css \
78 $(1)/www/bluelog/style.css
79 $(INSTALL_DIR) $(1)/www/bluelog/images
80 $(CP) \
81 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/digifail_logo.png \
82 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/email.png \
83 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/favicon.png \
84 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/openwrt_logo.png \
85 $(PKG_INSTALL_DIR)/usr/share/bluelog/images/qrcontact.png \
86 $(1)/www/bluelog/images/
87 $(INSTALL_DIR) $(1)/www/cgi-bin
88 $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/cgi-bin/* $(1)/www/cgi-bin/
89 endef
90
91 $(eval $(call BuildPackage,bluelog))
92 $(eval $(call BuildPackage,bluelog-live))