commit 3a4dd53321dbd4badaac3b5b0c94e069b20d3222
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Apr 14 11:52:02 2013 +0300

    new, version 1.0.0
    
    based on phorum-mod-sphinx_search package

 phorum-mod-solr_search.spec | 63 +++++++++++++++++++++++++++++++++++++++++++++
 use-json-ext.patch          | 21 +++++++++++++++
 2 files changed, 84 insertions(+)
---
diff --git a/phorum-mod-solr_search.spec b/phorum-mod-solr_search.spec
new file mode 100644
index 0000000..99237a3
--- /dev/null
+++ b/phorum-mod-solr_search.spec
@@ -0,0 +1,63 @@
+# TODO
+# - imho the code needs to be reviewed is the data properly escaped when 
creating XML manually
+%define                php_min_version 5.0.0
+%define                module          solr_search
+%include       /usr/lib/rpm/macros.php
+Summary:       SolR Fulltext-Search Module
+Name:          phorum-mod-%{module}
+Version:       1.0.0
+Release:       1
+License:       Apache-like
+Group:         Applications/WWW
+Source0:       
http://www.phorum.org/phorum5/file.php/62/3360/solr_search_%{version}.tar.gz
+# Source0-md5: a0b1a7e0135fcbc97eeed874376a00c2
+Patch0:                use-json-ext.patch
+URL:           http://www.phorum.org/phorum5/read.php?62,137055
+BuildRequires: rpm-php-pearprov
+BuildRequires: rpmbuild(macros) >= 1.553
+Requires:      phorum >= 5.2
+Requires:      php(date)
+Requires:      php(json)
+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
+This module uses the solr fulltext search engine to gather the results
+of the phorum-search.
+
+%prep
+%setup -qc
+mv %{module}/* .
+%undos -f php,txt README Changelog
+%patch0 -p1
+
+# we use json ext
+%{__rm} json.php
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{moduledir}
+cp -p *.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
diff --git a/use-json-ext.patch b/use-json-ext.patch
new file mode 100644
index 0000000..e99def6
--- /dev/null
+++ b/use-json-ext.patch
@@ -0,0 +1,21 @@
+--- phorum-mod-solr_search-1.0.0/solr_search.php~      2009-03-09 
12:29:29.000000000 +0200
++++ phorum-mod-solr_search-1.0.0/solr_search.php       2013-04-14 
11:41:27.861514529 +0300
+@@ -159,17 +159,3 @@
+    }
+    return $response;
+ }
+-
+-if(!function_exists("json_decode"))
+-{
+-      require_once("./mods/solr_search/json.php");
+-      
+-      function json_decode($object)
+-      {
+-              $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
+-      
+-              return $json->decode( $object ); 
+-      }
+-}
+-
+-?>
+\ No newline at end of file
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/phorum-mod-solr_search.git/commitdiff/3a4dd53321dbd4badaac3b5b0c94e069b20d3222

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to