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