fwupd: add package
[feed/packages.git] / net / mtr / Makefile
1 #
2 # Copyright (C) 2006-2015 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.95
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/traviscross/mtr/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=12490fb660ba5fb34df8c06a0f62b4f9cbd11a584fc3f6eceda0a99124e8596f
17
18 PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
19 PKG_LICENSE:=GPL-2.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:matt_kimball_and_roger_wolff:mtr
22
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25 PKG_FIXUP:=autoreconf
26 PKG_BUILD_FLAGS:=gc-sections
27
28 CONFIGURE_ARGS += \
29 --without-gtk \
30 $(call autoconf_bool,CONFIG_IPV6,ipv6)
31
32 include $(INCLUDE_DIR)/package.mk
33
34 define Package/mtr/Default
35 SECTION:=net
36 CATEGORY:=Network
37 DEPENDS:=+libncurses
38 TITLE:=Full screen ncurses traceroute tool
39 URL:=https://www.bitwizard.nl/mtr/
40 PROVIDES:=mtr
41 endef
42
43 define Package/mtr-nojson
44 $(Package/mtr/Default)
45 TITLE+= Without JSON
46 VARIANT:=nojson
47 DEFAULT_VARIANT:=1
48 endef
49
50 define Package/mtr-json
51 $(Package/mtr/Default)
52 TITLE+= With JSON
53 VARIANT:=json
54 DEPENDS+=+jansson
55 endef
56
57 ifeq ($(BUILD_VARIANT),nojson)
58 CONFIGURE_ARGS += --without-jansson
59 endif
60
61 define Package/mtr/description
62 mtr combines the functionality of the 'traceroute' and 'ping' programs
63 in a single network diagnostic tool.
64 As mtr starts, it investigates the network connection between the host
65 mtr runs on and a user-specified destination host. After it
66 determines the address of each network hop between the machines,
67 it sends a sequence ICMP ECHO requests to each one to determine the
68 quality of the link to each machine. As it does this, it prints
69 running statistics about each machine.
70 endef
71
72 TARGET_LDFLAGS += -Wl,--as-needed
73
74 CONFIGURE_VARS += ac_cv_lib_cap_cap_set_proc=no
75
76 define Package/mtr/install/Default
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr-packet $(1)/usr/sbin/
80 endef
81
82 Package/mtr-nojson/install = $(Package/mtr/install/Default)
83 Package/mtr-json/install = $(Package/mtr/install/Default)
84
85 $(eval $(call BuildPackage,mtr-nojson))
86 $(eval $(call BuildPackage,mtr-json))