packages: phorum-mod-sphinx_search/paths.patch (NEW), phorum-mod-sphinx_sea...
glen
glen at pld-linux.org
Tue Mar 30 23:45:01 CEST 2010
Author: glen Date: Tue Mar 30 21:45:01 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- new, needs testing
---- Files affected:
packages/phorum-mod-sphinx_search:
paths.patch (NONE -> 1.1) (NEW), phorum-mod-sphinx_search.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/phorum-mod-sphinx_search/paths.patch
diff -u /dev/null packages/phorum-mod-sphinx_search/paths.patch:1.1
--- /dev/null Tue Mar 30 23:45:01 2010
+++ packages/phorum-mod-sphinx_search/paths.patch Tue Mar 30 23:44:56 2010
@@ -0,0 +1,46 @@
+--- phorum-mod-sphinx_search-1.0.0/settings.php~ 2010-03-30 17:45:42.000000000 +0300
++++ phorum-mod-sphinx_search-1.0.0/settings.php 2010-03-30 17:49:15.659963871 +0300
+@@ -1,7 +1,7 @@
+ <?php
+ if (!defined("PHORUM_ADMIN")) return;
+
+- require_once("./mods/sphinx_search/defaults.php");
++ require_once 'defaults.php';
+
+ // save settings
+ if (count($_POST))
+@@ -28,7 +28,7 @@
+ <br style="clear:both" />
+ <?php
+
+- include_once "./include/admin/PhorumInputForm.php";
++ include_once PHORUM_INCLUDES_DIR.'/admin/PhorumInputForm.php';
+ $frm = new PhorumInputForm ("", "post", "Save");
+ $frm->hidden("module", "modsettings");
+ $frm->hidden("mod", "sphinx_search");
+--- phorum-mod-sphinx_search-1.0.0/sphinx_search.php~ 2010-03-30 17:45:42.000000000 +0300
++++ phorum-mod-sphinx_search-1.0.0/sphinx_search.php 2010-03-30 17:50:12.391868639 +0300
+@@ -15,13 +15,13 @@
+
+ if (!defined("PHORUM")) return;
+
+-require_once("./mods/sphinx_search/defaults.php");
++require_once 'defaults.php';
+
+ function sphinx_search_action($arrSearch)
+ {
+ global $PHORUM;
+
+- include './mods/sphinx_search/sphinxclient.php';
++ require_once 'sphinxapi.php';
+
+ // these are the index-names set in sphinx.conf - one for searching messages, the other for searching by authors only
+ // both contain an additional index for the deltas - changes done after the last full reindex
+@@ -147,6 +147,3 @@
+
+ return $arrSearch;
+ }
+-
+-
+-?>
+\ No newline at end of file
================================================================
Index: packages/phorum-mod-sphinx_search/phorum-mod-sphinx_search.spec
diff -u /dev/null packages/phorum-mod-sphinx_search/phorum-mod-sphinx_search.spec:1.1
--- /dev/null Tue Mar 30 23:45:01 2010
+++ packages/phorum-mod-sphinx_search/phorum-mod-sphinx_search.spec Tue Mar 30 23:44:56 2010
@@ -0,0 +1,73 @@
+# $Revision$, $Date$
+%include /usr/lib/rpm/macros.php
+%define php_min_version 5.0.0
+%define module sphinx_search
+Summary: Sphinx Fulltext-Search Module
+Name: phorum-mod-%{module}
+Version: 1.0.0
+Release: 0.1
+License: Apache-like
+Group: Applications/WWW
+Source0: http://www.phorum.org/phorum5/file.php/download/62/3354/sphinx_search_%{version}.tar.gz
+Patch0: paths.patch
+# Source0-md5: 944211b4f195a538bcb6e2883d2187c5
+URL: http://www.phorum.org/phorum5/read.php?62,136982,138325
+BuildRequires: rpm-php-pearprov
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires: phorum >= 5.2
+Requires: php-date
+Requires: php-pcre
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define modsdir %{_datadir}/phorum/mods
+%define moduledir %{modsdir}/%{module}
+
+# no pear deps
+%define _noautopear pear
+
+# exclude optional php dependencies
+%define _noautophp %{nil}
+
+# put it together for rpmbuild
+%define _noautoreq %{?_noautophp} %{?_noautopear}
+
+%description
+Module for using sphinx as fulltext search-engine instead of phorum
+built-in search.
+
+%prep
+%setup -qc
+mv %{module}/* .
+%{__sed} -i -e 's,\r$,,' *.php *.txt README Changelog
+%patch0 -p1
+
+# php-sphinx
+rm sphinxclient.php
+
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{moduledir}
+cp -a *.txt *.php $RPM_BUILD_ROOT%{moduledir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README Changelog
+%dir %{moduledir}
+%{moduledir}/*.php
+%{moduledir}/info.txt
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/03/30 21:44:56 glen
+- new, needs testing
================================================================
More information about the pld-cvs-commit
mailing list