X-Git-Url: http://git.openwrt.org/?p=feed%2Frouting.git;a=blobdiff_plain;f=hnetd%2FMakefile;h=bc69dc8d43b444af4170ea0325d52382e92db824;hp=00d29735d0250e19d17bd96e4815860223045a36;hb=f789112125413c26ce6658be66e86ebecd609b10;hpb=132a4a4dd17dea4b3daf9b447d40d287f2231885;ds=sidebyside diff --git a/hnetd/Makefile b/hnetd/Makefile index 00d2973..bc69dc8 100644 --- a/hnetd/Makefile +++ b/hnetd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2012-2013 OpenWrt.org +# Copyright (C) 2012-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,13 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hnetd -PKG_SOURCE_VERSION:=af3b2ce3cd325e87cdc00cbccf7144cf566ef3bd -PKG_VERSION:=2014-04-16-$(PKG_SOURCE_VERSION) +PKG_SOURCE_VERSION:=161577ac28741f70794f67539d8994ff0fbd713e +PKG_VERSION:=2015-06-09-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/sbyx/hnetd.git +PKG_SOURCE_URL:=https://github.com/sbyx/hnetd.git PKG_MAINTAINER:=Steven Barth +PKG_LICENSE:=GPL-2.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) @@ -27,40 +28,81 @@ CMAKE_OPTIONS += -DL_LEVEL=7 # OpenWRT target CMAKE_OPTIONS += -DBACKEND=openwrt -define Package/hnetd +ifeq ($(BUILD_VARIANT),openssl) +CMAKE_OPTIONS += -DDTLS_OPENSSL=1 +endif + +define Package/hnetd/Default SECTION:=net CATEGORY:=Network - TITLE:=HNCP Homenet daemon + TITLE:=HNCP Homenet daemon - $(2) URL:=https://github.com/sbyx/hnetd - DEPENDS:=+odhcpd +odhcp6c +netifd + DEPENDS:=+odhcpd +odhcp6c +netifd +ip $(3) DEPENDS+=+@IPV6 + VARIANT:=$1 endef +Package/hnetd-nossl=$(call Package/hnetd/Default,nossl,no authentication) +Package/hnetd-openssl=$(call Package/hnetd/Default,openssl,authentication via OpenSSL,+libopenssl) + define Package/hnet-full SECTION:=net CATEGORY:=Network - TITLE:=HNCP Homenet metapackage (hnetd + ohybridproxy + babels) + TITLE:=HNCP Homenet metapackage URL:=https://github.com/sbyx/hnetd - DEPENDS:=+odhcpd +odhcp6c +netifd +hnetd +ohybridproxy +babels - DEPENDS+=+@IPV6 + DEPENDS:=+hnetd-nossl +luci-app-hnet + # Routing + DEPENDS+=+babeld + # Service discovery + DEPENDS+=+ohybridproxy + # Distributed PCP support + DEPENDS+=+miniupnpd +minimalist-pcproxy +endef + +define Package/hnet-full-secure + SECTION:=net + CATEGORY:=Network + TITLE:=HNCP Homenet metapackage + URL:=https://github.com/sbyx/hnetd + DEPENDS:=+hnetd-openssl +luci-app-hnet + # Routing + DEPENDS+=+babeld + # Service discovery + DEPENDS+=+ohybridproxy + # Distributed PCP support + DEPENDS+=+miniupnpd +minimalist-pcproxy endef -define Package/hnetd/description +define Package/luci-app-hnet + SECTION:=luci + CATEGORY:=LuCI + SUBMENU:=3. Applications + TITLE:=HNCP Homenet configuration and visualization +# DEPENDS:=+hnetd +# TBD - how to express dependency on 'some' hnetd? +endef + +define Package/hnetd-$(BUILD_VARIANT)/description This package provides a daemon which implementats distributed prefix assignment and service discovery for a home network consisting of multiple routers connected to multiple service providers. It provides a netifd protocol "hnet" for use in /etc/config/network. endef -define Package/hnetd/install +define Package/hnetd-$(BUILD_VARIANT)/install $(INSTALL_DIR) $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/hnetd $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/lib/netifd/proto $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/hnet.sh $(1)/lib/netifd/proto - ln -s hnetd $(1)/usr/sbin/hnet-call + ln -s hnetd $(1)/usr/sbin/hnet-ifresolve + ln -s hnetd $(1)/usr/sbin/hnet-trust + ln -s hnetd $(1)/usr/sbin/hnet-dump $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/hnetd.init $(1)/etc/init.d/hnetd + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/hnet.config $(1)/etc/config/hnet $(INSTALL_BIN) ./files/ohp-script $(1)/usr/sbin/hnetd-ohp-script + $(INSTALL_BIN) ./files/pcp-script $(1)/usr/sbin/hnetd-pcp-script $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/hnetd-routing $(1)/usr/sbin/hnetd-routing $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/hnetd.defaults $(1)/etc/uci-defaults/x-hnetd.defaults @@ -70,7 +112,18 @@ define Package/hnet-full/install true endef -define Package/hnetd/postinst +define Package/hnet-full-secure/install + true +endef + +define Package/luci-app-hnet/install + $(INSTALL_DIR) $(1)/usr/lib/lua/luci + $(INSTALL_DIR) $(1)/www + $(CP) -R $(PKG_BUILD_DIR)/openwrt/luci/luasrc/* $(1)/usr/lib/lua/luci/ + $(CP) -R $(PKG_BUILD_DIR)/openwrt/luci/htdocs/* $(1)/www/ +endef + +define Package/hnetd-$(BUILD_VARIANT)/postinst #!/bin/sh [ -n "$${IPKG_INSTROOT}" ] || { (. /etc/uci-defaults/x-hnetd.defaults) && rm -f /etc/uci-defaults/x-hnetd.defaults @@ -78,8 +131,10 @@ define Package/hnetd/postinst /etc/init.d/hnetd enable /etc/init.d/hnetd start } -exit 0 endef -$(eval $(call BuildPackage,hnetd)) +$(eval $(call BuildPackage,hnetd-nossl)) +$(eval $(call BuildPackage,hnetd-openssl)) $(eval $(call BuildPackage,hnet-full)) +$(eval $(call BuildPackage,hnet-full-secure)) +$(eval $(call BuildPackage,luci-app-hnet))