You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.3 KiB

%define _bashcompdir %_sysconfdir/bash_completion.d
%define _zshcompdir %{_datadir}/zsh/site-functions
Name: the_silver_searcher
Version: @VERSION@
Release: 1%{?dist}
Summary: A code-searching tool similar to ack, but faster
Group: Applications/Utilities
License: Apache v2.0
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: pcre-devel, xz-devel, zlib-devel
Requires: pcre, xz, zlib
The Silver Searcher
An attempt to make something better than ack (which itself is better than grep).
Why use Ag?
* It searches code about 3–5× faster than ack.
* It ignores file patterns from your .gitignore and .hgignore.
* If there are files in your source repo you don't want to search, just add their patterns to a .ignore file. *cough* extern *cough*
* The command name is 33% shorter than ack!
How is it so fast?
* Searching for literals (no regex) uses Boyer-Moore-Horspool strstr.
* Files are mmap()ed instead of read into a buffer.
* If you're building with PCRE 8.21 or greater, regex searches use the JIT compiler.
* Ag calls pcre_study() before executing the regex on a jillion files.
* Instead of calling fnmatch() on every pattern in your ignore files, non-regex patterns are loaded into an array and binary searched.
* Ag uses Pthreads to take advantage of multiple CPU cores and search files in parallel.
%setup -q
automake --add-missing
make %{?_smp_mflags}
rm -rf ${RPM_BUILD_ROOT}
make install DESTDIR=${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_bashcompdir}
install -m 644 ${RPM_BUILD_ROOT}%{_bashcompdir}
rm -rf ${RPM_BUILD_ROOT}
%config %{_bashcompdir}/
%config %{_datadir}/%{name}/completions/
%config %{_datadir}/zsh/site-functions/_the_silver_searcher
* Thu Dec 5 2013 Emily Strickland <> - 0.18.1-1
- More accurate build and install requirements
* Fri Aug 16 2013 Andrew Seidl <> - 0.15.0-1
- Install bash completion file
* Wed Dec 05 2012 Daniel Nelson <> - 0.13.1-1
- Initial Build