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