Browse Source

ag: 高速検索プログラム

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@10133 ec354946-7b23-47d6-9f5a-488ba84defc7
ara_t 8 years ago
parent
commit
ed76463689
1 changed files with 89 additions and 0 deletions
  1. 89 0
      s/silversearcher-ag/silversearcher-ag-vl.spec

+ 89 - 0
s/silversearcher-ag/silversearcher-ag-vl.spec

@@ -0,0 +1,89 @@
+%define pkg_name    the_silver_searcher
+%define pkg_version 0.31.0
+%define pkg_release 2%{?_dist_release}
+
+Summary:     ag: The silver searcher
+Summary(ja): ag: 高速検索プログラム
+Name:        silversearcher-ag
+Version:     %{pkg_version}
+Release:     %{pkg_release}
+License:     Apache License 2.0
+
+Group:  Applications/Accessories
+URL:    https://github.com/ggreer/the_silver_searcher
+Source: %{pkg_name}-%{pkg_version}.tar.gz
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: pcre-devel xz-devel zlib-devel
+BuildRequires: clang-devel
+Requires: pcre xz zlib
+Requires: clang
+
+Vendor: Project Vine
+Distribution: Vine Linux
+Packager: ara_t
+
+
+%description
+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–5x 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 .agignore 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.
+
+%description -l ja
+The Silver Searcher: 高速検索プログラム
+* ackより3-5倍高速
+* .gitignore、.hgignoreに記載されているものを検索対象から除外
+* 検索対象から除外したいファイルは.agignoreに記載
+* agというコマンド名で、ackと比べてコマンドが短い(33%減!)
+
+
+%prep
+%{__rm} -rf ${RPM_BUILD_ROOT}
+%setup -q -n %{pkg_name}-%{pkg_version}
+
+./build.sh
+%{configure}
+
+%build
+%{__make} %{?_smp_mflags}
+
+%install
+%{make_install}
+
+%clean
+%{__rm} -rf ${RPM_BUILD_ROOT}
+
+
+%files
+%defattr(-, root, root)
+%{_bindir}/
+%{_datadir}/
+
+
+%changelog
+* Sun Apr 10 2016 Toshiaki Ara <ara_t@384.jp> 0.31.0-2
+- add BuildRequires: clang-devel
+- add Requires: clang
+- correct SPEC file
+
+* Tue Sep 22 2015 Toshiaki Ara <ara_t@384.jp> 0.31.0-1
+- new package
+