]> git.pld-linux.org Git - packages/the_silver_searcher.git/blame - the_silver_searcher.spec
- unconditional noarch subpackages
[packages/the_silver_searcher.git] / the_silver_searcher.spec
CommitLineData
97dfa9c1
JP
1Summary: A code-searching tool similar to ack, but faster
2Name: the_silver_searcher
390bf330 3Version: 2.2.0
ffd243a9 4Release: 2
97dfa9c1
JP
5License: Appache v2.0
6Group: Applications
7Source0: https://geoff.greer.fm/ag/releases/%{name}-%{version}.tar.gz
390bf330 8# Source0-md5: 958a614cbebf47b2f27a7d00a5bb1bcb
c2d75ac0 9Patch0: gcc10.patch
ffd243a9
JP
10Patch1: hl_multi_matches_nomultiline.patch
11URL: https://geoff.greer.fm/ag/
97dfa9c1
JP
12BuildRequires: autoconf >= 2.59
13BuildRequires: automake
14BuildRequires: pcre-devel
15BuildRequires: pkgconfig
16BuildRequires: xz-devel
17BuildRequires: zlib-devel
18Suggests: bash-completion-%{name}
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%define zshdir %{_datadir}/zsh/site-functions
22
23%description
24An attempt to make something better than ack (which itself is better
25than grep).
26
27Why use Ag?
28- It searches code about 3–5× faster than ack.
29- It ignores file patterns from your .gitignore and .hgignore.
30- If there are files in your source repo you don't want to search,
31 just add their patterns to a .ignore file. *cough* extern *cough*
32- The command name is 33% shorter than ack!
33
34How is it so fast?
35- Searching for literals (no regex) uses Boyer-Moore-Horspool strstr.
36- Files are mmap()ed instead of read into a buffer.
37- If you're building with PCRE 8.21 or greater, regex searches use the
38 JIT compiler.
39- Ag calls pcre_study() before executing the regex on a jillion files.
40- Instead of calling fnmatch() on every pattern in your ignore files,
41 non-regex patterns are loaded into an array and binary searched.
42- Ag uses Pthreads to take advantage of multiple CPU cores and search
43 files in parallel.
44
45%package -n bash-completion-%{name}
46Summary: bash-completion for the_silver_searcher
47Group: Applications/Shells
48Requires: bash-completion
97dfa9c1 49BuildArch: noarch
97dfa9c1
JP
50
51%description -n bash-completion-%{name}
52This package provides bash-completion for the_silver_searcher.
53
54%package -n zsh-completion-%{name}
55Summary: zsh-completion for the_silver_searcher
56Group: Applications/Shells
57Requires: zsh
97dfa9c1 58BuildArch: noarch
97dfa9c1
JP
59
60%description -n zsh-completion-%{name}
61This package provides zsh-completion for the_silver_searcher.
62
63%prep
64%setup -q
c2d75ac0 65%patch0 -p1
ffd243a9 66%patch1 -p1
97dfa9c1
JP
67
68%build
69%{__aclocal} -I m4
70%{__autoconf}
71%{__autoheader}
72%{__automake}
73%configure \
74 --disable-silent-rules
75%{__make}
76
77%install
78rm -rf $RPM_BUILD_ROOT
79%{__make} install \
80 DESTDIR=$RPM_BUILD_ROOT
81
82install -d $RPM_BUILD_ROOT/etc/bash_completion.d
83rm $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/ag.bashcomp.sh
84cp -p ag.bashcomp.sh $RPM_BUILD_ROOT/etc/bash_completion.d
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%files
90%defattr(644,root,root,755)
91%doc README.md
92%attr(755,root,root) %{_bindir}/ag
93%{_mandir}/man1/ag.1*
94
95%files -n bash-completion-%{name}
96%defattr(644,root,root,755)
97/etc/bash_completion.d/*
98
99%files -n zsh-completion-%{name}
100%defattr(644,root,root,755)
101%{zshdir}/_the_silver_searcher
This page took 0.052419 seconds and 4 git commands to generate.