2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
14 PKG_MD5SUM
:=58904d6d8d70114195cdeb653d56914c
16 PKG_SOURCE_URL
:=ftp
://ftp.bitwizard.nl
/mtr
/
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
22 include $(INCLUDE_DIR
)/package.mk
28 TITLE
:=Full screen ncurses traceroute tool
29 DESCRIPTION
:=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 URL
:=http
://www.bitwizard.nl
/mtr
/
40 define Build
/Configure
41 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
}; \
45 touch img
/Makefile.in
; \
49 $(TARGET_CONFIGURE_OPTS
) \
50 CFLAGS
="$(TARGET_CFLAGS)" \
51 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
52 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
53 ac_cv_lib_resolv_res_mkquery
=yes \
55 --target
=$(GNU_TARGET_NAME
) \
56 --host
=$(GNU_TARGET_NAME
) \
57 --build
=$(GNU_HOST_NAME
) \
63 --datadir=/usr
/share \
64 --includedir=/usr
/include \
65 --infodir=/usr
/share
/info \
67 --libexecdir
=/usr
/lib \
68 --localstatedir
=/var \
69 --mandir=/usr
/share
/man \
72 $(DISABLE_LARGEFILE
) \
79 rm -rf
$(PKG_INSTALL_DIR
)
80 mkdir
-p
$(PKG_INSTALL_DIR
)
81 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
82 DESTDIR
="$(PKG_INSTALL_DIR)" \
83 CFLAGS
="$(TARGET_CFLAGS)" \
84 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
85 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
89 define Package
/mtr
/install
90 install -d
-m0755
$(1)/usr
/sbin
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/mtr
$(1)/usr
/sbin
/
94 $(eval
$(call BuildPackage
,mtr
))