| 1 | # TBD: |
|---|
| 2 | |
|---|
| 3 | NAME = lsof |
|---|
| 4 | VERSION = 4.85 |
|---|
| 5 | CATEGORIES = utils |
|---|
| 6 | GARTYPE = v2 |
|---|
| 7 | |
|---|
| 8 | DESCRIPTION = List open files |
|---|
| 9 | define BLURB |
|---|
| 10 | Lsof is a Unix-specific diagnostic tool. Its name stands for LiSt Open Files, |
|---|
| 11 | and it does just that. It lists information about any files that are open by |
|---|
| 12 | processes currently running on the system. It can also list communications |
|---|
| 13 | open by each process. |
|---|
| 14 | endef |
|---|
| 15 | |
|---|
| 16 | MASTER_SITES = ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ |
|---|
| 17 | DISTNAME = $(NAME)_$(VERSION) |
|---|
| 18 | DISTFILES = $(DISTNAME).tar.bz2 |
|---|
| 19 | DISTFILES += lsof-license |
|---|
| 20 | |
|---|
| 21 | # Do not automatically use VxFS |
|---|
| 22 | PATCHFILES += 0002-Disable-VxFS-autodetect.patch |
|---|
| 23 | |
|---|
| 24 | SRCDIST = $(DISTNAME)_src |
|---|
| 25 | WORKSRC = $(WORKDIR)/$(DISTNAME)/$(SRCDIST) |
|---|
| 26 | |
|---|
| 27 | PACKAGING_PLATFORMS = solaris9-sparc solaris9-i386 |
|---|
| 28 | PACKAGING_PLATFORMS += solaris10-sparc solaris10-i386 |
|---|
| 29 | |
|---|
| 30 | VENDOR_URL = http://people.freebsd.org/~abe/ |
|---|
| 31 | LICENSE = lsof-license |
|---|
| 32 | |
|---|
| 33 | # Do not build a unified 32/64 bit package for Solaris 9 i386 |
|---|
| 34 | BUILD64-sparc-5.9 = 1 |
|---|
| 35 | BUILD64-sparc-5.10 = 1 |
|---|
| 36 | BUILD64-i386-5.10 = 1 |
|---|
| 37 | BUILD64 = $(BUILD64-$(GARCH)-$(GAROSREL)) |
|---|
| 38 | |
|---|
| 39 | EXTRA_BUILD_ISAS = sparcv8plus |
|---|
| 40 | |
|---|
| 41 | ISAEXEC = 1 |
|---|
| 42 | |
|---|
| 43 | CONFIGURE_SCRIPTS = custom |
|---|
| 44 | CONFIGURE_ARGS = -n solariscc |
|---|
| 45 | |
|---|
| 46 | # Environment variables affecting Solaris builds: |
|---|
| 47 | # SOLARIS_23P101318 If this environment variable has a non-NULL value, the |
|---|
| 48 | # SOLARIS_24P101945 If this environment variable has a non-NULL value, the |
|---|
| 49 | # SOLARIS_24P102303 If this environment variable has a non-NULL value, the |
|---|
| 50 | # SOLARIS_26PR_GWINDOWS If this environment variable has a value of "Y" or "y", |
|---|
| 51 | # SOLARIS_26PR_LDT If this environment variable has a value of "Y" or "y", |
|---|
| 52 | # SOLARIS_CCDIR specifies the path to the Sun C compiler -- i.e., when |
|---|
| 53 | # SOLARIS_INSTR specifies the Sun C compiler target instruction set |
|---|
| 54 | # SOLARIS_KERNBITS specifies the number of bits in the Solaris 7, 8, 9 or |
|---|
| 55 | # SOLARIS_VSOCK If this environment variable has a value of "Y" or "y", |
|---|
| 56 | # SOLARIS_VXFSINCL This environment variable defines the path to the |
|---|
| 57 | # SOLARIS_VXFSLIB This environment variable defines the path to the |
|---|
| 58 | |
|---|
| 59 | CONFIGURE_EXPORTS = LSOF_CFGF SOLARIS_CCDIR SOLARIS_INSTR SOLARIS_KERNBITS SOLARIS_VXFSINCL SOLARIS_VXFSLIB |
|---|
| 60 | SOLARIS_CCDIR = $(CC_HOME)/bin |
|---|
| 61 | SOLARIS_INSTR = $(ISA) |
|---|
| 62 | SOLARIS_KERNBITS = $(MEMORYMODEL) |
|---|
| 63 | |
|---|
| 64 | BUILD_DEP_PKGS += VRTSfssdk |
|---|
| 65 | |
|---|
| 66 | # The Veritas Filesystem library libvxfsutil.a is sparcv8+, make sure to build that |
|---|
| 67 | # specific ISA and not link when building sparcv8 |
|---|
| 68 | SOLARIS_VXFSINCL-sparcv8plus = /opt/VRTS/include |
|---|
| 69 | SOLARIS_VXFSINCL-sparcv9 = /opt/VRTS/include |
|---|
| 70 | SOLARIS_VXFSINCL-i386 = /opt/VRTS/include |
|---|
| 71 | SOLARIS_VXFSINCL-amd64 = /opt/VRTS/include |
|---|
| 72 | SOLARIS_VXFSLIB-sparcv8plus = /opt/VRTS/lib |
|---|
| 73 | SOLARIS_VXFSLIB-sparcv9 = /opt/VRTS/lib |
|---|
| 74 | SOLARIS_VXFSLIB-i386 = /opt/VRTS/lib |
|---|
| 75 | SOLARIS_VXFSLIB-amd64 = /opt/VRTS/lib |
|---|
| 76 | SOLARIS_VXFSINCL = $(SOLARIS_VXFSINCL-$(ISA)) |
|---|
| 77 | SOLARIS_VXFSLIB = $(SOLARIS_VXFSLIB-$(ISA)) |
|---|
| 78 | |
|---|
| 79 | TEST_SCRIPTS = custom |
|---|
| 80 | |
|---|
| 81 | # Tests require root |
|---|
| 82 | SKIPTEST ?= 1 |
|---|
| 83 | |
|---|
| 84 | INSTALL_SCRIPTS = custom |
|---|
| 85 | |
|---|
| 86 | BUILD_OVERRIDE_VARS = CDEF |
|---|
| 87 | BUILD_OVERRIDE_VAR_CDEF = $(CFLAGS) |
|---|
| 88 | |
|---|
| 89 | PROTOTYPE_MODIFIERS = lsof |
|---|
| 90 | PROTOTYPE_FILES_lsof = $(call baseisadirs,$(bindir),lsof) |
|---|
| 91 | PROTOTYPE_GROUP_lsof = sys |
|---|
| 92 | PROTOTYPE_PERMS_lsof = 2755 |
|---|
| 93 | |
|---|
| 94 | include gar/category.mk |
|---|
| 95 | |
|---|
| 96 | INSTALLISADIR ?= $(WORKROOTDIR)/install-$(MODULATION) |
|---|
| 97 | |
|---|
| 98 | post-extract-modulated: |
|---|
| 99 | @echo " ==> Extracting source distribution" |
|---|
| 100 | @$(if $(filter-out global,$(MODULATION)),( cd $(WORKDIR)/$(DISTNAME) ; tar xf $(SRCDIST).tar )) |
|---|
| 101 | @$(MAKECOOKIE) |
|---|
| 102 | |
|---|
| 103 | configure-custom: |
|---|
| 104 | @echo " ==> Configuring in $(WORKSRC)" |
|---|
| 105 | ( cd $(WORKSRC) ; $(CONFIGURE_ENV) ./Configure $(CONFIGURE_ARGS) ) |
|---|
| 106 | @$(MAKECOOKIE) |
|---|
| 107 | |
|---|
| 108 | test-custom: |
|---|
| 109 | @echo " ==> Testing in $(WORKSRC)/tests" |
|---|
| 110 | $(MAKE) -C $(WORKSRC)/tests |
|---|
| 111 | @$(MAKECOOKIE) |
|---|
| 112 | |
|---|
| 113 | install-custom: |
|---|
| 114 | @echo " ==> Installing $(NAME) $(VERSION) for $(MODULATION)" |
|---|
| 115 | echo DESTDIR: $(DESTDIR) |
|---|
| 116 | @( cd $(WORKSRC) ; \ |
|---|
| 117 | ginstall -d $(DESTDIR)$(bindir) ; \ |
|---|
| 118 | ginstall -m 755 lsof $(DESTDIR)$(bindir) ; \ |
|---|
| 119 | ginstall -d $(DESTDIR)$(mandir)/man8 ; \ |
|---|
| 120 | ginstall -m 444 lsof.8 $(DESTDIR)$(mandir)/man8 ) |
|---|
| 121 | @$(MAKECOOKIE) |
|---|