f00439e113750fece5be01d49eb6edabf7b2df66
[feed/telephony.git] / net / sngrep / Makefile
1 #
2 # Copyright (C) 2016 Daniel Engberg <daniel.engberg.lists@pyret.net>
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:=sngrep
11
12 PKG_VERSION:=1.4.10
13 PKG_RELEASE:=$(AUTORELEASE)
14
15 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
16 PKG_LICENSE:=GPL-3.0+
17 PKG_LICENSE_FILES:=COPYING
18
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20 PKG_SOURCE_URL:=https://github.com/irontec/sngrep/releases/download/v$(PKG_VERSION)
21 PKG_HASH:=cedbe521c9730deda004bff71e88c8c56ae66d3d147ddc6f5f965df2ca67a8df
22
23 PKG_RELEASE:=1
24
25 PKG_FIXUP:=autoreconf
26 PKG_BUILD_PARALLEL:=1
27 PKG_INSTALL:=1
28
29 PKG_CONFIG_DEPENDS:=CONFIG_IPV6 CONFIG_SNGREP_ENABLE_EEP CONFIG_SNGREP_WITH_PCRE
30
31 include $(INCLUDE_DIR)/package.mk
32
33 define Package/sngrep
34 SECTION:=utils
35 CATEGORY:=Utilities
36 SUBMENU:=Telephony
37 DEPENDS:=+libncursesw +libopenssl +libpcap +SNGREP_WITH_PCRE:libpcre
38 TITLE:=Ncurses SIP messages flow viewer
39 URL:=https://github.com/irontec/sngrep
40 endef
41
42 define Package/sngrep/description
43 sngrep is a tool for displaying SIP calls message flows from terminal.
44
45 It supports live capture to display realtime SIP packets and can also be
46 used as PCAP viewer.
47 endef
48
49 define Package/sngrep/conffiles
50 /etc/sngreprc
51 endef
52
53 define Package/sngrep/config
54 menu "sngrep configuration"
55 depends on PACKAGE_sngrep
56
57 config SNGREP_ENABLE_EEP
58 bool "EEP/HEP support"
59 default y
60 help
61 Enable EEP/HEP support
62
63 config SNGREP_WITH_PCRE
64 bool "PCRE support"
65 default y
66 help
67 Enable Perl compatible regular expressions
68 endmenu
69 endef
70
71 CONFIGURE_ARGS += \
72 --$(if $(CONFIG_SNGREP_ENABLE_EEP),en,dis)able-eep \
73 --$(if $(CONFIG_IPV6),en,dis)able-ipv6 \
74 --enable-unicode \
75 --with-openssl \
76 --with$(if $(CONFIG_SNGREP_WITH_PCRE),,out)-pcre
77
78 define Package/sngrep/install
79 $(INSTALL_DIR) $(1)/etc
80 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sngreprc $(1)/etc
81 $(INSTALL_DIR) $(1)/usr/bin
82 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sngrep $(1)/usr/bin
83 endef
84
85 $(eval $(call BuildPackage,sngrep))