include $(TOPDIR)/rules.mk
PKG_NAME:=hnetd
-PKG_SOURCE_VERSION:=161577ac28741f70794f67539d8994ff0fbd713e
-PKG_VERSION:=2015-06-09-$(PKG_SOURCE_VERSION)
+PKG_SOURCE_DATE:=2018-12-21
+PKG_SOURCE_VERSION:=c43766610ed30194b048bc070a3c433aec731c40
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL:=https://github.com/sbyx/hnetd.git
+PKG_SOURCE_URL:=https://github.com/sbyx/hnetd
+PKG_MIRROR_HASH:=a41baa2e3d7930cc88073b0b3f6e1fa6a4abd9fd663f2577cfde1564fa07f8f2
+
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
-PKG_LICENSE:=GPL-2.0
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CATEGORY:=Network
TITLE:=HNCP Homenet daemon - $(2)
URL:=https://github.com/sbyx/hnetd
- DEPENDS:=+odhcpd +odhcp6c +netifd +ip $(3)
- DEPENDS+=+@IPV6
+ DEPENDS:=+odhcpd +odhcp6c +netifd $(3)
+ DEPENDS+=@IPV6
VARIANT:=$1
endef
CATEGORY:=Network
TITLE:=HNCP Homenet metapackage
URL:=https://github.com/sbyx/hnetd
- DEPENDS:=+hnetd-nossl +luci-app-hnet
+ DEPENDS:=+hnetd-nossl +luci-app-hnet +ip
# Routing
DEPENDS+=+babeld
# Service discovery
- DEPENDS+=+ohybridproxy
+ DEPENDS+=+ohybridproxy +zonestitcher
# Distributed PCP support
DEPENDS+=+miniupnpd +minimalist-pcproxy
endef
define Package/hnet-full-secure
SECTION:=net
CATEGORY:=Network
- TITLE:=HNCP Homenet metapackage
+ TITLE:=HNCP Homenet metapackage (w/ SSL)
URL:=https://github.com/sbyx/hnetd
- DEPENDS:=+hnetd-openssl +luci-app-hnet
+ DEPENDS:=+hnetd-openssl +luci-app-hnet +ip
# Routing
DEPENDS+=+babeld
# Service discovery
- DEPENDS+=+ohybridproxy
+ DEPENDS+=+ohybridproxy +zonestitcher
+ # Distributed PCP support
+ DEPENDS+=+miniupnpd +minimalist-pcproxy
+endef
+
+define Package/hnet-full-l2tp
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=HNCP Homenet metapackage (w/ L2TP)
+ URL:=https://github.com/sbyx/hnetd
+ DEPENDS:=+hnetd-nossl +luci-app-hnet +ip-full +kmod-l2tp-eth
+ # Routing
+ DEPENDS+=+babeld
+ # Service discovery
+ DEPENDS+=+ohybridproxy +zonestitcher
# Distributed PCP support
DEPENDS+=+miniupnpd +minimalist-pcproxy
endef
$(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/ohp.script $(1)/usr/sbin/hnetd-ohp-script
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/ddz.script $(1)/usr/sbin/hnetd-ddz-script
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/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
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/multicast.script $(1)/usr/sbin/hnet-multicast
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/autowifi.script $(1)/usr/sbin/autowifi
endef
define Package/hnet-full/install
true
endef
+define Package/hnet-full-l2tp/install
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/generic/tunnel.script $(1)/usr/sbin/hnetd-tunnel
+endef
+
define Package/luci-app-hnet/install
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
$(INSTALL_DIR) $(1)/www
$(eval $(call BuildPackage,hnetd-openssl))
$(eval $(call BuildPackage,hnet-full))
$(eval $(call BuildPackage,hnet-full-secure))
+$(eval $(call BuildPackage,hnet-full-l2tp))
$(eval $(call BuildPackage,luci-app-hnet))