forked from nicklgw/magent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·51 lines (41 loc) · 1.44 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#
# Copyright (C) 2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=magent
PKG_RELEASE:=1.0
PKG_MAINTAINER:=nick <[email protected]>
PKG_LICENSE:=LGPL-2.1
include $(INCLUDE_DIR)/package-seccomp.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/magent
SECTION:=leedarson
CATEGORY:=Leedarson
TITLE:=Drive mosquitto with uloop event
DEPENDS:=+libopenssl +libjson-c +libsqlite3 +libubox +libubus +libblobmsg-json +libmosquitto +libuuid +libustream-openssl +libuci
endef
define Package/magent/description
Taking advantage of uloop events to handle mosquitto,
allows the entire business to complete with just one single thread.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)
endef
define Package/magent/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/magent $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/magent.init $(1)/etc/init.d/magent
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/magent.config $(1)/etc/config/magent
$(INSTALL_DIR) $(1)/etc/magent
$(INSTALL_CONF) ./files/rootCA.crt $(1)/etc/magent/
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DATA) ./files/magent.hotplug $(1)/etc/hotplug.d/iface/26-magent
endef
$(eval $(call BuildPackage,magent))