silversearcher-ag-vl.spec 2.4 KB

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