Also adds automatic colouring of matched strings.
--- /dev/null
+# Configuration file for the color grep utility
+
+# 'none' shuts colorization off.
+#COLOR none
--- /dev/null
+# color-grep initialization
+
+if [ -r /etc/GREP_COLORS ]; then
+ grep -qi "^COLOR.*none" /etc/GREP_COLORS >/dev/null 2>/dev/null && return
+fi
+
+alias grep='grep --color=auto' 2>/dev/null
+alias egrep='egrep --color=auto' 2>/dev/null
+alias fgrep='fgrep --color=auto' 2>/dev/null
###############################################################################
name = grep
-version = 2.16
+version = 2.17
release = 1
groups = Applications/Text
test
make check
end
+
+ install_cmds
+ mkdir -pv %{BUILDROOT}%{sysconfdir}/profile.d
+ install -m 644 %{DIR_SOURCE}/colorgrep.sh \
+ %{BUILDROOT}%{sysconfdir}/profile.d
+ install -m 644 %{DIR_SOURCE}/GREP_COLORS \
+ %{BUILDROOT}%{sysconfdir}
+ end
end
packages
provides
/bin/grep
+ bundled(gnulib)
end
conflicts
filesystem < 002
end
+
+ configfiles
+ %{sysconfdir}/profile.d/colorgrep.sh
+ %{sysconfdir}/GREP_COLORS
+ end
end
package %{name}-debuginfo