- add dist-tag to the release
authorGerd von Egidy <gerd.von.egidy@intra2net.com>
Tue, 1 Feb 2011 15:52:00 +0000 (16:52 +0100)
committerGerd von Egidy <gerd.von.egidy@intra2net.com>
Tue, 1 Feb 2011 15:52:00 +0000 (16:52 +0100)
- add conditionals to allow building on RHEL 5 too

mnogosearch.spec

index fe509a3..728a785 100644 (file)
@@ -11,7 +11,7 @@
 Summary:        Web indexing and search system for a small domain or intranet
 Name:           mnogosearch
 Version:        3.3.11
-Release:        4
+Release:        5%{?dist}
 License:        GPLv2+
 Group:          Applications/Internet
 URL:            http://www.mnogosearch.org/
@@ -34,10 +34,15 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires:       %{name}-libs = %{version}-%{release}
 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/pdftohtml
 Requires:       /usr/bin/unrtf
+%endif
+
 Requires(pre):  shadow-utils
 
 # user "apache" is added to mnogosearch group so we need the user to be present
@@ -61,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
@@ -141,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 \
@@ -166,6 +176,13 @@ for f in *-dist ; do
 done
 )
 
+%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
 mv -f %{buildroot}%{_bindir}/*.cgi %{buildroot}%{_libexecdir}/mnogosearch/
@@ -308,6 +325,10 @@ 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