2006-06-23 08:53:28 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# lsof
|
|
|
|
#
|
|
|
|
#############################################################
|
2011-10-07 17:25:21 +02:00
|
|
|
|
|
|
|
LSOF_VERSION = 4.85
|
2010-12-12 22:53:53 +01:00
|
|
|
LSOF_SOURCE = lsof_$(LSOF_VERSION).tar.bz2
|
|
|
|
LSOF_SITE = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
BR2_LSOF_CFLAGS =
|
2006-11-29 13:59:56 +01:00
|
|
|
ifeq ($(BR2_LARGEFILE),)
|
2010-12-12 22:53:53 +01:00
|
|
|
BR2_LSOF_CFLAGS += -U_FILE_OFFSET_BITS
|
2006-11-29 13:59:56 +01:00
|
|
|
endif
|
2007-06-26 19:45:08 +02:00
|
|
|
ifeq ($(BR2_INET_IPV6),)
|
2010-12-12 22:53:53 +01:00
|
|
|
BR2_LSOF_CFLAGS += -UHASIPv6
|
2006-11-29 13:59:56 +01:00
|
|
|
endif
|
|
|
|
|
2009-01-18 15:22:30 +01:00
|
|
|
ifeq ($(BR2_USE_WCHAR),)
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_CONFIGURE_WCHAR_FIXUPS
|
|
|
|
$(SED) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \
|
2010-12-27 15:49:00 +01:00
|
|
|
$(@D)/machine.h
|
2010-12-12 22:53:53 +01:00
|
|
|
$(SED) 's,^#define[[:space:]]*WIDECHARINCL.*,,' \
|
2010-12-27 15:49:00 +01:00
|
|
|
$(@D)/machine.h
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
2006-12-14 00:08:48 +01:00
|
|
|
endif
|
2010-12-12 22:53:53 +01:00
|
|
|
|
2009-01-18 15:22:30 +01:00
|
|
|
ifeq ($(BR2_ENABLE_LOCALE),)
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_CONFIGURE_LOCALE_FIXUPS
|
|
|
|
$(SED) 's,^#define[[:space:]]*HASSETLOCALE.*,#undef HASSETLOCALE,' \
|
2010-12-27 15:49:00 +01:00
|
|
|
$(@D)/machine.h
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
2006-12-14 00:08:48 +01:00
|
|
|
endif
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
# The .tar.bz2 contains another .tar, which contains the source code.
|
2011-10-21 00:05:23 +02:00
|
|
|
define LSOF_EXTRACT_CMDS
|
|
|
|
$(INFLATE.bz2) $(DL_DIR)/$(LSOF_SOURCE) | \
|
|
|
|
$(TAR) -O $(TAR_OPTIONS) - lsof_$(LSOF_VERSION)/lsof_$(LSOF_VERSION)_src.tar | \
|
|
|
|
$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LSOF_DIR) $(TAR_OPTIONS) -
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_CONFIGURE_CMDS
|
|
|
|
(cd $(@D) ; \
|
|
|
|
echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" \
|
|
|
|
LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 ./Configure linux)
|
|
|
|
$(LSOF_CONFIGURE_WCHAR_FIXUPS)
|
|
|
|
$(LSOF_CONFIGURE_LOCALE_FIXUPS)
|
|
|
|
endef
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_BUILD_CMDS
|
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" -C $(@D)
|
|
|
|
endef
|
2006-06-23 08:53:28 +02:00
|
|
|
|
2010-12-12 22:53:53 +01:00
|
|
|
define LSOF_INSTALL_TARGET_CMDS
|
|
|
|
install -D -m 755 $(@D)/lsof $(TARGET_DIR)/bin/lsof
|
|
|
|
endef
|
|
|
|
|
|
|
|
define LSOF_UNINSTALL_TARGET_CMDS
|
|
|
|
rm -f $(TARGET_DIR)/bin/lsof
|
|
|
|
endef
|
|
|
|
|
|
|
|
define LSOF_CLEAN_CMDS
|
2010-12-27 15:49:00 +01:00
|
|
|
-$(MAKE) -C $(@D) clean
|
2010-12-12 22:53:53 +01:00
|
|
|
endef
|
|
|
|
|
2011-09-29 21:57:42 +02:00
|
|
|
$(eval $(call GENTARGETS))
|