You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2007-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=lsof
  10. PKG_VERSION:=4.86
  11. PKG_RELEASE:=3
  12. PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)+dfsg.orig.tar.gz
  13. PKG_SOURCE_URL:=http://ftp2.de.debian.org/debian/pool/main/l/lsof
  14. PKG_MD5SUM:=23420509564a897b76055f9d84d19068
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)+dfsg.orig
  16. PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
  17. PKG_LICENSE:=Unique
  18. PKG_LICENSE_FILES:=00README
  19. include $(INCLUDE_DIR)/package.mk
  20. TARGET_LDFLAGS += $(LIBRPC)
  21. define Package/lsof
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. DEPENDS:=$(LIBRPC_DEPENDS)
  25. TITLE:=LiSt Open Files - a diagnostic tool
  26. URL:=http://people.freebsd.org/~abe/
  27. endef
  28. ifeq ($(CONFIG_IPV6),y)
  29. LINUX_CLIB_IPV6="-DHASIPv6"
  30. else
  31. LINUX_CLIB_IPV6=
  32. endif
  33. define Build/Configure
  34. cd $(PKG_BUILD_DIR); \
  35. LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \
  36. LSOF_CC="$(TARGET_CC)" \
  37. LSOF_INCLUDE="-I$(STAGING_DIR)/usr/include" \
  38. LSOF_VSTR="$(LINUX_VERSION)" \
  39. LSOF_CFGF="$(TARGET_CFLAGS)" \
  40. LSOF_CFGL="$(TARGET_LDFLAGS)" \
  41. LSOF_AR="$(TARGET_CROSS)ar cr" \
  42. LSOF_RANLIB="$(TARGET_CROSS)ranlib" \
  43. ./Configure -n linux
  44. endef
  45. define Build/Compile
  46. $(MAKE) -C $(PKG_BUILD_DIR)
  47. endef
  48. define Package/lsof/install
  49. $(INSTALL_DIR) $(1)/usr/bin
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsof $(1)/usr/bin
  51. endef
  52. $(eval $(call BuildPackage,lsof))