d1e675e428d8a17d3dc734568a23d60a8a4557a5
[openwrt/staging/yousong.git] / package / network / utils / resolveip / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=resolveip
11 PKG_RELEASE:=2
12
13 include $(INCLUDE_DIR)/package.mk
14
15 define Package/resolveip
16 SECTION:=utils
17 CATEGORY:=Base system
18 TITLE:=Simple DNS resolver with configurable timeout
19 MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
20 endef
21
22 define Package/resolveip/description
23 This package contains the small resolveip utility which
24 can be used by scripts to turn host names into numeric
25 IP addresses. It supports IPv4 and IPv6 resolving and
26 has a configurable timeout to guarantee a certain maximum
27 runtime in case of slow or defunct DNS servers.
28 endef
29
30 define Build/Prepare
31 $(INSTALL_DIR) $(PKG_BUILD_DIR)
32 $(INSTALL_DATA) ./src/resolveip.c $(PKG_BUILD_DIR)/
33 endef
34
35 define Build/Compile
36 $(TARGET_CC) $(TARGET_CFLAGS) -Wall \
37 -o $(PKG_BUILD_DIR)/resolveip $(PKG_BUILD_DIR)/resolveip.c
38 endef
39
40 define Package/resolveip/install
41 $(INSTALL_DIR) $(1)/usr/bin
42 $(INSTALL_BIN) $(PKG_BUILD_DIR)/resolveip $(1)/usr/bin/
43 endef
44
45 $(eval $(call BuildPackage,resolveip))