LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File sphinx.spec of Package sphinx (Project server:search)

# spec file for package sphinx (Version 2.0.1)
# Copyright (c) 2006--2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# Please submit bugfixes or comments via http://bugs.opensuse.org/

# norootforbuild

Name:           sphinx
Version:        2.0.7
Release:        0
#%define pkg_version 2.0.7-release
License:        GNU General Public License version 2 (GPL v2)
Group:          Productivity/Databases/Servers
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ 
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
Url:            http://sphinxsearch.com/
Source:         http://sphinxsearch.com/files/%{name}-%{pkg_version}.tar.gz
Patch0:		obs.patch
Summary:        Free open-source SQL full-text search engine

Sphinx is a full-text search engine, distributed under GPL version 2.
Commercial licensing is also available upon request.

Generally, it's a standalone search engine, meant to provide fast,
size-efficient and relevant fulltext search functions to other
applications. Sphinx was specially designed to integrate well with SQL
databases and scripting languages. Currently built-in data source
drivers support fetching data either via direct connection to MySQL,
PostgreSQL, or from a pipe in a custom XML format.

As for the name, Sphinx is an acronym which is officially decoded as
SQL Phrase Index. Yes, I know about CMU's Sphinx project.

%package devel
Summary: Sphinx development/header files
Group: Development/Libraries/Other
%description devel
Provides necessary development files for sphinx api and shared libs for sphinx client.

%setup -q -n "%{name}-%{pkg_version}"
%patch0 -p1
find -type d -name CVS -print0 | xargs -r0 rm -rf

%configure --sysconfdir=%{_sysconfdir}/%{name}/ --with-mysql --with-pgsql --enable-id64

cd api/libsphinxclient
%configure --sysconfdir=%{_sysconfdir}/%{name}/
cd ../../

%__cp -v %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf{.dist,}
for i in indexer search searchd ; do
  %__mv %{buildroot}%{_bindir}/{,%{name}-}$i

cd api/libsphinxclient
%__rm %{buildroot}%{_libdir}/libsphinxclient.la
cd ../../

%__rm -rf "%{buildroot}"

%config %dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/example.sql
%config(noreplace) %{_sysconfdir}/%{name}/sphinx.conf
%config %{_sysconfdir}/%{name}/sphinx.conf.dist
%config %{_sysconfdir}/%{name}/sphinx-min.conf.dist
%doc COPYING contrib/
%doc doc/*.html doc/*.css doc/*.txt
%doc %attr(644, root, man) %{_mandir}/man1/indexer.1* 
%doc %attr(644, root, man) %{_mandir}/man1/indextool.1*
%doc %attr(644, root, man) %{_mandir}/man1/search.1* 
%doc %attr(644, root, man) %{_mandir}/man1/searchd.1*
%doc %attr(644, root, man) %{_mandir}/man1/spelldump.1*

%files devel
%attr(755, root, root) %{_libdir}/libsphinxclient-0.0.1.so