python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / lsof / lsof.mk
blobe5cd4bce6eba50e4bba2a45f3734af6a55c24d90
1 ################################################################################
3 # lsof
5 ################################################################################
7 LSOF_VERSION = 4.89
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 ifeq ($(BR2_USE_WCHAR),)
20 define LSOF_CONFIGURE_WCHAR_FIXUPS
21 $(SED) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \
22 $(@D)/machine.h
23 endef
24 endif
26 ifeq ($(BR2_ENABLE_LOCALE),)
27 define LSOF_CONFIGURE_LOCALE_FIXUPS
28 $(SED) 's,^#define[[:space:]]*HASSETLOCALE.*,#undef HASSETLOCALE,' \
29 $(@D)/machine.h
30 endef
31 endif
33 # The .tar.bz2 contains another .tar, which contains the source code.
34 define LSOF_EXTRACT_CMDS
35 $(call suitable-extractor,$(LSOF_SOURCE)) $(DL_DIR)/$(LSOF_SOURCE) | \
36 $(TAR) -O $(TAR_OPTIONS) - lsof_$(LSOF_VERSION)/lsof_$(LSOF_VERSION)_src.tar | \
37 $(TAR) --strip-components=1 -C $(LSOF_DIR) $(TAR_OPTIONS) -
38 endef
40 define LSOF_CONFIGURE_CMDS
41 (cd $(@D) ; \
42 echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" \
43 LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \
44 LINUX_CLIB=-DGLIBCV=2 ./Configure linux)
45 $(LSOF_CONFIGURE_WCHAR_FIXUPS)
46 $(LSOF_CONFIGURE_LOCALE_FIXUPS)
47 endef
49 define LSOF_BUILD_CMDS
50 $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" -C $(@D)
51 endef
53 define LSOF_INSTALL_TARGET_CMDS
54 $(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof
55 endef
57 $(eval $(generic-package))