6647d5
Name:		marisa
6647d5
Version:	0.2.4
6647d5
Release:	4%{?dist}
6647d5
Summary:	Static and spece-efficient trie data structure library
6647d5
6647d5
License:	BSD or LGPL
6647d5
URL:		https://code.google.com/p/marisa-trie/
6647d5
Source0:	https://marisa-trie.googlecode.com/files/%{name}-%{version}.tar.gz
6647d5
BuildRequires:	swig
6647d5
BuildRequires:	perl-devel
6647d5
BuildRequires:	python2-devel
6647d5
BuildRequires:	ruby-devel
6647d5
6647d5
%description
6647d5
Matching Algorithm with Recursively Implemented StorAge (MARISA) is a
6647d5
static and space-efficient trie data structure. And libmarisa is a C++
6647d5
library to provide an implementation of MARISA. Also, the package of
6647d5
libmarisa contains a set of command line tools for building and
6647d5
operating a MARISA-based dictionary.
6647d5
6647d5
A MARISA-based dictionary supports not only lookup but also reverse
6647d5
lookup, common prefix search and predictive search.
6647d5
6647d5
6647d5
%package	devel
6647d5
Summary:	Development files for %{name}
6647d5
Group:		Development/Libraries
6647d5
Requires:	%{name}%{?_isa} = %{version}-%{release}
6647d5
6647d5
%description	devel
6647d5
The %{name}-devel package contains libraries and header files for
6647d5
developing applications that use %{name}.
6647d5
6647d5
6647d5
%package        tools
6647d5
Summary:	Tools for %{name}
6647d5
Group:		Development/Tools
6647d5
Requires:	%{name}%{?_isa} = %{version}-%{release}
6647d5
6647d5
%description	tools
6647d5
The %{name}-tools package contains tools for developing applications
6647d5
that use %{name}.
6647d5
6647d5
6647d5
%package perl
6647d5
Summary:	Perl language binding for marisa
6647d5
Group:		Development/Libraries
6647d5
Requires:	%{name} = %{version}-%{release}
6647d5
6647d5
%description perl
6647d5
Perl language binding for marisa
6647d5
6647d5
6647d5
%package python
6647d5
Summary:	Python language binding for marisa
6647d5
Group:		Development/Libraries
6647d5
Requires:	%{name} = %{version}-%{release}
6647d5
6647d5
%description python
6647d5
Python language binding for marisa
6647d5
6647d5
6647d5
%package ruby
6647d5
Summary:	Ruby language binding for marisa
6647d5
Group:		Development/Libraries
6647d5
Requires:	%{name} = %{version}-%{release}
6647d5
%if (0%{?fedora} >= 19 || 0%{?rhel} >= 7)
6647d5
Requires:	ruby(release) = 2.0.0
6647d5
%else
6647d5
Requires:	ruby(abi) = 1.9.1
6647d5
%endif
6647d5
6647d5
%description ruby
6647d5
Ruby language binding for groonga
6647d5
6647d5
6647d5
%prep
6647d5
%setup -q
6647d5
6647d5
6647d5
%build
6647d5
%configure --disable-static
6647d5
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
6647d5
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
6647d5
make %{?_smp_mflags}
6647d5
6647d5
# build Perl bindings
6647d5
pushd bindings/perl
6647d5
%{__perl} Makefile.PL INC="-I%{_builddir}/%{name}-%{version}/lib" LIBS="-L%{_builddir}/%{name}-%{version}/lib/.libs -lmarisa" INSTALLDIRS=vendor
6647d5
make %{?_smp_mflags}
6647d5
popd
6647d5
6647d5
# build Python bindings
6647d5
pushd bindings/python
6647d5
%{__python} setup.py build_ext --include-dirs="%{_builddir}/%{name}-%{version}/lib" --library-dirs="%{_builddir}/%{name}-%{version}/lib/.libs"
6647d5
%{__python} setup.py build
6647d5
popd
6647d5
6647d5
# build Ruby bindings
6647d5
pushd bindings/ruby
6647d5
ruby extconf.rb --with-opt-include="%{_builddir}/%{name}-%{version}/lib" --with-opt-lib="%{_builddir}/%{name}-%{version}/lib/.libs" --vendor
6647d5
make
6647d5
popd
6647d5
6647d5
%install
6647d5
%make_install INSTALL="install -p"
6647d5
6647d5
# install Perl bindings
6647d5
pushd bindings/perl
6647d5
%make_install INSTALL="install -p"
6647d5
popd
6647d5
6647d5
# install Python bindings
6647d5
pushd bindings/python
6647d5
%{__python} setup.py install --root="$RPM_BUILD_ROOT"
6647d5
popd
6647d5
6647d5
# install Ruby bindings
6647d5
pushd bindings/ruby
6647d5
%make_install INSTALL="install -p"
6647d5
popd
6647d5
6647d5
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
6647d5
find $RPM_BUILD_ROOT -name 'perllocal.pod' -exec rm -f {} ';'
6647d5
rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/sample.pl
6647d5
6647d5
6647d5
%post -p /sbin/ldconfig
6647d5
6647d5
%postun -p /sbin/ldconfig
6647d5
6647d5
6647d5
%files
6647d5
%doc docs/* AUTHORS COPYING README
6647d5
%{_libdir}/*.so.*
6647d5
6647d5
%files devel
6647d5
%{_includedir}/*
6647d5
%{_libdir}/*.so
6647d5
%{_libdir}/pkgconfig/*.pc
6647d5
6647d5
%files tools
6647d5
%{_bindir}/marisa*
6647d5
6647d5
%files perl
6647d5
%{perl_vendorarch}/*
6647d5
%exclude %dir %{perl_vendorarch}/auto/
6647d5
6647d5
%files python
6647d5
%{python_sitearch}/*
6647d5
6647d5
%files ruby
6647d5
%{ruby_vendorarchdir}/*
6647d5
6647d5
6647d5
%changelog
6647d5
* Tue Dec 06 2016 Parag Nemade <pnemade AT redhat DOT com> - 0.2.4-4
6647d5
- Resolves: #1246695 Fix packaging of marisa-perl patch by Yaakov Selkowitz
6647d5
6647d5
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.2.4-3
6647d5
- Mass rebuild 2014-01-24
6647d5
6647d5
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.2.4-2
6647d5
- Mass rebuild 2013-12-27
6647d5
6647d5
* Wed Sep  4 2013 Daiki Ueno <dueno@redhat.com> - 0.2.4-1.1
6647d5
- use 'ruby(release)' on RHEL 7 as well as Fedora 19 (Closes: #1002870)
6647d5
- disable workaround for ruby bindings needed for earlier Fedora 19
6647d5
6647d5
* Thu May  2 2013 Daiki Ueno <dueno@redhat.com> - 0.2.4-1
6647d5
- new upstream release
6647d5
6647d5
* Wed Mar 20 2013 Vít Ondruch <vondruch@redhat.com> - 0.2.2-2
6647d5
- Move Ruby bindings into correct location.
6647d5
6647d5
* Thu Mar 14 2013 Daiki Ueno <dueno@redhat.com> - 0.2.2-1
6647d5
- new upstream release
6647d5
- for Fedora 19 or later, use 'ruby(release)' instead of 'ruby(abi)',
6647d5
  and also update the required Ruby ABI/release version to 2.0.0
6647d5
6647d5
* Thu Feb  7 2013 Daiki Ueno <dueno@redhat.com> - 0.2.1-3
6647d5
- add perl, python, ruby bindings
6647d5
6647d5
* Fri Feb  1 2013 Daiki Ueno <dueno@redhat.com> - 0.2.1-2
6647d5
- remove unnesseary BR
6647d5
- don't embed rpath in executables
6647d5
- add docs
6647d5
- drop buildroot cleanup
6647d5
- preserve timestamp when make install
6647d5
6647d5
* Thu Jan 24 2013 Daiki Ueno <dueno@redhat.com> - 0.2.1-1
6647d5
- initial packaging
6647d5