- add dist-tag to the release
[mnogosearch-rpm] / mnogosearch.spec
index 607a765..728a785 100644 (file)
 Summary:        Web indexing and search system for a small domain or intranet
 Name:           mnogosearch
 Version:        3.3.11
-Release:        1
+Release:        5%{?dist}
 License:        GPLv2+
 Group:          Applications/Internet
 URL:            http://www.mnogosearch.org/
 
-# md5sum 257c6bedb0113667654aaa7c47d0a9b3
+# md5sum 906d5e1e21ba00024574f57548d32029
 Source0:        http://www.mnogosearch.org/Download/mnogosearch-%{version}.tar.gz
 
 Source1:        mnogosearch-reindex
 Source2:        mnogosearch.crond
 Source3:        httpd.conf
 
+# makes adapting the configuration more easy, taken from upstream cvs
+Patch0:         mnogosearch-3.3.11-prepare-config.patch
+
+# modify the default configuration suitable for our distribution
+# distribution-specific, not upstream
+Patch1:         mnogosearch-distconfig.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires:       %{name}-libs = %{version}-%{release}
-Requires:       catdoc
-Requires:       xlhtml
+Requires:       /usr/bin/wvHtml
+Requires:       /usr/bin/pdftohtml
+
+%if !0%{?rhel}
+# these are currently not available on RHEL/EPEL
+Requires:       /usr/bin/xlhtml
+Requires:       /usr/bin/ppthtml
+Requires:       /usr/bin/unrtf
+%endif
+
 Requires(pre):  shadow-utils
 
 # user "apache" is added to mnogosearch group so we need the user to be present
@@ -51,7 +66,10 @@ BuildRequires:  postgresql-devel
 BuildRequires:  freetds-devel
 BuildRequires:  firebird-devel
 BuildRequires:  catdoc
+
+%if !0%{?rhel}
 BuildRequires:  xlhtml
+%endif
 
 # build is done with unit testing by default, but it can be disabled
 # by --without tests to save time
@@ -107,6 +125,9 @@ This package contains the PHP extension for %{name}
 %prep
 %setup -q -n mnogosearch-%{version}
 
+%patch0 -p1
+%patch1 -p1
+
 %build
 autoreconf -fi
 
@@ -128,7 +149,9 @@ autoreconf -fi
     --with-readline \
     --with-extra-charsets=all \
     --with-mysql \
+%if !0%{?rhel}
     --enable-mysql-fulltext-plugin \
+%endif
     --with-pgsql \
     --with-sqlite3 \
     --with-unixODBC \
@@ -153,20 +176,12 @@ for f in *-dist ; do
 done
 )
 
-# fix header of config file
-sed -i 's|/usr/local/mnogosearch/sbin/indexer|%{_bindir}/indexer|g' \
-    %{buildroot}%{_sysconfdir}/mnogosearch/indexer.conf
-
-# change default configuration
-sed -i 's|DBAddr.mysql://root@localhost/test/?dbmode=blob|DBAddr sqlite3://localhost/%{_localstatedir}/lib/mnogosearch/default.db/?dbmode=blob|g' \
-    %{buildroot}%{_sysconfdir}/mnogosearch/indexer.conf \
-    %{buildroot}%{_sysconfdir}/mnogosearch/search.htm \
-
-sed -i 's|#LocalCharset UTF-8|LocalCharset UTF-8|g' \
-    %{buildroot}%{_sysconfdir}/mnogosearch/indexer.conf
-
-sed -i 's|#Server http://localhost/|Server http://localhost/|g' \
-    %{buildroot}%{_sysconfdir}/mnogosearch/indexer.conf
+%if 0%{?rhel}
+# comment out the converters not available on RHEL/EPEL
+sed -i 's|^\(.*xlhtml.*\)$|#\1|g' %{buildroot}%{_sysconfdir}/%{name}/indexer.conf
+sed -i 's|^\(.*ppthtml.*\)$|#\1|g' %{buildroot}%{_sysconfdir}/%{name}/indexer.conf
+sed -i 's|^\(.*unrtf.*\)$|#\1|g' %{buildroot}%{_sysconfdir}/%{name}/indexer.conf
+%endif
 
 # the cgi is no regular binary, move it to libexec
 install -d %{buildroot}%{_libexecdir}/mnogosearch
@@ -310,11 +325,36 @@ service httpd condrestart > /dev/null 2>&1 || :
 %{php_extdir}
 
 %changelog
+* Mon Feb 1 2011 Gerd v. Egidy <gerd@egidy.de> 3.3.11-5
+- add dist-tag to the release
+- add conditionals to allow building on RHEL 5 too
+
+* Mon Feb 1 2011 Gerd v. Egidy <gerd@egidy.de> 3.3.11-4
+- don't use stopwords by default anymore
+- switch from pdftotext to pdftohtml
+- explicit charset not needed for all converters
+
+* Mon Jan 31 2011 Gerd v. Egidy <gerd@egidy.de> 3.3.11-3
+- include upstream-patch to make adapting the config more easy
+- add unrtf to default config and requires
+- modifying the default configuration now done with a patch
+- utf-8 now used in search template too
+- include langmap and stopwords in search template too
+
+* Thu Jan 27 2011 Gerd v. Egidy <gerd@egidy.de> 3.3.11-2
+- last minute-changes in the 3.3.11 release
+- enable some external document helpers by default:
+  we always have them because of requires
+- require the binaries of the helpers used, not the package names
+- use wvHtml instead of catdoc by default: it retains formatting
+- don't disable the file types we now have helpers for
+
 * Thu Jan 27 2011 Gerd v. Egidy <gerd@egidy.de> 3.3.11-1
 - mnogosearch 3.3.11
 - unit testing with two databases
 - require catdoc and xlhtml for install and during build
 - move make check into check-section
+- fix timezone issue with test-blob unit test
 
 * Thu Jan 27 2011 Gerd v. Egidy <gerd@egidy.de> 3.3.10-7.20110127cvs
 - new cvs version with fix for directory names