replace lots of manual install commands with INSTALL_* variables
[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 PATH="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH" \
43 )
44 endef
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 DESTDIR="$(PKG_INSTALL_DIR)" \
49 all install
50 endef
51
52 define Package/scdp/install
53 $(INSTALL_DIR) $(1)/usr/bin
54 $(CP) $(PKG_INSTALL_DIR)/usr/bin/scdp $(1)/usr/bin/
55 endef
56
57 $(eval $(call BuildPackage,scdp))