gpsd: Install all libraries
[openwrt/svn-archive/archive.git] / net / arpwatch / Makefile
index 1b2ca34423cff0dbff252a26c29f374d3b525439..fe981fef5a5f021a56bd92217e119a9ba701c59a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,15 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=arpwatch
 PKG_VERSION:=2.1a15
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.free.fr/.mirrors1/ftp.gentoo.org/distfiles/
 PKG_MD5SUM:=cebfeb99c4a7c2a6cee2564770415fe7
 
+# use a subdirectory to prevent configure for finding libpcap build dir
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/arpwatch
@@ -43,8 +46,8 @@ define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                ARPDIR=/etc/arpwatch \
                CCOPT="$(TARGET_CFLAGS)" \
-               INCLS="-I. -I$(STAGING_DIR)/usr/include" \
-               LIBS="-L$(STAGING_DIR)/usr/lib -lpcap"
+               INCLS="-I. $(TARGET_CPPFLAGS)" \
+               LIBS="$(TARGET_LDFLAGS) -lpcap"
 endef
 
 define Package/arpwatch/install
@@ -52,6 +55,8 @@ define Package/arpwatch/install
        $(CP) $(PKG_BUILD_DIR)/arp.dat $(1)/etc/arpwatch/
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/arp{watch,snmp} $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/arpwatch.init $(1)/etc/init.d/arpwatch
 endef
 
 $(eval $(call BuildPackage,arpwatch))