summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-06-23 06:53:28 +0000
committerEric Andersen <andersen@codepoet.org>2006-06-23 06:53:28 +0000
commitf2a4704040f9268c02e46686f2ada8730b4b49cc (patch)
treecfa9a57952a304c721d522d4a4ff677c27086b3b /package
parent84e58ab9a6ce69302ced48ac8de8da6d87e70ded (diff)
downloadbuildroot-novena-f2a4704040f9268c02e46686f2ada8730b4b49cc.tar.gz
buildroot-novena-f2a4704040f9268c02e46686f2ada8730b4b49cc.zip
patch from John Gatewood Ham, add lsof
Diffstat (limited to 'package')
-rw-r--r--package/Config.in1
-rw-r--r--package/lsof/Config.in9
-rw-r--r--package/lsof/lsof.mk51
3 files changed, 61 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 093d583fa..46c9b3dfc 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -74,6 +74,7 @@ source "package/libusb/Config.in"
source "package/lighttpd/Config.in"
source "package/links/Config.in"
source "package/lrzsz/Config.in"
+source "package/lsof/Config.in"
source "package/ltp-testsuite/Config.in"
source "package/ltrace/Config.in"
source "package/ltt/Config.in"
diff --git a/package/lsof/Config.in b/package/lsof/Config.in
new file mode 100644
index 000000000..e158951cc
--- /dev/null
+++ b/package/lsof/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_LSOF
+ bool "lsof"
+ default n
+ help
+ lsof (LiSt Open Files)
+ The lsof tool lists information about files opened by
+ processes.
+
+ ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
diff --git a/package/lsof/lsof.mk b/package/lsof/lsof.mk
new file mode 100644
index 000000000..6d1cef3ba
--- /dev/null
+++ b/package/lsof/lsof.mk
@@ -0,0 +1,51 @@
+#############################################################
+#
+# lsof
+#
+#############################################################
+LSOF_SOURCE:=lsof_4.77.tar.bz2
+LSOF_SITE:=ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
+LSOF_CAT:=bzip2 -cd
+LSOF_DIR:=$(BUILD_DIR)/lsof_4.77
+LSOF_BINARY:=lsof
+LSOF_TARGET_BINARY:=bin/lsof
+
+$(DL_DIR)/$(LSOF_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LSOF_SITE)/$(LSOF_SOURCE)
+
+lsof-source: $(DL_DIR)/$(LSOF_SOURCE)
+
+lsof-unpacked: $(LSOF_DIR)/.unpacked
+
+$(LSOF_DIR)/.unpacked: $(DL_DIR)/$(LSOF_SOURCE)
+ $(LSOF_CAT) $(DL_DIR)/$(LSOF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ (cd $(LSOF_DIR);tar xf lsof_4.77_src.tar;rm -f lsof_4.77_src.tar)
+ touch $(LSOF_DIR)/.unpacked
+
+$(LSOF_DIR)/.configured: $(LSOF_DIR)/.unpacked
+ (cd $(LSOF_DIR)/lsof_4.77_src; echo n | CC="$(CC)" CFLAGS="$(CFLAGS)" ./Configure linux)
+ touch $(LSOF_DIR)/.configured
+
+$(LSOF_DIR)/lsof_4.77_src/$(LSOF_BINARY): $(LSOF_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(LSOF_DIR)/lsof_4.77_src
+
+$(TARGET_DIR)/$(LSOF_TARGET_BINARY): $(LSOF_DIR)/lsof_4.77_src/$(LSOF_BINARY)
+ cp -a $(LSOF_DIR)/lsof_4.77_src/$(LSOF_BINARY) $(TARGET_DIR)/$(LSOF_TARGET_BINARY)
+
+lsof: uclibc $(TARGET_DIR)/$(LSOF_TARGET_BINARY)
+
+lsof-clean:
+ -rm -f $(TARGET_DIR)/$(LSOF_TARGET_BINARY)
+ -$(MAKE) -C $(LSOF_DIR)/lsof_4.77_src clean
+
+lsof-dirclean:
+ rm -rf $(LSOF_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LSOF)),y)
+TARGETS+=lsof
+endif