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