- Colors can be globally disabled via /etc/GREP_COLORS (#602867)
- Fixed indentation in spec - Fixed defattr in spec
This commit is contained in:
		
							parent
							
								
									7649763975
								
							
						
					
					
						commit
						d1cc860577
					
				
							
								
								
									
										4
									
								
								GREP_COLORS
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								GREP_COLORS
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | # Configuration file for the color grep utility | ||||||
|  | 
 | ||||||
|  | # 'none' shuts colorization off. | ||||||
|  | #COLOR none | ||||||
| @ -1 +1,16 @@ | |||||||
|  | #! /bin/csh -f | ||||||
|  | 
 | ||||||
|  | # color-grep initialization | ||||||
|  | 
 | ||||||
|  | set COLORS=/etc/GREP_COLORS | ||||||
|  | 
 | ||||||
|  | if ( -e "$COLORS" ) then | ||||||
|  |     set color_none=`sed -n '/^COLOR.*none/Ip' < $COLORS` | ||||||
|  |     if ( "$color_none" != '' ) then | ||||||
|  |         unset color_none | ||||||
|  |         exit | ||||||
|  |     endif | ||||||
|  |     unset color_none | ||||||
|  | endif | ||||||
|  | 
 | ||||||
| alias grep 'grep --color=auto' | alias grep 'grep --color=auto' | ||||||
|  | |||||||
							
								
								
									
										13
									
								
								colorgrep.sh
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								colorgrep.sh
									
									
									
									
									
								
							| @ -1 +1,14 @@ | |||||||
|  | # color-grep initialization | ||||||
|  | 
 | ||||||
|  | # Skip the rest for noninteractive shells. | ||||||
|  | [ -z "$PS1" ] && return | ||||||
|  | 
 | ||||||
|  | COLORS= | ||||||
|  | 
 | ||||||
|  | [ -e "/etc/GREP_COLORS" ] && COLORS="/etc/GREP_COLORS" | ||||||
|  | 
 | ||||||
|  | if [ -n "$COLORS" ]; then | ||||||
|  |     grep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| alias grep='grep --color=auto' 2>/dev/null | alias grep='grep --color=auto' 2>/dev/null | ||||||
|  | |||||||
							
								
								
									
										14
									
								
								grep.spec
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								grep.spec
									
									
									
									
									
								
							| @ -3,16 +3,17 @@ | |||||||
| Summary: Pattern matching utilities | Summary: Pattern matching utilities | ||||||
| Name: grep | Name: grep | ||||||
| Version: 2.6.3 | Version: 2.6.3 | ||||||
| Release: 3%{?dist} | Release: 4%{?dist} | ||||||
| License: GPLv3+ | License: GPLv3+ | ||||||
| Group: Applications/Text | Group: Applications/Text | ||||||
| Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz | Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz | ||||||
| Source1: colorgrep.sh | Source1: colorgrep.sh | ||||||
| Source2: colorgrep.csh | Source2: colorgrep.csh | ||||||
|  | Source3: GREP_COLORS | ||||||
| URL: http://www.gnu.org/software/grep/ | URL: http://www.gnu.org/software/grep/ | ||||||
| Requires(post): /sbin/install-info | Requires(post): /sbin/install-info | ||||||
| Requires(preun): /sbin/install-info | Requires(preun): /sbin/install-info | ||||||
| BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | ||||||
| BuildRequires: pcre-devel >= 3.9-10, texinfo, gettext | BuildRequires: pcre-devel >= 3.9-10, texinfo, gettext | ||||||
| BuildRequires: autoconf automake | BuildRequires: autoconf automake | ||||||
| # Speedups DFA UTF-8 period patterns. | # Speedups DFA UTF-8 period patterns. | ||||||
| @ -57,6 +58,7 @@ gzip $RPM_BUILD_ROOT%{_infodir}/grep* | |||||||
| rm -f $RPM_BUILD_ROOT%{_infodir}/dir | rm -f $RPM_BUILD_ROOT%{_infodir}/dir | ||||||
| mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d | ||||||
| install -pm 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d | install -pm 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d | ||||||
|  | install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir} | ||||||
| 
 | 
 | ||||||
| %find_lang %name | %find_lang %name | ||||||
| 
 | 
 | ||||||
| @ -75,15 +77,21 @@ if [ $1 = 0 ]; then | |||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| %files -f %{name}.lang | %files -f %{name}.lang | ||||||
| %defattr(-,root,root) | %defattr(-,root,root,-) | ||||||
| %doc ABOUT-NLS AUTHORS THANKS TODO NEWS README ChangeLog COPYING | %doc ABOUT-NLS AUTHORS THANKS TODO NEWS README ChangeLog COPYING | ||||||
| 
 | 
 | ||||||
| %{_bindir}/* | %{_bindir}/* | ||||||
| %config(noreplace) %{_sysconfdir}/profile.d/colorgrep.*sh | %config(noreplace) %{_sysconfdir}/profile.d/colorgrep.*sh | ||||||
|  | %config(noreplace) %{_sysconfdir}/GREP_COLORS | ||||||
| %{_infodir}/*.info*.gz | %{_infodir}/*.info*.gz | ||||||
| %{_mandir}/*/* | %{_mandir}/*/* | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Fri Jun 11 2010 Jaroslav Škarvada <jskarvad@redhat.com> - 2.6.3-4 | ||||||
|  | - Colors can be globally disabled via /etc/GREP_COLORS (#602867) | ||||||
|  | - Fixed indentation in spec | ||||||
|  | - Fixed defattr in spec | ||||||
|  | 
 | ||||||
| * Mon Jun 07 2010 Jaroslav Škarvada <jskarvad@redhat.com> - 2.6.3-3 | * Mon Jun 07 2010 Jaroslav Škarvada <jskarvad@redhat.com> - 2.6.3-3 | ||||||
| - Added auto-color profile.d scripts (thanks to Ville Skyttä #600832) | - Added auto-color profile.d scripts (thanks to Ville Skyttä #600832) | ||||||
| - Removed description macro from changelog | - Removed description macro from changelog | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user