[gzip] - z*grep is coloroured if grep is coloured (#1034839) - added build macros (#667144)
pstodulk
pstodulk at fedoraproject.org
Tue Aug 26 14:21:41 UTC 2014
commit f8ae2b7c2ab51681f06e35b2b9226ddcf525554d
Author: Petr Stodulka <pstodulk at redhat.com>
Date: Tue Aug 26 16:16:21 2014 +0200
- z*grep is coloroured if grep is coloured (#1034839)
- added build macros (#667144)
colorzgrep.csh | 9 +++++++++
colorzgrep.sh | 6 ++++++
gzip.spec | 22 +++++++++++++++++++++-
3 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/colorzgrep.csh b/colorzgrep.csh
new file mode 100644
index 0000000..5547b7a
--- /dev/null
+++ b/colorzgrep.csh
@@ -0,0 +1,9 @@
+test -f /usr/libexec/grepconf.sh
+if ( $status == 1 ) exit
+
+/usr/libexec/grepconf.sh -c
+if ( $status == 1 ) exit
+
+alias zgrep 'zgrep --color=auto'
+alias zfgrep 'zfgrep --color=auto'
+alias zegrep 'zegrep --color=auto'
diff --git a/colorzgrep.sh b/colorzgrep.sh
new file mode 100644
index 0000000..7764a07
--- /dev/null
+++ b/colorzgrep.sh
@@ -0,0 +1,6 @@
+[ -f /usr/libexec/grepconf.sh ] || return
+
+/usr/libexec/grepconf.sh -c || return
+alias zgrep='zgrep --color=auto' 2>/dev/null
+alias zfgrep='zfgrep --color=auto' 2>/dev/null
+alias zegrep='zegrep --color=auto' 2>/dev/null
diff --git a/gzip.spec b/gzip.spec
index d01c1c6..54ebfcf 100644
--- a/gzip.spec
+++ b/gzip.spec
@@ -1,12 +1,17 @@
Summary: The GNU data compression program
Name: gzip
Version: 1.6
-Release: 5%{?dist}
+Release: 6%{?dist}
# info pages are under GFDL license
License: GPLv3+ and GFDL
Group: Applications/File
Source0: http://ftp.gnu.org/gnu/gzip/gzip-%{version}.tar.xz
Source1: https://www.gnu.org/licenses/fdl-1.3.txt
+
+# downstream solution for coloured z*grep (#1034839)
+Source100: colorzgrep.csh
+Source101: colorzgrep.sh
+
Patch0: gzip-1.3.12-openbsd-owl-tmp.patch
Patch1: gzip-1.3.5-zforce.patch
Patch4: gzip-1.3.13-rsync.patch
@@ -52,6 +57,9 @@ cp %{SOURCE1} .
%build
export DEFS="NO_ASM"
export CPPFLAGS="-DHAVE_LSTAT"
+export CC="%{__cc}"
+export CPP="%{__cpp}"
+export CXX="%{__cxx}"
%configure
make
@@ -68,6 +76,12 @@ rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
# uncompress is a part of ncompress package
rm -f ${RPM_BUILD_ROOT}/%{_bindir}/uncompress
+# coloured z*grep (#1034839)
+%global profiledir %{_sysconfdir}/profile.d
+mkdir -p %{buildroot}%{profiledir}
+install -p -m 644 %{SOURCE100} %{buildroot}%{profiledir}
+install -p -m 644 %{SOURCE101} %{buildroot}%{profiledir}
+
%post
if [ -f %{_infodir}/gzip.info* ]; then
/sbin/install-info %{_infodir}/gzip.info.gz %{_infodir}/dir || :
@@ -88,8 +102,14 @@ fi
%{_bindir}/*
%{_mandir}/*/*
%{_infodir}/gzip.info*
+%{profiledir}/*
%changelog
+* Tue Aug 26 2014 Petr Stodulka <pstodulk at redhat.com> - 1.6-4
+- changed spec file - build section
+ obey compiler macros %__cc, %__cpp, %_cxx (#667144)
+- zgrep inherits color setup from grep (#1034839)
+
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list