Skip to content

Instantly share code, notes, and snippets.

@mshroyer
Created August 16, 2011 14:56
Show Gist options
  • Save mshroyer/1149290 to your computer and use it in GitHub Desktop.
Save mshroyer/1149290 to your computer and use it in GitHub Desktop.
tcpdump makefile for OpenWrt
include $(TOPDIR)/rules.mk
PKG_NAME:=tcpdump
PKG_VERSION:=4.1.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
PKG_MD5SUM:=d0dd58bbd6cd36795e05c6f1f74420b0
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
define Package/tcpdump
$(call Package/tcpdump/Default)
DEPENDS:=+libpcap
SECTION:=net
CATEGORY:=Network
TITLE:=Network traffic capture utility
MAINTAINER:=Mark Shroyer <[email protected]>
URL:=http://www.tcpdump.org/
MENU:=1
endef
define Package/tcpdump/description
This is tcpdump of course...
endef
TARGET_CFLAGS += \
-ffunction-sections \
-fdata-sections
CONFIGURE_VARS += \
ac_cv_linux_vers=$(LINUX_VERSION)
CONFIGURE_ARGS += \
--disable-ipv6
MAKE_FLAGS += \
CCOPT="$(TARGET_CFLAGS)"
define Build/Configure
$(call Build/Configure/Default)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/tcpdump $(1)/usr/bin/
endef
define Package/tcpdump/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/tcpdump $(1)/usr/bin/
endef
$(eval $(call BuildPackage,tcpdump))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment