2007-04-10 10:20:35 +00:00
|
|
|
#
|
2010-03-24 04:49:34 +00:00
|
|
|
# Copyright (C) 2007-2010 OpenWrt.org
|
2007-04-10 10:20:35 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
2009-02-03 02:46:31 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2007-04-10 10:20:35 +00:00
|
|
|
|
|
|
|
PKG_NAME:=lsof
|
2009-04-04 18:37:49 +00:00
|
|
|
PKG_VERSION:=4.81
|
2011-02-14 18:26:25 +00:00
|
|
|
PKG_RELEASE:=2
|
2007-04-10 10:20:35 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).dfsg.1.orig.tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://ftp2.de.debian.org/debian/pool/main/l/lsof
|
2009-04-04 18:37:49 +00:00
|
|
|
PKG_MD5SUM:=138b628cb1b6a3b16b32b792f77abcce
|
2007-04-10 10:20:35 +00:00
|
|
|
|
2009-04-04 18:37:49 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).dfsg.1
|
2007-04-10 10:20:35 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2011-02-14 18:26:25 +00:00
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
|
|
|
TARGET_LDFLAGS += $(LIBRPC)
|
|
|
|
|
2007-04-10 10:20:35 +00:00
|
|
|
define Package/lsof
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
2011-03-03 01:47:47 +00:00
|
|
|
DEPENDS:=$(LIBRPC_DEPENDS)
|
2007-04-10 10:20:35 +00:00
|
|
|
TITLE:=LiSt Open Files - a diagnostic tool
|
2010-03-24 04:49:34 +00:00
|
|
|
URL:=http://people.freebsd.org/~abe/
|
2007-04-10 10:20:35 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
|
|
|
cd $(PKG_BUILD_DIR); \
|
2011-02-20 16:04:02 +00:00
|
|
|
LINUX_CLIB="-DGLIBCV=2" \
|
|
|
|
LSOF_CC="$(TARGET_CC)" \
|
|
|
|
LSOF_VSTR="$(LINUX_VERSION)" \
|
2009-02-03 02:46:31 +00:00
|
|
|
./Configure -n linux
|
2007-04-10 10:20:35 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2009-02-03 02:46:31 +00:00
|
|
|
CC="$(TARGET_CC)" \
|
2011-02-20 16:04:02 +00:00
|
|
|
AR="$(TARGET_CROSS)ar cr" \
|
|
|
|
RANLIB="$(TARGET_CROSS)ranlib" \
|
2009-02-03 02:46:31 +00:00
|
|
|
DEBUG="$(TARGET_CFLAGS)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)"
|
2007-04-10 10:20:35 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/lsof/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lsof $(1)/usr/bin
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,lsof))
|