#
-# Copyright (C) 2007-2015 OpenWrt.org
-#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=lsof
-PKG_VERSION:=4.94.0
+PKG_VERSION:=4.99.0
PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).linux.tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/lsof-org/lsof/releases/download/$(PKG_VERSION)
-PKG_HASH:=c41709c2543ecf9de1e950795790a9786a2f225e51c3cc53d6a9a256f872472b
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION).linux
+PKG_HASH:=180e6284aff184d94d273e34f7264edc2af849c07b1c5d6a4183d4d402734245
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
PKG_LICENSE:=Unique
-PKG_LICENSE_FILES:=00README
+PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
URL:=http://people.freebsd.org/~abe/
endef
-ifneq ($(CONFIG_IPV6),n)
- LINUX_CLIB_IPV6=-DHASIPv6
-else
- LINUX_CLIB_IPV6=
-endif
-
-TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
-TARGET_LDFLAGS += -ltirpc
-
-define Build/Configure
- $(SED) 's/rpc\/rpc/\/tirpc\/rpc\/rpc/g' $(PKG_BUILD_DIR)/Configure
- cd $(PKG_BUILD_DIR); \
- LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \
- LSOF_CC="$(TARGET_CC)" \
- LSOF_VSTR="$(LINUX_VERSION)" \
- LSOF_CFGF="$(TARGET_CFLAGS)" \
- LSOF_CFGL="$(TARGET_LDFLAGS)" \
- LSOF_AR="$(TARGET_CROSS)ar cr" \
- LSOF_RANLIB="$(TARGET_CROSS)ranlib" \
- LSOF_INCLUDE="$(STAGING_DIR)/usr/include" \
- ./Configure -n linux
-endef
-
-define Build/Compile
- LSOF_HOST="none" \
- LSOF_LOGNAME="none" \
- LSOF_SYSINFO="none" \
- LSOF_USER="none" \
- $(MAKE) -C $(PKG_BUILD_DIR)
-endef
+CONFIGURE_ARGS += --without-selinux
define Package/lsof/install
$(INSTALL_DIR) $(1)/usr/bin
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -208,13 +208,8 @@ EXTRA_DIST += 00.README.FIRST 00CREDITS
+ # Testing
+ EXTRA_DIST += tests/00README tests/TestDB tests/CkTestDB tests/Makefile tests/LsofTest.h check.bash
+
+-# Manpages
+-lsof.man: Lsof.8 version 00DIALECTS
+- soelim < Lsof.8 > $@
+-man8_MANS = lsof.man
+-EXTRA_DIST += Lsof.8
+ # Fix distcheck error
+ clean-local:
+ rm -rf lsof.man
+ distclean-local:
+- rm -rf lockf_owner.h lockf.h
+\ No newline at end of file
++ rm -rf lockf_owner.h lockf.h
+++ /dev/null
---- a/print.c
-+++ b/print.c
-@@ -160,6 +160,7 @@ endnm(sz)
- static void
- fill_portmap()
- {
-+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_RPC__)
- char buf[128], *cp, *nm;
- CLIENT *c;
- int h, port, pr;
-@@ -278,6 +279,7 @@ fill_portmap()
- Pth[pr][h] = pt;
- }
- clnt_destroy(c);
-+#endif
- }
- #endif /* !defined(HASNORPC_H) */
-