Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #
  2. # Copyright (c) 2018 libreCMC Project <info@librecmc.org>
  3. # Copyright (c) 2018 Robert Call <bob@bobcall.me>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=hnsd
  10. PKG_VERSION:=0.1
  11. PKG_RELEASE:=1
  12. PKG_LICENSE:=MIT
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_VERSION:=HEAD
  15. PKG_SOURCE_URL:=https://github.com/handshake-org/hnsd
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/hnsd
  22. SECTION:=net
  23. CATEGORY:=Network
  24. TITLE:=Handshake SPV
  25. DEPENDS:=+libunbound +libunbound
  26. MAINTAINER:=Robert Call <bob@bobcall.me>
  27. URL:=https://handshake.org
  28. endef
  29. define Package/hnsd/description
  30. SPV resolver daemon for the Handshake network.
  31. endef
  32. define Build/Configure
  33. ( cd $(PKG_BUILD_DIR); ./autogen.sh )
  34. $(call Build/Configure/Default)
  35. endef
  36. define Build/Compile
  37. +$(MAKE) -C $(PKG_BUILD_DIR) \
  38. CC="$(TARGET_CC)" \
  39. CXXFLAGS="$(TARGET_CXX)" \
  40. CFLAGS="$(TARGET_CFLAGS)" \
  41. LD="$(TARGET_CC)" \
  42. LDLIBS="$(LDLIBS)" \
  43. LDFLAGS="$(TARGET_LDFLAGS)"
  44. CROSS_COMPILE="$(TARGET_CROSS)" \
  45. ARCH="$(ARCH)"
  46. endef
  47. define Package/hnsd/install
  48. $(INSTALL_DIR) $(1)/usr/sbin
  49. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hnsd $(1)/usr/sbin/
  50. endef
  51. $(eval $(call BuildPackage,hnsd))