From: Florian Fainelli Date: Tue, 12 May 2009 10:06:43 +0000 (+0000) Subject: [package] add pcapsipdump and link it against uclibc++ preferably (#4969) X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=887e74cbc2b67b1474029ba6e3bda2cb4ba6c82b;hp=058c1a9ce438cd0f6a5146ab8ce7faac6953763e [package] add pcapsipdump and link it against uclibc++ preferably (#4969) SVN-Revision: 15795 --- diff --git a/net/pcapsipdump/Makefile b/net/pcapsipdump/Makefile new file mode 100644 index 0000000000..c2e3347495 --- /dev/null +++ b/net/pcapsipdump/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (C) 2009 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:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/psipdump +PKG_MD5SUM:=95ed26caf66237a654cae2cacdaa3386 + +include $(INCLUDE_DIR)/package.mk + +define Package/pcapsipdump + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpcap +uclibcxx + TITLE:=SIP sessions dumping tool + URL:=http://psipdump.sourceforge.net/ +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 + +define Build/Compile + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(PKG_BUILD_DIR) \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/uClibc++ -fno-builtin -fno-rtti -nostdinc++" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + LIBS="-lpcap -luClibc++" +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/net/pcapsipdump/patches/001-cross_compile.patch b/net/pcapsipdump/patches/001-cross_compile.patch new file mode 100644 index 0000000000..db4bead86e --- /dev/null +++ b/net/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