• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/lsof/lsof.mk
Gustavo ZacariasGustavo Zacarias committed 152e98ccab014 Oct 2016
Raw file
Source viewDiff to previous
 
1
################################################################################
2
#
3
# lsof
4
#
5
################################################################################
6
​
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
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) --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
    $(TARGET_MAKE_ENV) $(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))
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.