[package] add cdp tools (#5190)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16138 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a947d4d700
commit
5681b9d7e3
52
net/cdp/Makefile
Normal file
52
net/cdp/Makefile
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#
|
||||||
|
# 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:=cdp-tools
|
||||||
|
PKG_VERSION:=20070302
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=cdp-tools.tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://gpl.internetconnection.net/files/
|
||||||
|
PKG_MD5SUM:=94e3a355a5c82a2a5b14114d1f9b0599
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=+libpcap +libnet1
|
||||||
|
|
||||||
|
|
||||||
|
define Package/cdp-tools
|
||||||
|
SECTION:=net
|
||||||
|
CATEGORY:=Network
|
||||||
|
TITLE:=CDP tools (CISCO)
|
||||||
|
URL:=http://gpl.internetconnection.net
|
||||||
|
DEPENDS:=+libpcap
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/dhcpcd/description
|
||||||
|
Tools to work with the Cisco Discovery Protocol (CDP)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/pcap -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include" \
|
||||||
|
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib" \
|
||||||
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
|
all
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Package/cdp-tools/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/{cdp-send,cdp-listen,cdp-routemgr} $(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,cdp-tools))
|
13
net/cdp/patches/001-compile_fixes.patch
Normal file
13
net/cdp/patches/001-compile_fixes.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- a/Makefile.orig 2006-10-26 20:58:35.000000000 +0300
|
||||||
|
+++ b/Makefile 2009-05-22 18:20:44.000000000 +0300
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
-CFLAGS += $(shell libnet-config --cflags --defines)
|
||||||
|
-all: cdp-listen cdp-send
|
||||||
|
+all: cdp-send cdp-listen
|
||||||
|
|
||||||
|
-cdp-listen: cdp-listen.o -lpcap
|
||||||
|
-cdp-send: cdp-send.o $(shell libnet-config --libs)
|
||||||
|
+cdp-listen: cdp-listen.o $(STAGING_DIR)/usr/lib/libpcap.so
|
||||||
|
+cdp-send: cdp-send.o $(STAGING_DIR)/usr/lib/libnet-1.1.x/lib/libnet.a
|
||||||
|
|
||||||
|
clean:; rm -f cdp-send.o cdp-send cdp-listen.o cdp-listen
|
Loading…
x
Reference in New Issue
Block a user