1 ################################################################################
5 ################################################################################
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
)
20 ifeq ($(BR2_LARGEFILE
),)
21 BR2_LSOF_CFLAGS
+= -U_FILE_OFFSET_BITS
23 ifeq ($(BR2_INET_IPV6
),)
24 BR2_LSOF_CFLAGS
+= -UHASIPv6
27 ifeq ($(BR2_USE_WCHAR
),)
28 define LSOF_CONFIGURE_WCHAR_FIXUPS
29 $(SED
) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \
34 ifeq ($(BR2_ENABLE_LOCALE
),)
35 define LSOF_CONFIGURE_LOCALE_FIXUPS
36 $(SED
) 's,^#define[[:space:]]*HASSETLOCALE.*,#undef HASSETLOCALE,' \
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
) -
48 define LSOF_CONFIGURE_CMDS
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
)
57 define LSOF_BUILD_CMDS
58 $(MAKE
) $(TARGET_CONFIGURE_OPTS
) DEBUG
="$(TARGET_CFLAGS) $(BR2_LSOF_CFLAGS)" -C
$(@D
)
61 define LSOF_INSTALL_TARGET_CMDS
62 $(INSTALL
) -D
-m
755 $(@D
)/lsof
$(TARGET_DIR
)/usr
/bin
/lsof
65 $(eval
$(generic-package
))