0796dc5acb45c70a2f304fa4edce1dd1077b8799
[openwrt/svn-archive/archive.git] / net / scdp / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=scdp
12 PKG_VERSION:=1.0b
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/scdp
17 PKG_MD5SUM:=7eafaf5a422e37d04715613993ed5d95
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/scdp
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libnet0
29 TITLE:=An utility to send CDP (Cisco Discovery Protocol) packets
30 DESCRIPTION:=\
31 This program sends CDP (Cisco Discovery Protocol) packets out on\\\
32 selected interfaces and tells the connected switch (cisco only)\\\
33 where the host is connected.
34 URL:=http://sourceforge.net/projects/scdp
35 endef
36
37 define Build/Configure
38 $(call Build/Configure/Default, \
39 , \
40 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \
41 LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib" \
42 )
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 DESTDIR=$(PKG_INSTALL_DIR) \
48 all install
49 endef
50
51 define Package/scdp/install
52 install -d -m0755 $(1)/usr/bin
53 $(CP) $(PKG_INSTALL_DIR)/usr/bin/scdp $(1)/usr/bin/
54 endef
55
56 $(eval $(call BuildPackage,scdp))