4505b6068bdd7456c00e84f583d088de73c02636
[packages.git] / net / mtr / Makefile
1 #
2 # Copyright (C) 2006 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:=mtr
11 PKG_VERSION:=0.75
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.bitwizard.nl/mtr/
16 PKG_MD5SUM:=23baca52d0922c2ecba7eba05317868c
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/mtr
21   SECTION:=net
22   CATEGORY:=Network
23   DEPENDS:=+libncurses
24   TITLE:=Full screen ncurses traceroute tool
25   URL:=http://www.bitwizard.nl/mtr/
26 endef
27
28 define Package/mtr/description
29         mtr combines the functionality of the 'traceroute' and 'ping' programs
30         in a single network diagnostic tool.
31         As mtr starts, it investigates the network connection between the host
32         mtr runs on and a user-specified destination host. After it
33         determines the address of each network hop between the machines,
34         it sends a sequence ICMP ECHO requests to each one to determine the
35         quality of the link to each machine. As it does this, it prints
36         running statistics about each machine.
37 endef
38
39 define Build/Configure
40         (cd $(PKG_BUILD_DIR); touch \
41                 configure.in \
42                 aclocal.m4 \
43                 Makefile.in \
44                 img/Makefile.in \
45                 stamp-h.in \
46                 config.h.in \
47                 configure \
48         );
49         $(call Build/Configure/Default, \
50                 --without-gtk \
51                 , \
52                 ac_cv_lib_resolv_res_mkquery=yes \
53         )
54 endef
55
56 define Build/Compile
57         $(MAKE) -C $(PKG_BUILD_DIR) \
58                 DESTDIR="$(PKG_INSTALL_DIR)" \
59                 all install
60 endef
61
62 define Package/mtr/install
63         $(INSTALL_DIR) $(1)/usr/sbin
64         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/
65 endef
66
67 $(eval $(call BuildPackage,mtr))