2 # Copyright (C) 2012-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
10 PKG_SOURCE_VERSION
:=e60ce270f5a1ab01c6e262e1b9ee5cc20223b8c4
11 PKG_VERSION
:=2014-06-06-$(PKG_SOURCE_VERSION
)
15 PKG_SOURCE_URL
:=git
://github.com
/sbyx
/hnetd.git
16 PKG_MAINTAINER
:=Steven Barth
<cyrus@openwrt.org
>
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
19 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
21 include $(INCLUDE_DIR
)/package.mk
22 include $(INCLUDE_DIR
)/cmake.mk
24 # Spammy debug builds for now
25 CMAKE_OPTIONS
+= -DL_LEVEL
=7
28 CMAKE_OPTIONS
+= -DBACKEND
=openwrt
33 TITLE
:=HNCP Homenet daemon
34 URL
:=https
://github.com
/sbyx
/hnetd
35 DEPENDS
:=+odhcpd
+odhcp6c
+netifd
39 define Package
/hnet-full
42 TITLE
:=HNCP Homenet metapackage
43 URL
:=https
://github.com
/sbyx
/hnetd
48 DEPENDS
+=+ohybridproxy
49 # Distributed PCP support
50 DEPENDS
+=+miniupnpd
+minimalist-pcproxy
53 define Package
/hnetd
/description
54 This package provides a daemon which implementats distributed
prefix assignment
55 and service discovery for a home network consisting of multiple routers
56 connected to multiple service providers. It provides a netifd protocol
"hnet"
57 for use in
/etc
/config
/network.
60 define Package
/hnetd
/install
61 $(INSTALL_DIR
) $(1)/usr
/sbin
/
62 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hnetd
$(1)/usr
/sbin
/
63 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
64 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/openwrt
/hnet.sh
$(1)/lib
/netifd
/proto
65 ln
-s hnetd
$(1)/usr
/sbin
/hnet-call
66 $(INSTALL_DIR
) $(1)/etc
/init.d
67 $(INSTALL_BIN
) .
/files
/hnetd.init
$(1)/etc
/init.d
/hnetd
68 $(INSTALL_DIR
) $(1)/etc
/config
69 $(INSTALL_DATA
) .
/files
/hnet.config
$(1)/etc
/config
/hnet
70 $(INSTALL_BIN
) .
/files
/ohp-script
$(1)/usr
/sbin
/hnetd-ohp-script
71 $(INSTALL_BIN
) .
/files
/pcp-script
$(1)/usr
/sbin
/hnetd-pcp-script
72 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/generic
/hnetd-routing
$(1)/usr
/sbin
/hnetd-routing
73 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
74 $(INSTALL_BIN
) .
/files
/hnetd.defaults
$(1)/etc
/uci-defaults
/x-hnetd.defaults
77 define Package
/hnet-full
/install
81 define Package
/hnetd
/postinst
83 [ -n
"$${IPKG_INSTROOT}" ] ||
{
84 (.
/etc
/uci-defaults
/x-hnetd.defaults
) && rm -f
/etc
/uci-defaults
/x-hnetd.defaults
85 [ -x
/etc
/init.d
/dnsmasq
] && /etc
/init.d
/dnsmasq restart
86 /etc
/init.d
/hnetd enable
87 /etc
/init.d
/hnetd start
92 $(eval
$(call BuildPackage
,hnetd
))
93 $(eval
$(call BuildPackage
,hnet-full
))