summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-07-28 19:07:59 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-07-28 19:07:59 +0200
commitb8ddb947ffe969181957745cfbcd7dfa85e3d86b (patch)
tree5c7e74b9f16309fd87d41110c65825299d12eb8b
parent1b8fff1f57e80538623d46bba5ea2577b9c0f406 (diff)
add lsof package
-rw-r--r--package/lsof/Makefile37
-rw-r--r--package/lsof/patches/patch-Configure30
-rw-r--r--package/lsof/patches/patch-Configure.orig30
-rw-r--r--package/lsof/patches/patch-dialects_linux_machine_h10
4 files changed, 107 insertions, 0 deletions
diff --git a/package/lsof/Makefile b/package/lsof/Makefile
new file mode 100644
index 000000000..d0b5f292c
--- /dev/null
+++ b/package/lsof/Makefile
@@ -0,0 +1,37 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= lsof
+PKG_VERSION:= 4.83
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 243089ccf3672c64b33ec8c9ef2a2a48
+PKG_DESCR:= list open files
+PKG_SECTION:= misc
+PKG_URL:= http://people.freebsd.org/~abe/
+PKG_SITES:= ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
+
+DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.tar.gz
+WRKDIST= ${WRKDIR}/${PKG_NAME}_${PKG_VERSION}/${PKG_NAME}_${PKG_VERSION}_src
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,LSOF,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_PROG:= Configure
+CONFIG_STYLE:= minimal
+CONFIGURE_ARGS+= -n linux
+XAKE_FLAGS+= CC='${TARGET_CC}'
+INSTALL_STYLE:= manual
+
+post-extract:
+ (cd ${WRKDIR}/${PKG_NAME}_${PKG_VERSION}; \
+ tar xf ${PKG_NAME}_${PKG_VERSION}_src.tar)
+
+do-install:
+ $(INSTALL_DIR) $(IDIR_LSOF)/usr/sbin
+ $(INSTALL_BIN) $(WRKBUILD)/lsof \
+ $(IDIR_LSOF)/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/lsof/patches/patch-Configure b/package/lsof/patches/patch-Configure
new file mode 100644
index 000000000..a539da5d5
--- /dev/null
+++ b/package/lsof/patches/patch-Configure
@@ -0,0 +1,30 @@
+--- lsof_4.83_src.orig/Configure 2010-01-18 20:01:14.000000000 +0100
++++ lsof_4.83_src/Configure 2010-07-28 18:36:48.364508572 +0200
+@@ -2735,27 +2735,6 @@ return(0); }
+ then
+ LSOF_CFGF="$LSOF_CFGF -DHASIPv6"
+ fi # }
+-
+- # Test for SELinux support.
+-
+- LSOF_TMP1=0
+- if test "X$LINUX_HASSELINUX" = "X" # {
+- then
+- if test -r ${LSOF_INCLUDE}/selinux/selinux.h # {
+- then
+- LSOF_TMP1=1
+- fi # }
+- else
+- if test "X$LINUX_HASSELINUX" = "XY" -o "X$LINUX_HASSELINUX" = "Xy" # {
+- then
+- LSOF_TMP1=1
+- fi # }
+- fi # }
+- if test $LSOF_TMP1 -eq 1 # {
+- then
+- LSOF_CFGF="$LSOF_CFGF -DHASSELINUX"
+- LSOF_CFGL="$LSOF_CFGL -lselinux"
+- fi # }
+ LSOF_DIALECT_DIR="linux"
+ LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
+ ;;
diff --git a/package/lsof/patches/patch-Configure.orig b/package/lsof/patches/patch-Configure.orig
new file mode 100644
index 000000000..934d2f7fe
--- /dev/null
+++ b/package/lsof/patches/patch-Configure.orig
@@ -0,0 +1,30 @@
+--- lsof_4.83_src.orig/Configure 2010-01-18 20:01:14.000000000 +0100
++++ lsof_4.83_src/Configure 2010-07-28 15:37:18.304500970 +0200
+@@ -2735,27 +2735,6 @@ return(0); }
+ then
+ LSOF_CFGF="$LSOF_CFGF -DHASIPv6"
+ fi # }
+-
+- # Test for SELinux support.
+-
+- LSOF_TMP1=0
+- if test "X$LINUX_HASSELINUX" = "X" # {
+- then
+- if test -r ${LSOF_INCLUDE}/selinux/selinux.h # {
+- then
+- LSOF_TMP1=1
+- fi # }
+- else
+- if test "X$LINUX_HASSELINUX" = "XY" -o "X$LINUX_HASSELINUX" = "Xy" # {
+- then
+- LSOF_TMP1=1
+- fi # }
+- fi # }
+- if test $LSOF_TMP1 -eq 1 # {
+- then
+- LSOF_CFGF="$LSOF_CFGF -DHASSELINUX"
+- LSOF_CFGL="$LSOF_CFGL -lselinux"
+- fi # }
+ LSOF_DIALECT_DIR="linux"
+ LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
+ ;;
diff --git a/package/lsof/patches/patch-dialects_linux_machine_h b/package/lsof/patches/patch-dialects_linux_machine_h
new file mode 100644
index 000000000..76b08a670
--- /dev/null
+++ b/package/lsof/patches/patch-dialects_linux_machine_h
@@ -0,0 +1,10 @@
+--- lsof_4.83_src.orig/dialects/linux/machine.h 2008-10-21 18:17:26.000000000 +0200
++++ lsof_4.83_src/dialects/linux/machine.h 2010-07-28 18:39:34.252738199 +0200
+@@ -625,6 +625,6 @@
+ * zeromem is a macro that uses bzero or memset.
+ */
+
+-#define zeromem(a, l) bzero(a, l)
++#define zeromem(a, l) memset(a, 0, l)
+
+ #endif /* !defined(LSOF_MACHINE_H) */