Developing lightweight computation at the DSG edge

Makefile 3.22 KB
Newer Older
1
#    Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
2
#
3
4
5
6
#    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.
7
#
8
9
10
11
12
13
14
15
16
17
18
#    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".
19
20
21
22
#
# Contributors:
#	Simó Albert i Beltran
#
23
24
25
26
27

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

PKG_NAME:=qmp-small-node
28
PKG_RELEASE:=8
hitz's avatar
hitz committed
29
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
30
31
32
QMP_CODENAME:=Ratafia
QMP_RELEASE:=1.0beta
QMP_BUILDDATE:=$(shell date +%Y%m%d_%H%M)
33
34
35
36
37

include $(INCLUDE_DIR)/package.mk

define Package/qmp-small-node
  SECTION:=net
38
  CATEGORY:=qMp
39
40
41
  TITLE:=Required addons for small qmp mesh nodes ( 4MByte )
  URL:=http://qmp.cat
  DEPENDS:= \
42
	+uhttpd +luci +luci-lib-nixio \
43
	+luci-ssl +iwinfo \
44
45
	+ahcpd \
	+radvd \
46
	+hostapd-mini +wpa-supplicant-mini \
47
	+wireless-tools +iw +netperf \
48
	+bmx6-qmp +bmx6-qmp-uci-config +bmx6-qmp-json +bmx6-qmp-sms +bmx6-luci \
49
	+olsrd +olsrd-mod-txtinfo +olsrd-mod-httpinfo +olsrd-mod-watchdog +olsrd-mod-arprefresh \
p4u's avatar
p4u committed
50
	+gwck-qmp +luci-theme-qmp \
51
	+firewall \
hakais's avatar
hakais committed
52
	+ip \
53
54
55
	+6in4 +6to4 \
	+ip6tables +ip6tables-utils \
	+kmod-ipip \
56
	+kmod-ip6-tunnel +kmod-iptunnel6 \
57
	+kmod-tun \
58
	+kmod-dummy \
59
	+gwck-qmp \
60
	+b6m-spread \
61

62
63
64
65
66
67
68
endef


define Package/qmp-small-node/description
 Addons for small qmp nodes (4MByte flash)
endef

hitz's avatar
hitz committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
define Package/qmp-small-node/conffiles
	/etc/config/qmp
endef

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

define Build/Configure
endef

define Build/Compile
endef

hitz's avatar
hitz committed
83
84
define Package/qmp-small-node/install
	$(CP) ./files/* $(1)/
85
	$(CP) ./files/etc/config/qmp $(1)/etc/config/qmp.orig
86
87
	$(SED) 's,$$$$BRANCH,$(BRANCH_GIT),g' $(1)/etc/uci-defaults/qmp_banner
	$(SED) 's,$$$$REV,$(REV_GIT),g' $(1)/etc/uci-defaults/qmp_banner
88
89
90
	$(SED) 's,$$$$COD,$(QMP_CODENAME),g' $(1)/etc/uci-defaults/qmp_banner
	$(SED) 's,$$$$REL,$(QMP_RELEASE),g' $(1)/etc/uci-defaults/qmp_banner
	$(SED) 's,$$$$DATE,$(QMP_BUILDDATE),g' $(1)/etc/uci-defaults/qmp_banner
hitz's avatar
hitz committed
91
	chmod 755 $(1)/etc/init.d/qmp_autoconf
p4u's avatar
p4u committed
92
	date +%Y%m%d > $(1)/etc/qmp/qmp.version
93
94
95
96
97
98
99
	echo "QMP_ID=qMp" > $(1)/etc/qmp/qmp.release
	echo "QMP_CODENAME=$(QMP_CODENAME)" >> $(1)/etc/qmp/qmp.release
	echo "QMP_RELEASE=$(QMP_RELEASE)" >> $(1)/etc/qmp/qmp.release
	echo "QMP_BRANCH=$(BRANCH_GIT)" >> $(1)/etc/qmp/qmp.release
	echo "QMP_REVISION=$(REV_GIT)" >> $(1)/etc/qmp/qmp.release
	echo "QMP_BUILDDATE=$(QMP_BUILDDATE)" >> $(1)/etc/qmp/qmp.release
	echo "QMP_DESCRIPTION=\"qMp $(QMP_CODENAME) $(QMP_RELEASE), $(BRANCH_GIT) rev.$(REV_GIT)-$(QMP_BUILDDATE)\"" >> $(1)/etc/qmp/qmp.release
hitz's avatar
hitz committed
100
endef
101
102
103


$(eval $(call BuildPackage,qmp-small-node))
hitz's avatar
hitz committed
104