The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / lsof / lsof.mk
1 ################################################################################
2 #
3 # lsof
4 #
5 ################################################################################
6
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
15
16 # Make certain full-blown lsof gets built after the busybox version (1.20+)
17 LSOF_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox)
18
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
25
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
32
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) $(TAR_STRIP_COMPONENTS)=1 -C $(LSOF_DIR) $(TAR_OPTIONS) -
38 endef
39
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
48
49 define LSOF_BUILD_CMDS
50         $(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" -C $(@D)
51 endef
52
53 define LSOF_INSTALL_TARGET_CMDS
54         $(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof
55 endef
56
57 $(eval $(generic-package))