silversearcher-ag-vl.spec 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. %define pkg_name the_silver_searcher
  2. %define pkg_version 0.32.0
  3. %define pkg_release 1%{?_dist_release}
  4. Summary: ag: The silver searcher
  5. Summary(ja): ag: 高速検索プログラム
  6. Name: silversearcher-ag
  7. Version: %{pkg_version}
  8. Release: %{pkg_release}
  9. License: Apache License 2.0
  10. Group: Applications/Accessories
  11. URL: https://github.com/ggreer/the_silver_searcher
  12. Source: %{pkg_name}-%{pkg_version}.tar.gz
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  14. BuildRequires: pcre-devel xz-devel zlib-devel
  15. Requires: pcre xz zlib
  16. Vendor: Project Vine
  17. Distribution: Vine Linux
  18. Packager: ara_t
  19. %description
  20. The Silver Searcher
  21. An attempt to make something better than ack
  22. (which itself is better than grep).
  23. Why use Ag?
  24. * It searches code about 3–5x faster than ack.
  25. * It ignores file patterns from your .gitignore and .hgignore.
  26. * If there are files in your source repo you don't want to search,
  27. just add their patterns to a .agignore file. *cough* extern *cough*
  28. * The command name is 33% shorter than ack!
  29. How is it so fast?
  30. * Searching for literals (no regex) uses Boyer-Moore-Horspool strstr.
  31. * Files are mmap()ed instead of read into a buffer.
  32. * If you're building with PCRE 8.21 or greater,
  33. regex searches use the JIT compiler.
  34. * Ag calls pcre_study() before executing the regex on a jillion files.
  35. * Instead of calling fnmatch() on every pattern in your ignore files,
  36. non-regex patterns are loaded into an array and binary searched.
  37. * Ag uses Pthreads to take advantage of multiple CPU cores and
  38. search files in parallel.
  39. %description -l ja
  40. The Silver Searcher: 高速検索プログラム
  41. * ackより3-5倍高速
  42. * .gitignore、.hgignoreに記載されているものを検索対象から除外
  43. * 検索対象から除外したいファイルは.agignoreに記載
  44. * agというコマンド名で、ackと比べてコマンドが短い(33%減!)
  45. %prep
  46. %{__rm} -rf ${RPM_BUILD_ROOT}
  47. %setup -q -n %{pkg_name}-%{pkg_version}
  48. ./build.sh
  49. %{configure}
  50. %build
  51. %{__make} %{?_smp_mflags}
  52. %install
  53. %{make_install}
  54. %clean
  55. %{__rm} -rf ${RPM_BUILD_ROOT}
  56. %files
  57. %defattr(-, root, root)
  58. %{_bindir}/
  59. %{_datadir}/
  60. %changelog
  61. * Tue May 17 2016 Toshiaki Ara <ara_t@384.jp> 0.32.0-1
  62. - update to 0.32.0
  63. * Sun Apr 10 2016 Toshiaki Ara <ara_t@384.jp> 0.31.0-3
  64. - correct SPEC file
  65. * Wed Feb 17 2016 Toshiaki Ara <ara_t@384.jp> 0.31.0-2
  66. - add LICENSE
  67. * Tue Sep 22 2015 Toshiaki Ara <ara_t@384.jp> 0.31.0-1
  68. - new package