package init
This commit is contained in:
parent
041feb720f
commit
39214eb3a1
BIN
marisa-0.2.4.tar.gz
Normal file
BIN
marisa-0.2.4.tar.gz
Normal file
Binary file not shown.
159
marisa.spec
Normal file
159
marisa.spec
Normal file
@ -0,0 +1,159 @@
|
||||
Name: marisa
|
||||
Version: 0.2.4
|
||||
Release: 37
|
||||
Summary: Matching Algorithm with Recursively Implemented StorAge
|
||||
|
||||
License: BSD or LGPLv2+
|
||||
URL: https://code.google.com/p/marisa-trie
|
||||
Source0: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/marisa-trie/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: swig perl-devel perl-generators python3-devel ruby-devel python2-devel
|
||||
|
||||
%description
|
||||
MARISA is a static and space-efficient trie data structure. And libmarisa is a C++
|
||||
library to provide an implementation of MARISA. Also, the package of libmarisa contains
|
||||
a set of command line tools,which build and operate a MARISA-based dictionary.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for marisa
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: %{name}-tools = %{version}-%{release}
|
||||
Obsoletes: %{name}-tools < %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The marisa-devel package contains libraries and header files for
|
||||
developing applications that use marisa.
|
||||
|
||||
%package -n python2-marisa
|
||||
Summary: Python2 bindings for marisa
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Provides: %{name}-python = %{version}-%{release}
|
||||
Obsoletes: %{name}-python < %{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-marisa}
|
||||
|
||||
%description -n python2-marisa
|
||||
Python2 bindings for marisa.
|
||||
|
||||
%package -n python3-marisa
|
||||
Summary: Python3 bindings for marisa
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-marisa}
|
||||
|
||||
%description -n python3-marisa
|
||||
Python3 bindings for marisa.
|
||||
|
||||
%package perl
|
||||
Summary: Perl bindings for marisa
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description perl
|
||||
Perl bindings for marisa.
|
||||
|
||||
%package ruby
|
||||
Summary: Ruby bindings for marisa
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: ruby(release)
|
||||
|
||||
%description ruby
|
||||
Ruby bindings for marisa.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
%make_build
|
||||
|
||||
cd bindings/perl
|
||||
%{__perl} Makefile.PL INC="-I%{_builddir}/marisa-%{version}/lib" \
|
||||
LIBS="-L%{_builddir}/marisa-%{version}/lib/.libs -lmarisa" INSTALLDIRS=vendor
|
||||
%make_build
|
||||
cd -
|
||||
|
||||
%make_build --directory=bindings swig-python
|
||||
|
||||
cd bindings/python
|
||||
%{__python2} setup.py build_ext --include-dirs="%{_builddir}/marisa-%{version}/lib" \
|
||||
--library-dirs="%{_builddir}/marisa-%{version}/lib/.libs"
|
||||
%py2_build
|
||||
|
||||
%{__python3} setup.py build_ext --include-dirs="%{_builddir}/marisa-%{version}/lib" \
|
||||
--library-dirs="%{_builddir}/marisa-%{version}/lib/.libs"
|
||||
%py3_build
|
||||
cd -
|
||||
|
||||
cd bindings
|
||||
%make_build swig-ruby
|
||||
cd -
|
||||
|
||||
cd bindings/ruby
|
||||
ruby extconf.rb --with-opt-include="%{_builddir}/marisa-%{version}/lib" \
|
||||
--with-opt-lib="%{_builddir}/marisa-%{version}/lib/.libs" --vendor
|
||||
%make_build
|
||||
cd -
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
cd bindings/perl
|
||||
%make_install
|
||||
%{_fixperms} -c %{buildroot}%{perl_vendorarch}/*
|
||||
cd -
|
||||
|
||||
cd bindings/python
|
||||
%py2_install
|
||||
%py3_install
|
||||
cd -
|
||||
|
||||
cd bindings/ruby
|
||||
%make_install
|
||||
cd -
|
||||
|
||||
%delete_la
|
||||
find $RPM_BUILD_ROOT -name 'perllocal.pod' -delete
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc docs/style.css AUTHORS README docs/readme.en.html COPYING
|
||||
%lang(ja) %doc docs/readme.ja.html
|
||||
%{_libdir}/libmarisa.so.*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/marisa*
|
||||
%{_libdir}/{*.so,pkgconfig/*.pc}
|
||||
%{_bindir}/*
|
||||
|
||||
%files -n python2-marisa
|
||||
%{python2_sitearch}/{_marisa.so,marisa.py*}
|
||||
%{python2_sitearch}/marisa-0.0.0-py2.?.egg-info
|
||||
|
||||
%files -n python3-marisa
|
||||
%{python3_sitearch}/__pycache__/marisa*
|
||||
%{python3_sitearch}/{_marisa*.so,marisa.py}
|
||||
%{python3_sitearch}/marisa-0.0.0-py3.?.egg-info
|
||||
|
||||
%files perl
|
||||
%{perl_vendorarch}/{marisa.pm,auto/marisa}
|
||||
%exclude %{perl_vendorarch}/auto/marisa/.packlist
|
||||
%exclude %{perl_vendorarch}/sample.pl
|
||||
|
||||
%files ruby
|
||||
%{ruby_vendorarchdir}/marisa.so
|
||||
|
||||
%changelog
|
||||
* Thu Dec 12 2019 daiqianwen <daiqianwen@huawei.com> - 0.2.4-37
|
||||
- Package init
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user