Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #
  2. # Copyright (C) 2011-2012 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=resolveip
  9. PKG_RELEASE:=2
  10. PKG_LICENSE:=GPL-2.0
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/resolveip
  13. SECTION:=utils
  14. CATEGORY:=Base system
  15. TITLE:=Simple DNS resolver with configurable timeout
  16. MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  17. endef
  18. define Package/resolveip/description
  19. This package contains the small resolveip utility which
  20. can be used by scripts to turn host names into numeric
  21. IP addresses. It supports IPv4 and IPv6 resolving and
  22. has a configurable timeout to guarantee a certain maximum
  23. runtime in case of slow or defunct DNS servers.
  24. endef
  25. define Build/Prepare
  26. $(INSTALL_DIR) $(PKG_BUILD_DIR)
  27. $(INSTALL_DATA) ./src/resolveip.c $(PKG_BUILD_DIR)/
  28. endef
  29. define Build/Compile
  30. $(TARGET_CC) $(TARGET_CFLAGS) -Wall \
  31. -o $(PKG_BUILD_DIR)/resolveip $(PKG_BUILD_DIR)/resolveip.c
  32. endef
  33. define Package/resolveip/install
  34. $(INSTALL_DIR) $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_BUILD_DIR)/resolveip $(1)/usr/bin/
  36. endef
  37. $(eval $(call BuildPackage,resolveip))