packages: sphinx/sphinx.spec - package clean config
glen
glen at pld-linux.org
Mon Apr 12 13:28:36 CEST 2010
Author: glen Date: Mon Apr 12 11:28:36 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- package clean config
---- Files affected:
packages/sphinx:
sphinx.spec (1.23 -> 1.24)
---- Diffs:
================================================================
Index: packages/sphinx/sphinx.spec
diff -u packages/sphinx/sphinx.spec:1.23 packages/sphinx/sphinx.spec:1.24
--- packages/sphinx/sphinx.spec:1.23 Wed Mar 31 00:24:28 2010
+++ packages/sphinx/sphinx.spec Mon Apr 12 13:28:30 2010
@@ -21,7 +21,7 @@
Summary(pl.UTF-8): Silnik przeszukiwania pełnotekstowego SQL open-source
Name: sphinx
Version: 0.9.9
-Release: 0.1
+Release: 1.3
License: GPL v2
Group: Applications/Databases
Source0: http://www.sphinxsearch.com/downloads/%{name}-%{version}.tar.gz
@@ -51,6 +51,8 @@
Provides: user(sphinx)
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _sysconfdir /etc/%{name}
+
%description
Sphinx is a a standalone search engine, meant to provide fast,
size-efficient and relevant fulltext search functions to other
@@ -156,6 +158,9 @@
--with%{!?with_pgsql:out}-pgsql \
--with%{!?with_mysql:out}-mysql
%{__make} -j1
+# use .conf ext for %doc
+cp -f sphinx.conf.dist sphinx.conf
+cp -f sphinx-min.conf.dist sphinx-min.conf
# libsphinxclient
cd api/libsphinxclient
@@ -177,13 +182,17 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/rc.d/init.d,%{_localstatedir}/{log,run,lib}/%{name}}
%{__make} -j1 install \
DESTDIR=$RPM_BUILD_ROOT
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/example.sql
-mv $RPM_BUILD_ROOT%{_sysconfdir}/sphinx.conf{.dist,}
+rm $RPM_BUILD_ROOT%{_sysconfdir}/example.sql
+rm $RPM_BUILD_ROOT%{_sysconfdir}/sphinx.conf.dist
+
+# create default config with no index definition
+sed -e '/## data source definition/,/## indexer settings/d' sphinx.conf > $RPM_BUILD_ROOT%{_sysconfdir}/sphinx.conf
+
rm $RPM_BUILD_ROOT%{_sysconfdir}/sphinx-min.conf.dist
mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/searchd
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
@@ -226,21 +235,22 @@
%service sphinx restart
%preun
-if [ $1 = 0 ] ; then
+if [ "$1" = 0 ]; then
%service sphinx stop
/sbin/chkconfig --del sphinx
fi
%files
%defattr(644,root,root,755)
-%doc doc/sphinx.txt example.sql
+%doc doc/sphinx.txt example.sql sphinx.conf sphinx-min.conf
+%dir %{_sysconfdir}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sphinx.conf
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
%attr(755,root,root) %{_bindir}/indexer
%attr(755,root,root) %{_bindir}/indextool
%attr(755,root,root) %{_bindir}/search
%attr(755,root,root) %{_bindir}/spelldump
%attr(755,root,root) %{_sbindir}/searchd
-%attr(754,root,root) /etc/rc.d/init.d/%{name}
%files -n libsphinxclient
%defattr(644,root,root,755)
@@ -278,6 +288,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.24 2010/04/12 11:28:30 glen
+- package clean config
+
Revision 1.23 2010/03/30 22:24:28 glen
- add sphinx user, add build fix patch
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/sphinx/sphinx.spec?r1=1.23&r2=1.24&f=u
More information about the pld-cvs-commit
mailing list