perl-path-tiny: bump to version 0.061
[buildroot-gz.git] / package / lsof / lsof.mk
blob0a1667ab5c642258c2d9d8625c90774c612f93c9
1 ################################################################################
3 # lsof
5 ################################################################################
7 LSOF_VERSION = 4.88
8 LSOF_SOURCE = lsof_$(LSOF_VERSION).tar.bz2
9 # Use http mirror since master ftp site access is very draconian
10 LSOF_SITE = http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof
11 LSOF_LICENSE = lsof license
12 # License is repeated in each file, this is a relatively small one.
13 # It is also defined in 00README, but that contains a lot of other cruft.
14 LSOF_LICENSE_FILES = dialects/linux/dproto.h
16 # Make certain full-blown lsof gets built after the busybox version (1.20+)
17 LSOF_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
19 BR2_LSOF_CFLAGS =
20 ifeq ($(BR2_LARGEFILE),)
21 BR2_LSOF_CFLAGS += -U_FILE_OFFSET_BITS
22 endif
23 ifeq ($(BR2_INET_IPV6),)
24 BR2_LSOF_CFLAGS += -UHASIPv6
25 endif
27 ifeq ($(BR2_USE_WCHAR),)
28 define LSOF_CONFIGURE_WCHAR_FIXUPS
29 $(SED) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \
30 $(@D)/machine.h
31 endef
32 endif
34 ifeq ($(BR2_ENABLE_LOCALE),)
35 define LSOF_CONFIGURE_LOCALE_FIXUPS
36 $(SED) 's,^#define[[:space:]]*HASSETLOCALE.*,#undef HASSETLOCALE,' \
37 $(@D)/machine.h
38 endef
39 endif
41 # The .tar.bz2 contains another .tar, which contains the source code.
42 define LSOF_EXTRACT_CMDS
43 $(call suitable-extractor,$(LSOF_SOURCE)) $(DL_DIR)/$(LSOF_SOURCE) | \
44 $(TAR) -O $(TAR_OPTIONS) - lsof_$(LSOF_VERSION)/lsof_$(LSOF_VERSION)_src.tar | \
45 $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(LSOF_DIR) $(TAR_OPTIONS) -
46 endef
48 define LSOF_CONFIGURE_CMDS
49 (cd $(@D) ; \
50 echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" \
51 LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \
52 LINUX_CLIB=-DGLIBCV=2 ./Configure linux)
53 $(LSOF_CONFIGURE_WCHAR_FIXUPS)
54 $(LSOF_CONFIGURE_LOCALE_FIXUPS)
55 endef
57 define LSOF_BUILD_CMDS
58 $(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" -C $(@D)
59 endef
61 define LSOF_INSTALL_TARGET_CMDS
62 $(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof
63 endef
65 $(eval $(generic-package))