marisa-trie-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. %define ver 0.2.4
  2. %define rel 1
  3. %define srcname marisa
  4. %define enable_python 1
  5. Summary: Matching Algorithm with Recursively Implemented StorAge
  6. Name: marisa-trie
  7. Version: %{ver}
  8. Release: %{rel}%{_dist_release}
  9. License: BSD
  10. Group: System Environment/Libraries
  11. URL: http://code.google.com/p/marisa-trie/
  12. Source0: http://marisa-trie.googlecode.com/files/%{srcname}-%{version}.tar.gz
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  14. %if %{enable_python}
  15. BuildRequires: swig
  16. BuildRequires: python-devel
  17. BuildRequires: marisa-trie-devel
  18. %endif
  19. Vendor: Project Vine
  20. Distribution: Vine Linux
  21. Packager: iwaim
  22. %description
  23. *Matching Algorithm with Recursively Implemented !StorAge (MARISA)* is a static
  24. and space-efficient trie data structure. And *libmarisa* is a C++ library to p
  25. rovide an implementation of MARISA. Also, the package of *libmarisa* contains a
  26. set of command line tools for building and operating a MARISA-based dictionary
  27. .
  28. A MARISA-based dictionary supports not only lookup but also reverse lookup, com
  29. mon prefix search and predictive search.
  30. * Lookup is to check whether or not a given string exists in a dictionary.
  31. * Reverse lookup is to restore a key from its ID.
  32. * Common prefix search is to find keys from prefixes of a given string.
  33. * Predictive search is to find keys starting with a given string.
  34. The biggest advantage of *libmarisa* is that its dictionary size is considerabl
  35. y more compact than others. See below for the dictionary size of other implemen
  36. tations.
  37. %package devel
  38. Summary: Header files and libraries for developing apps which will use marisa-trie
  39. Group: Development/Libraries
  40. Requires: %{name} = %{version}-%{release}
  41. %description devel
  42. The marisa-trie-devel package contains the header files and libraries.
  43. %if %{enable_python}
  44. %package python
  45. Summary: marisa-trie Python binding
  46. Group: Development/Libraries
  47. Requires: %{name} = %{version}-%{release}
  48. %description python
  49. marisa-trie Python binding
  50. %endif
  51. %prep
  52. %setup -q -n %{srcname}-%{version}
  53. %build
  54. %configure --enable-shared
  55. %__make
  56. %if %{enable_python}
  57. pushd bindings
  58. make swig-python
  59. pushd python
  60. python setup.py build
  61. popd
  62. popd
  63. %endif
  64. %install
  65. %__rm -rf $RPM_BUILD_ROOT
  66. %makeinstall
  67. %if %{enable_python}
  68. pushd bindings/python
  69. python setup.py install --root $RPM_BUILD_ROOT
  70. popd
  71. %endif
  72. # remove files
  73. %__rm -f $RPM_BUILD_ROOT%{_libdir}/*.{la,a}
  74. %clean
  75. %__rm -rf $RPM_BUILD_ROOT
  76. %files
  77. %defattr(-,root,root,-)
  78. %doc README ChangeLog COPYING AUTHORS NEWS docs
  79. %{_bindir}/marisa-benchmark
  80. %{_bindir}/marisa-build
  81. %{_bindir}/marisa-common-prefix-search
  82. %{_bindir}/marisa-dump
  83. %{_bindir}/marisa-lookup
  84. %{_bindir}/marisa-predictive-search
  85. %{_bindir}/marisa-reverse-lookup
  86. %{_libdir}/libmarisa.so.*
  87. %files devel
  88. %defattr(-,root,root,-)
  89. %doc COPYING AUTHORS
  90. %{_libdir}/pkgconfig/marisa.pc
  91. %dir %{_includedir}/marisa
  92. %{_includedir}/marisa.h
  93. %{_includedir}/marisa/*.h
  94. %{_libdir}/libmarisa.so
  95. %if %{enable_python}
  96. %files python
  97. %defattr(-,root,root,-)
  98. %doc COPYING AUTHORS
  99. %{python_sitearch}/_marisa.so
  100. %{python_sitearch}/marisa-*.egg-info
  101. %{python_sitearch}/marisa.py
  102. %{python_sitearch}/marisa.pyc
  103. %endif
  104. %changelog
  105. * Tue Jun 18 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.2.4-1
  106. - update to 0.2.4
  107. * Sat Mar 16 2013 IWAI, Masaharu <iwai@alib.jp> 0.2.2-1
  108. - update to 0.2.2
  109. * Fri Feb 8 2013 IWAI, Masaharu <iwai@alib.jp> 0.2.1-2
  110. - create python sub package
  111. * Mon Jan 28 2013 IWAI, Masaharu <iwai@alib.jp> 0.2.1-1
  112. - initial build for Vine Linux