From d635c96fae139ae555289b7f4d96231f8b2cff01 Mon Sep 17 00:00:00 2001 From: Jiri Slachta Date: Thu, 4 Apr 2013 18:13:27 +0200 Subject: [PATCH] Add pcapsipdump package. Signed-off-by: Jiri Slachta --- pcapsipdump/Makefile | 50 +++++++++++++++++++ pcapsipdump/patches/001-cross_compile.patch | 16 ++++++ .../patches/002-elif_else_replacement.patch | 12 +++++ 3 files changed, 78 insertions(+) create mode 100644 pcapsipdump/Makefile create mode 100644 pcapsipdump/patches/001-cross_compile.patch create mode 100644 pcapsipdump/patches/002-elif_else_replacement.patch diff --git a/pcapsipdump/Makefile b/pcapsipdump/Makefile new file mode 100644 index 0000000..ad07746 --- /dev/null +++ b/pcapsipdump/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pcapsipdump +PKG_VERSION:=0.1.4 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/psipdump +PKG_MD5SUM:=95ed26caf66237a654cae2cacdaa3386 + +include $(INCLUDE_DIR)/uclibc++.mk +include $(INCLUDE_DIR)/package.mk + +define Package/pcapsipdump + SECTION:=net + CATEGORY:=Network + SUBMENU:=Telephony + DEPENDS:=+libpcap $(CXX_DEPENDS) + TITLE:=SIP sessions dumping tool + URL:=http://sourceforge.net/projects/pcapsipdump/ +endef + +define Package/pcapsipdump/description + pcapsipdump is a tool for dumping SIP sessions (+RTP traffic, if available) to disk in a + fashion similar to "tcpdump -w" (format is exactly the same), but one file per sip session + (even if there is thousands of concurrect SIP sessions). +endef + +TARGET_CC=$(TARGET_CXX) + +define Build/Compile + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ + CPPFLAGS="$(TARGET_CXXFLAGS) -fno-rtti" \ + LIBS="-lpcap" +endef + +define Package/pcapsipdump/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/pcapsipdump $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,pcapsipdump)) diff --git a/pcapsipdump/patches/001-cross_compile.patch b/pcapsipdump/patches/001-cross_compile.patch new file mode 100644 index 0000000..db4bead --- /dev/null +++ b/pcapsipdump/patches/001-cross_compile.patch @@ -0,0 +1,16 @@ +diff -urN pcapsipdump-0.1.4/Makefile pcapsipdump-0.1.4.new/Makefile +--- pcapsipdump-0.1.4/Makefile 2007-02-09 12:33:48.000000000 +0100 ++++ pcapsipdump-0.1.4.new/Makefile 2009-05-12 12:01:02.000000000 +0200 +@@ -1,10 +1,10 @@ + all: pcapsipdump + + pcapsipdump: pcapsipdump.cpp calltable.cpp calltable.h +- $(CC) $(CPPFLAGS) $(LDFLAGS) pcapsipdump.cpp calltable.cpp -o pcapsipdump -lpcap -lstdc++ ++ $(CC) $(CPPFLAGS) $(LDFLAGS) pcapsipdump.cpp calltable.cpp -o pcapsipdump $(LIBS) + + pcapsipdump-debug: pcapsipdump.cpp calltable.cpp calltable.h +- $(CC) $(CPPFLAGS) $(LDFLAGS) -ggdb pcapsipdump.cpp calltable.cpp -o pcapsipdump-debug -lpcap -lstdc++ ++ $(CC) $(CPPFLAGS) $(LDFLAGS) -ggdb pcapsipdump.cpp calltable.cpp -o pcapsipdump-debug $(LIBS) + + clean: + rm -f pcapsipdump diff --git a/pcapsipdump/patches/002-elif_else_replacement.patch b/pcapsipdump/patches/002-elif_else_replacement.patch new file mode 100644 index 0000000..bb217b7 --- /dev/null +++ b/pcapsipdump/patches/002-elif_else_replacement.patch @@ -0,0 +1,12 @@ +diff -urN pcapsipdump-0.1.4/pcapsipdump.h pcapsipdump-0.1.4.new/pcapsipdump.h +--- pcapsipdump-0.1.4/pcapsipdump.h 2007-05-11 20:40:49.000000000 +0200 ++++ pcapsipdump-0.1.4.new/pcapsipdump.h 2010-03-29 09:52:20.000000000 +0200 +@@ -35,7 +35,7 @@ + #elif defined (__BIG_ENDIAN) + uint8_t version:4, + ihl:4; +-#elif ++#else + #error Endian not defined + #endif + uint8_t tos; -- 2.30.2