fe981fef5a5f021a56bd92217e119a9ba701c59a
[openwrt/svn-archive/archive.git] / net / arpwatch / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=arpwatch
11 PKG_VERSION:=2.1a15
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=ftp://ftp.free.fr/.mirrors1/ftp.gentoo.org/distfiles/
16 PKG_MD5SUM:=cebfeb99c4a7c2a6cee2564770415fe7
17
18 # use a subdirectory to prevent configure for finding libpcap build dir
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/arpwatch
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+libpcap
27 TITLE:=Ethernet station activity monitor
28 URL:=http://www-nrg.ee.lbl.gov/
29 endef
30
31 define Package/arpwatch/description
32 Ethernet monitor program for keeping track of ethernet/ip address
33 pairings.
34 endef
35
36 define Package/arpwatch/conffiles
37 /etc/arpwatch/arp.dat
38 endef
39
40 define Build/Prepare
41 $(call Build/Prepare/Default)
42 chmod -R u+w $(PKG_BUILD_DIR)
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) \
47 ARPDIR=/etc/arpwatch \
48 CCOPT="$(TARGET_CFLAGS)" \
49 INCLS="-I. $(TARGET_CPPFLAGS)" \
50 LIBS="$(TARGET_LDFLAGS) -lpcap"
51 endef
52
53 define Package/arpwatch/install
54 $(INSTALL_DIR) $(1)/etc/arpwatch
55 $(CP) $(PKG_BUILD_DIR)/arp.dat $(1)/etc/arpwatch/
56 $(INSTALL_DIR) $(1)/usr/sbin
57 $(INSTALL_BIN) $(PKG_BUILD_DIR)/arp{watch,snmp} $(1)/usr/sbin/
58 $(INSTALL_DIR) $(1)/etc/init.d
59 $(INSTALL_BIN) ./files/arpwatch.init $(1)/etc/init.d/arpwatch
60 endef
61
62 $(eval $(call BuildPackage,arpwatch))