Developing lightweight computation at the DSG edge

Makefile 2.5 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
#    Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.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 2 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, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
#    The full GNU General Public License is included in this distribution in
#    the file called "COPYING".
#
# Contributors:
#	Pau Escrich <p4u@dabax.net>
#	Simó Albert i Beltran
#

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

28
29
30
31
32
33
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)
34

Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
35
QMP_RELEASE?=4.2.1
36
QMP_PKGRELEASE=r$(QMP_GIT_DATE)_$(QMP_GIT_TIME)
Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
37
QMP_CODENAME?=Macondo
38
QMP_BUILDDATE:=$(shell date +%Y%m%d-%H%M)
39

40
PKG_NAME:=qmp-tiny-node
41
PKG_VERSION:=$(QMP_RELEASE)-$(QMP_PKGRELEASE)
42
PKG_RELEASE:=$(QMP_CODENAME)-$(QMP_GIT_REV)
43
PKG_LICENSE:=GPL-3.0+
Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
44

45
46
47
48
49
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/qmp-tiny-node
50
  TITLE:=Quick Mesh Project (qMp) minimalistic node (4 MB flash)
51
52
  SECTION:=net
  CATEGORY:=qMp
53
  URL:=https://qmp.cat
Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
54
  DEPENDS:= +qmp-system \
55
	+luci-app-bmx6 +uhttpd \
56
	+uhttpd-mod-ubus
57
58
59
endef

define Package/qmp-tiny-node/description
60
61
62
 This metapackage provides a minimalistic qMp node with just the bare minimum
 features:
  - qMp system configuration files and scripts
Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
63
  - BMX6 routing protocol
64
  - Minimalistic LuCI web interface (only for qMp settings)
Roger Pueyo Centelles's avatar
Roger Pueyo Centelles committed
65

66
 It is intended to be used on storage-constrained devices with 4 MB flash.
67
68
69
endef

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

73
74
75
76
77
78
define Build/Configure
endef

define Build/Compile
endef

79
80
81
define Package/qmp-tiny-node/install
	$(INSTALL_DIR) $(1)/etc/qmp
endef
82
83

$(eval $(call BuildPackage,qmp-tiny-node))