lsof.mk 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ################################################################################
  2. #
  3. # lsof
  4. #
  5. ################################################################################
  6. LSOF_VERSION = 4.99.3
  7. LSOF_SITE = $(call github,lsof-org,lsof,$(LSOF_VERSION))
  8. LSOF_LICENSE = lsof license
  9. LSOF_LICENSE_FILES = COPYING
  10. LSOF_CPE_ID_VALID = YES
  11. ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
  12. LSOF_DEPENDENCIES += libtirpc
  13. endif
  14. ifeq ($(BR2_USE_WCHAR),)
  15. define LSOF_CONFIGURE_WCHAR_FIXUPS
  16. $(SED) 's,^#[[:space:]]*define HASWIDECHAR.*,#undef HASWIDECHAR,' \
  17. $(@D)/machine.h
  18. endef
  19. endif
  20. ifeq ($(BR2_ENABLE_LOCALE),)
  21. define LSOF_CONFIGURE_LOCALE_FIXUPS
  22. $(SED) 's,^#[[:space:]]*define HASSETLOCALE.*,#undef HASSETLOCALE,' \
  23. $(@D)/machine.h
  24. endef
  25. endif
  26. define LSOF_CONFIGURE_CMDS
  27. (cd $(@D) ; \
  28. echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" \
  29. LSOF_AR="$(TARGET_AR) cr" LSOF_CC="$(TARGET_CC)" \
  30. LSOF_INCLUDE="$(STAGING_DIR)/usr/include" \
  31. LINUX_CLIB=-DGLIBCV=2 LSOF_CFGL="$(TARGET_LDFLAGS)" \
  32. ./Configure linux)
  33. $(LSOF_CONFIGURE_WCHAR_FIXUPS)
  34. $(LSOF_CONFIGURE_LOCALE_FIXUPS)
  35. endef
  36. define LSOF_BUILD_CMDS
  37. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
  38. endef
  39. define LSOF_INSTALL_TARGET_CMDS
  40. $(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof
  41. endef
  42. $(eval $(generic-package))