]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
tree: New package.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Jun 2013 10:27:53 +0000 (12:27 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Jun 2013 10:27:53 +0000 (12:27 +0200)
tree/patches/tree-args.patch [new file with mode: 0644]
tree/patches/tree-no-color-by-default.patch [new file with mode: 0644]
tree/patches/tree-no-strip.patch [new file with mode: 0644]
tree/patches/tree-preserve-timestamps.patch [new file with mode: 0644]
tree/tree.nm [new file with mode: 0644]

diff --git a/tree/patches/tree-args.patch b/tree/patches/tree-args.patch
new file mode 100644 (file)
index 0000000..5fa5dd2
--- /dev/null
@@ -0,0 +1,12 @@
+diff -up tree-1.6.0/tree.c.args tree-1.6.0/tree.c
+--- tree-1.6.0/tree.c.args     2013-04-11 11:53:47.676572649 +0100
++++ tree-1.6.0/tree.c  2013-04-11 11:56:10.962350448 +0100
+@@ -536,6 +536,8 @@ void usage(int n)
+       "  --filelimit # Do not descend dirs with more than # files in them.\n"
+       "  --timefmt <f> Print and format time according to the format <f>.\n"
+       "  -o filename   Output to file instead of stdout.\n"
++      "  --du          Print directory sizes.\n"
++      "  --prune       Prune empty directories from the output.\n"
+       "  -------- File options ---------\n"
+       "  -q            Print non-printable characters as '?'.\n"
+       "  -N            Print non-printable characters as is.\n"
diff --git a/tree/patches/tree-no-color-by-default.patch b/tree/patches/tree-no-color-by-default.patch
new file mode 100644 (file)
index 0000000..374add4
--- /dev/null
@@ -0,0 +1,13 @@
+diff -up tree-1.6.0/tree.c.no-color-by-default tree-1.6.0/tree.c
+--- tree-1.6.0/tree.c.no-color-by-default      2011-06-27 16:14:14.190548385 +0100
++++ tree-1.6.0/tree.c  2011-06-27 16:14:27.257295243 +0100
+@@ -79,7 +79,8 @@ int main(int argc, char **argv)
+   q = p = dtotal = ftotal = 0;
+   aflag = dflag = fflag = lflag = pflag = sflag = Fflag = uflag = gflag = FALSE;
+   Dflag = qflag = Nflag = Qflag = Rflag = hflag = Hflag = siflag = cflag = FALSE;
+-  noindent = force_color = nocolor = xdev = noreport = nolinks = FALSE;
++  noindent = force_color = xdev = noreport = nolinks = FALSE;
++  nocolor = TRUE;
+   dirsfirst = nosort = inodeflag = devflag = Xflag = FALSE;
+   duflag = pruneflag = FALSE;
+   flimit = 0;
diff --git a/tree/patches/tree-no-strip.patch b/tree/patches/tree-no-strip.patch
new file mode 100644 (file)
index 0000000..5f46ada
--- /dev/null
@@ -0,0 +1,21 @@
+diff -up tree-1.6.0/Makefile.no-strip tree-1.6.0/Makefile
+--- tree-1.6.0/Makefile.no-strip       2011-06-24 15:25:27.000000000 +0100
++++ tree-1.6.0/Makefile        2011-07-04 11:11:17.662036666 +0100
+@@ -32,7 +32,7 @@ OBJS=tree.o unix.o html.o xml.o hash.o c
+ # Linux defaults:
+ #CFLAGS=-ggdb -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+ CFLAGS=-O4 -Wall  -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+-LDFLAGS=-s
++LDFLAGS=
+ # Uncomment for FreeBSD:
+ #CFLAGS=-O2 -Wall -fomit-frame-pointer
+@@ -97,7 +97,7 @@ install: tree
+       install -d $(BINDIR)
+       install -d $(MANDIR)
+       if [ -e $(TREE_DEST) ]; then \
+-              install -s $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
++              install $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
+       fi
+       install doc/$(MAN) $(MANDIR)/$(MAN)
diff --git a/tree/patches/tree-preserve-timestamps.patch b/tree/patches/tree-preserve-timestamps.patch
new file mode 100644 (file)
index 0000000..2e432a5
--- /dev/null
@@ -0,0 +1,15 @@
+diff -up tree-1.6.0/Makefile.preserve-timestamps tree-1.6.0/Makefile
+--- tree-1.6.0/Makefile.preserve-timestamps    2011-06-27 16:11:26.000000000 +0100
++++ tree-1.6.0/Makefile        2011-06-27 16:12:36.394443602 +0100
+@@ -97,9 +97,9 @@ install: tree
+       install -d $(BINDIR)
+       install -d $(MANDIR)
+       if [ -e $(TREE_DEST) ]; then \
+-              install $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
++              install -p $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
+       fi
+-      install doc/$(MAN) $(MANDIR)/$(MAN)
++      install -p doc/$(MAN) $(MANDIR)/$(MAN)
+ distclean:
+       if [ -f tree.o ]; then rm *.o; fi
diff --git a/tree/tree.nm b/tree/tree.nm
new file mode 100644 (file)
index 0000000..710ef4c
--- /dev/null
@@ -0,0 +1,41 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = tree
+version    = 1.6.0
+release    = 1
+
+groups     = Applications/File
+url        = http://mama.indstate.edu/users/ice/tree/
+license    = GPLv2+
+summary    = File system tree viewer.
+
+description
+       The tree utility recursively displays the contents of directories in a
+       tree-like format.  Tree is basically a UNIX port of the DOS tree
+       utility.
+end
+
+source_dl  = ftp://mama.indstate.edu/linux/tree/
+sources    = %{thisapp}.tgz
+
+build
+       build
+               make CFLAGS="%{CFLAGS} $(getconf LFS_CFLAGS)" %{PARALLELISMFLAGS}
+       end
+
+       install
+               make install BINDIR=%{BUILDROOT}%{bindir} \
+                       MANDIR=%{BUILDROOT}%{mandir}/man1
+       end
+end
+
+packages
+       package %{name}
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
+end