Developing lightweight computation at the DSG edge

Makefile 2.46 KB
Newer Older
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
#    Copyright (C) 2014-2018 Routek S.L. - https://www.routek.net
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#    The full GNU General Public License is included in this package in
#    the file called "COPYING".
#
#    Contributors:
#        Agustí Moll Garcia <agusti@routek.net>
#        Roger Pueyo Centelles <rogerpueyo@routek.net>
#

include $(TOPDIR)/rules.mk

QMP_FEED_DIR?=$(CURDIR)

QMP_GIT_BRANCH?=$(shell git -C $(QMP_FEED_DIR) rev-parse --abbrev-ref HEAD)
QMP_GIT_REV?=$(shell git -C $(QMP_FEED_DIR) rev-parse --short HEAD)
QMP_GIT_DATE?=$(shell git -C $(QMP_FEED_DIR) log -1 --format=%cd --date=format:%Y%m%d)
QMP_GIT_TIME?=$(shell git -C $(QMP_FEED_DIR) log -1 --format=%cd --date=format:%H%M)

Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
33
QMP_RELEASE?=4.2.3
34
QMP_PKGRELEASE=r$(QMP_GIT_DATE)_$(QMP_GIT_TIME)
Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
35
QMP_CODENAME?=Macondo
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
QMP_BUILDDATE:=$(shell date +%Y%m%d-%H%M)

PKG_NAME:=qmp-ncd
PKG_VERSION:=$(QMP_RELEASE)-$(QMP_PKGRELEASE)
PKG_RELEASE:=$(QMP_CODENAME)-$(QMP_GIT_REV)
PKG_LICENSE:=GPL-3.0+

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)


include $(INCLUDE_DIR)/package.mk


define Package/qmp-ncd
    TITLE:=Network Characterization daemon
		SECTION:=net
    CATEGORY:=qMp
    URL:=http://dev.qmp.cat/projects/nc
54
    DEPENDS:=+lua +liblua +libubox-lua +libubus-lua +ubus +iperf3 +wget
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
endef

define Package/qmp-ncd/description
    Network Characterization is a tool to monitor nodes in a Community Network, display collected data in a user-friendly manner and perform administrative tasks.
    This package provides the daemon, built in Lua, that communicates via Ubus with other processes of the local node and via JSON over HTTP with other nodes in the network.
endef

define Build/Prepare
        mkdir -p $(PKG_BUILD_DIR)
endef

define Build/Configure
endef

define Build/Compile
endef

define Package/qmp-ncd/install
        $(CP) ./files/* $(1)/
endef

$(eval $(call BuildPackage,qmp-ncd))