rtpproxy: use return in init script
[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.6.0
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:=fd80964d6560f2ff57b4f5bef2353d1a6f7c48d2f1a5f0a167c854bd2e801999
22
23 PKG_RELEASE:=1
24
25 PKG_FIXUP:=autoreconf
26 PKG_BUILD_PARALLEL:=1
27 PKG_INSTALL:=1
28
29 PKG_CONFIG_DEPENDS:= \
30 CONFIG_IPV6 \
31 CONFIG_SNGREP_ENABLE_EEP \
32 CONFIG_SNGREP_WITH_PCRE \
33 CONFIG_SNGREP_WITH_ZLIB
34
35 include $(INCLUDE_DIR)/package.mk
36
37 define Package/sngrep
38 SECTION:=utils
39 CATEGORY:=Utilities
40 SUBMENU:=Telephony
41 DEPENDS:= \
42 +libncursesw \
43 +libopenssl \
44 +libpcap \
45 +SNGREP_WITH_PCRE:libpcre2 \
46 +SNGREP_WITH_ZLIB:zlib
47 TITLE:=Ncurses SIP messages flow viewer
48 URL:=https://github.com/irontec/sngrep
49 endef
50
51 define Package/sngrep/description
52 sngrep is a tool for displaying SIP calls message flows from terminal.
53
54 It supports live capture to display realtime SIP packets and can also be
55 used as PCAP viewer.
56 endef
57
58 define Package/sngrep/conffiles
59 /etc/sngreprc
60 endef
61
62 define Package/sngrep/config
63 menu "sngrep configuration"
64 depends on PACKAGE_sngrep
65
66 config SNGREP_ENABLE_EEP
67 bool "EEP/HEP support"
68 default y
69 help
70 Enable EEP/HEP support
71
72 config SNGREP_WITH_PCRE
73 bool "PCRE support"
74 default y
75 help
76 Enable Perl compatible regular expressions
77
78 config SNGREP_WITH_ZLIB
79 bool "zlib support"
80 default y
81 help
82 Add support for opening gzip compressed input files
83 endmenu
84 endef
85
86 CONFIGURE_ARGS += \
87 --$(if $(CONFIG_SNGREP_ENABLE_EEP),en,dis)able-eep \
88 --$(if $(CONFIG_IPV6),en,dis)able-ipv6 \
89 --enable-unicode \
90 --with-openssl \
91 --without-pcre \
92 --with$(if $(CONFIG_SNGREP_WITH_PCRE),,out)-pcre2 \
93 --with$(if $(CONFIG_SNGREP_WITH_ZLIB),,out)-zlib
94
95 define Package/sngrep/install
96 $(INSTALL_DIR) $(1)/etc
97 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sngreprc $(1)/etc
98 $(INSTALL_DIR) $(1)/usr/bin
99 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sngrep $(1)/usr/bin
100 endef
101
102 $(eval $(call BuildPackage,sngrep))