Add hnsd from LTS
authorRISCi_ATOM <bob@bobcall.me>
Wed, 18 Sep 2019 02:15:06 +0000 (22:15 -0400)
committerRISCi_ATOM <bob@bobcall.me>
Wed, 18 Sep 2019 02:15:06 +0000 (22:15 -0400)
package/network/services/hnsd/Makefile [new file with mode: 0644]

diff --git a/package/network/services/hnsd/Makefile b/package/network/services/hnsd/Makefile
new file mode 100644 (file)
index 0000000..11e10a6
--- /dev/null
@@ -0,0 +1,63 @@
+#
+# Copyright (c) 2018 libreCMC Project <info@librecmc.org>
+# Copyright (c) 2018 Robert Call <bob@bobcall.me>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hnsd
+PKG_VERSION:=0.1
+PKG_RELEASE:=1
+PKG_LICENSE:=MIT
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=HEAD
+PKG_SOURCE_URL:=https://github.com/handshake-org/hnsd
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_FIXUP:=autoreconf
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hnsd
+       SECTION:=net
+       CATEGORY:=Network
+       TITLE:=Handshake SPV
+       DEPENDS:=+libunbound +libunbound
+       MAINTAINER:=Robert Call <bob@bobcall.me>
+       URL:=https://handshake.org
+endef
+
+define Package/hnsd/description
+SPV resolver daemon for the Handshake network.
+endef
+
+define Build/Configure
+       ( cd $(PKG_BUILD_DIR); ./autogen.sh )
+       $(call Build/Configure/Default)
+endef
+
+define Build/Compile
+       +$(MAKE) -C $(PKG_BUILD_DIR) \
+               CC="$(TARGET_CC)" \
+               CXXFLAGS="$(TARGET_CXX)" \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               LD="$(TARGET_CC)" \
+               LDLIBS="$(LDLIBS)" \
+               LDFLAGS="$(TARGET_LDFLAGS)"
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               ARCH="$(ARCH)"
+
+endef
+
+define Package/hnsd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/hnsd $(1)/usr/sbin/
+
+endef
+
+$(eval $(call BuildPackage,hnsd))