[cv] Initial import (#1128378)

flo flo at fedoraproject.org
Tue Aug 12 18:17:02 UTC 2014


commit 2ba3d0da5f68e2c4312cdc4f95d187d8fc320447
Author: Lehner Florian <dev at der-flo.net>
Date:   Tue Aug 12 20:16:43 2014 +0200

    Initial import (#1128378)
    
    Signed-off-by: Lehner Florian <dev at der-flo.net>

 .gitignore                        |    1 +
 cv-0.4.1_add-manpage.patch        |   73 +++++++++++++++++++++++++++++++++
 cv-0.4.1_consider-set-FLAGS.patch |   35 ++++++++++++++++
 cv-0.4.1_overides-makefile.patch  |   81 +++++++++++++++++++++++++++++++++++++
 cv.spec                           |   60 +++++++++++++++++++++++++++
 sources                           |    1 +
 6 files changed, 251 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..631485b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cv-0.4.1.tar.gz
diff --git a/cv-0.4.1_add-manpage.patch b/cv-0.4.1_add-manpage.patch
new file mode 100644
index 0000000..0c97630
--- /dev/null
+++ b/cv-0.4.1_add-manpage.patch
@@ -0,0 +1,73 @@
+From 1b407cd78aa193391368ccfb051eade5b306aea8 Mon Sep 17 00:00:00 2001
+From: Thomas Zimmermann <t.zimmermann at physik.uni-bonn.de>
+Date: Thu, 7 Aug 2014 11:54:34 +0200
+Subject: [PATCH] Add manpage for cv
+
+This manpage was written for the openSUSE project and contains mainly the --help output.
+---
+ cv.1 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 53 insertions(+)
+ create mode 100644 cv.1
+
+diff --git a/cv.1 b/cv.1
+new file mode 100644
+index 0000000..a6a4bb9
+--- /dev/null
++++ b/cv.1
+@@ -0,0 +1,53 @@
++.TH CV 1 "August 07, 2014" "cv"
++
++.SH NAME
++cv \- Coreutils Viewer
++.SH SYNOPSIS
++.B cv
++.I [-vqwmMh] [-W] [-c command]
++.br
++
++.SH DESCRIPTION
++This manual page briefly documents the \fBcv\fP command.
++.PP
++This tool can be described as a Tiny Dirty Linux Only* C command that looks for coreutils basic
++commands (cp, mv, dd, tar, gzip/gunzip, cat, ...) currently running on your system and displays
++the percentage of copied data.
++
++It can now also display an estimated throughput (using -w flag).
++
++.SH OPTIONS
++.TP
++.B \-v (\-\-version)
++show version
++.TP
++.B \-q (\-\-quiet)
++hides some warning/error messages
++.TP
++.B \-w (\-\-wait)
++estimate I/O throughput and ETA (slower display)
++.TP
++.B \-W (\-\-wait\-delay secs)
++wait 'secs' seconds for I/O estimation (implies -w)
++.TP
++.B \-m (\-\-monitor)
++loop while monitored processes are still running
++.TP
++.B \-M (\-\-monitor\-continous)
++like monitor but never stop (similar to watch cv)
++.TP
++.B \-h (\-\-help)
++this message
++.TP
++.B \-c (\-\-command cmd)
++monitor only this command name (ex: firefox)
++
++.SH BUGS
++Please report bugs at: http://github.com/Xfennec/cv/issues
++
++.SH HOMEPAGE
++http://github.com/Xfennec/cv
++
++.SH AUTHOR
++This manual page was written by Thomas Zimmermann <bugs at vdm-design.de>,
++for the openSUSE project (and may be used by others).
+-- 
+2.0.3
+
diff --git a/cv-0.4.1_consider-set-FLAGS.patch b/cv-0.4.1_consider-set-FLAGS.patch
new file mode 100644
index 0000000..023340d
--- /dev/null
+++ b/cv-0.4.1_consider-set-FLAGS.patch
@@ -0,0 +1,35 @@
+From 4aacfc36f7592460fda5a3e27f6a736d82462b03 Mon Sep 17 00:00:00 2001
+From: Thomas Zimmermann <t.zimmermann at physik.uni-bonn.de>
+Date: Thu, 7 Aug 2014 12:02:10 +0200
+Subject: [PATCH] Patch Makefile
+
+* Consider already set CFLAGS
+* Use CC make variable instead of hardcoding gcc
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 6d45d94..a765132 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,13 +1,13 @@
+ OBJ=cv
+-CFLAGS=-g -Wall -D_FILE_OFFSET_BITS=64
++CFLAGS+=-g -Wall -D_FILE_OFFSET_BITS=64
+ LFLAGS=-lncurses -lm
+ PREFIX = $(DESTDIR)/usr/local
+ BINDIR = $(PREFIX)/bin
+ 
+ $(OBJ) : cv.o sizes.o hlist.o
+-	gcc -Wall $^ -o $@ $(LFLAGS)
++	$(CC) -Wall $^ -o $@ $(LFLAGS)
+ %.o : %.c
+-	gcc $(CFLAGS) -c $^
++	$(CC) $(CFLAGS) -c $^
+ clean :
+ 	rm -f *.o $(OBJ)
+ install : $(OBJ)
+-- 
+2.0.3
+
diff --git a/cv-0.4.1_overides-makefile.patch b/cv-0.4.1_overides-makefile.patch
new file mode 100644
index 0000000..3a30c28
--- /dev/null
+++ b/cv-0.4.1_overides-makefile.patch
@@ -0,0 +1,81 @@
+From a08d4a319d5e5e6ff8460594c4a48eb3afa00b35 Mon Sep 17 00:00:00 2001
+From: Christopher Meng <cickumqt at gmail.com>
+Date: Sun, 10 Aug 2014 10:20:02 +0800
+Subject: [PATCH 1/2] Add override directive to makefile
+
+Add override directive to avoid flags overridden by custom settings.
+
+Then make CFLAGS="$(XXX)" will honor the existing flags in the makefile defined by upstream.
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a765132..d83158a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+-OBJ=cv
+-CFLAGS+=-g -Wall -D_FILE_OFFSET_BITS=64
+-LFLAGS=-lncurses -lm
+-PREFIX = $(DESTDIR)/usr/local
++OBJ = cv
++override CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64
++override LFLAGS += -lncurses -lm
++PREFIX ?= /usr/local
+ BINDIR = $(PREFIX)/bin
+ 
+ $(OBJ) : cv.o sizes.o hlist.o
+@@ -11,7 +11,7 @@ $(OBJ) : cv.o sizes.o hlist.o
+ clean :
+ 	rm -f *.o $(OBJ)
+ install : $(OBJ)
+-	@echo "Installing to $(BINDIR) ..."
+-	@mkdir -p $(BINDIR)
+-	@install -m 0755 $(OBJ) $(BINDIR)/$(TARGET) || \
++	@echo "Installing to $(DESTDIR)$(BINDIR) ..."
++	@mkdir -p $(DESTDIR)$(BINDIR)
++	@install -pm0755 $(OBJ) $(DESTDIR)$(BINDIR)/$(TARGET) || \
+ 	echo "Failed. Try "make PREFIX=~ install" ?"
+-- 
+2.0.3
+
+
+From a09df1e2191a041ac9f76a105f822cb20661ac4d Mon Sep 17 00:00:00 2001
+From: Christopher Meng <cickumqt at gmail.com>
+Date: Mon, 11 Aug 2014 09:44:21 +0800
+Subject: [PATCH 2/2] Add manpage rules.
+
+Add rules to install manpage.
+---
+ Makefile | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index d83158a..817e451 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,6 +3,7 @@ override CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64
+ override LFLAGS += -lncurses -lm
+ PREFIX ?= /usr/local
+ BINDIR = $(PREFIX)/bin
++MANDIR = $(PREFIX)/share/man/man1
+ 
+ $(OBJ) : cv.o sizes.o hlist.o
+ 	$(CC) -Wall $^ -o $@ $(LFLAGS)
+@@ -11,7 +12,11 @@ $(OBJ) : cv.o sizes.o hlist.o
+ clean :
+ 	rm -f *.o $(OBJ)
+ install : $(OBJ)
+-	@echo "Installing to $(DESTDIR)$(BINDIR) ..."
++	@echo "Installing program to $(DESTDIR)$(BINDIR) ..."
+ 	@mkdir -p $(DESTDIR)$(BINDIR)
+ 	@install -pm0755 $(OBJ) $(DESTDIR)$(BINDIR)/$(TARGET) || \
+ 	echo "Failed. Try "make PREFIX=~ install" ?"
++	@echo "Installing manpage to $(DESTDIR)$(MANDIR) ..."
++	@mkdir -p $(DESTDIR)$(MANDIR)
++	@install -pm0644 cv.1 $(DESTDIR)$(MANDIR)/ || \
++	echo "Failed. Try "make PREFIX=~ install" ?"
+-- 
+2.0.3
+
diff --git a/cv.spec b/cv.spec
new file mode 100644
index 0000000..9949dec
--- /dev/null
+++ b/cv.spec
@@ -0,0 +1,60 @@
+Name:		cv
+Version:	0.4.1
+Release:	4%{?dist}
+Summary:	Coreutils Viewer
+
+License:	GPLv3
+URL:		https://github.com/Xfennec/%{name}
+Source0:	https://github.com/Xfennec/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+
+# These patches will be obsolete in future versions
+Patch0:	https://github.com/Xfennec/%{name}/commit/4aacfc36f7592460fda5a3e27f6a736d82462b03.patch#/cv-0.4.1_consider-set-FLAGS.patch
+Patch1:	https://github.com/Xfennec/%{name}/pull/29.patch#/cv-0.4.1_overides-makefile.patch
+Patch2:	https://github.com/Xfennec/%{name}/commit/1b407cd78aa193391368ccfb051eade5b306aea8.patch#/cv-0.4.1_add-manpage.patch
+
+BuildRequires:	ncurses-devel
+
+%description
+Coreutils Viewer can be described as a Tiny Dirty Linux Only* C command that
+looks for coreutils basic commands (cp, mv, dd, tar, gzip/gunzip, cat, ...)
+currently running on your system and displays the percentage of copied data.
+
+%prep
+%setup -q
+%patch0 -b .consider_set_flags -p 1
+%patch1 -b .flags_override -p 1
+%patch2 -b .add_manpage -p 1
+
+%build
+CFLAGS="%{?optflags}"			\
+LFLAGS="%{?__global_ldflags}"	\
+make %{?_smp_mflags}
+
+%install
+mkdir -p %{buildroot}%{_bindir}
+install -pm 0755 %{name} %{buildroot}%{_bindir}/%{name}
+
+mkdir -p %{buildroot}%{_mandir}/man1
+install -pm 0644 *.1 %{buildroot}%{_mandir}/man1
+
+%files
+%doc LICENSE README.md
+%{_bindir}/cv
+%{_mandir}/man1/*.1*
+
+%changelog
+* Mon Aug 11 2014 Florian Lehner <dev at der-flo.net> 0.4.1-4
+- Unset __hardened_build
+- Rename LDFLAGS to LFLAGS
+
+* Sun Aug 10 2014 Florian Lehner <dev at der-flo.net> 0.4.1-3
+- Use patch from upstream to consider already set flags
+- Use patch from upstream to fix overrides in Makefile
+- Use patch from upstream toa add manpage for cv
+- Add README.md to doc-section
+
+* Sun Aug 10 2014 Florian Lehner <dev at der-flo.net> 0.4.1-2
+- Appending CFLAGS and LDFLAGS instead of overriding it
+
+* Sat Aug  9 2014 Florian Lehner <dev at der-flo.net> 0.4.1-1
+- Initial packaging (#1128378)
diff --git a/sources b/sources
index e69de29..773dd2e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7972631a2e30bcc199d24ed72f3e3957  cv-0.4.1.tar.gz


More information about the scm-commits mailing list