From b5bd282fc10efa3d8aa68e3cbf90d47d509ff788 Mon Sep 17 00:00:00 2001 From: Gerd von Egidy Date: Mon, 31 Jan 2011 11:27:28 +0100 Subject: [PATCH] - 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 --- mnogosearch-3.3.11-prepare-config.patch | 55 +++++++++++++++ mnogosearch-distconfig.patch | 116 +++++++++++++++++++++++++++++++ mnogosearch.spec | 57 +++++----------- 3 files changed, 188 insertions(+), 40 deletions(-) create mode 100644 mnogosearch-3.3.11-prepare-config.patch create mode 100644 mnogosearch-distconfig.patch diff --git a/mnogosearch-3.3.11-prepare-config.patch b/mnogosearch-3.3.11-prepare-config.patch new file mode 100644 index 0000000..f2d31f9 --- /dev/null +++ b/mnogosearch-3.3.11-prepare-config.patch @@ -0,0 +1,55 @@ +commit 88ae39c72f464ce81b8eeea55bffc585807197be +Author: bar +Date: Fri Jan 28 17:39:36 2011 +0000 + + - Moving Disallow commands for doc, pdf, ppt, xls, rtf + on separate lines, to uncomment easier. + - Adding unrtf + +diff --git a/etc/indexer.conf-dist b/etc/indexer.conf-dist +index 798f0f7..a8eb757 100644 +--- a/etc/indexer.conf-dist ++++ b/etc/indexer.conf-dist +@@ -308,6 +308,13 @@ DBAddr mysql://root@localhost/test/?dbmode=blob + # special meaning in "string" match, so we have to use "regex" match here: + #Disallow Regex \? + ++# Disallow document extensions that are not understood by default. ++# Comment these lines if you have corresponding external parsers. ++Disallow *.rtf ++Disallow *.doc ++Disallow *.xls ++Disallow *.ppt ++Disallow *.pdf + + # Exclude some known extensions using fast "String" match: + Disallow *.b *.sh *.md5 *.rpm +@@ -318,9 +325,9 @@ Disallow *.vdo *.mpeg *.mpe *.mpg *.avi *.movie *.mov *.wmv + Disallow *.mid *.mp3 *.rm *.ram *.wav *.aiff *.ra + Disallow *.vrml *.wrl *.png *.ico *.psd *.dat + Disallow *.exe *.com *.cab *.dll *.bin *.class *.ex_ +-Disallow *.tex *.texi *.xls *.doc *.texinfo +-Disallow *.rtf *.pdf *.cdf *.ps +-Disallow *.ai *.eps *.ppt *.hqx ++Disallow *.tex *.texi *.texinfo ++Disallow *.cdf *.ps ++Disallow *.ai *.eps *.hqx + Disallow *.cpt *.bms *.oda *.tcl + Disallow *.o *.a *.la *.so + Disallow *.pat *.pm *.m4 *.am *.css +@@ -484,6 +491,7 @@ AddType text/rtf *.rtf + AddType application/pdf *.pdf + AddType application/msword *.doc + AddType application/vnd.ms-excel *.xls ++AddType application/vnd.ms-powerpoint *.ppt + AddType text/x-postscript *.ps + + +@@ -531,6 +539,7 @@ AddType application/unknown *.* + #Mime application/vnd.ms-excel text/html "xlhtml $1" + #Mime "text/rtf*" text/html "rthc --use-stdout $1 2>/dev/null" + #Mime "text/rtf*" text/xml "rtfx -w $1 2>/dev/null" ++#Mime "text/rtf*" text/html "unrtf --html $1" + #Mime application/vnd.ms-powerpoint "text/html; charset=utf-8" "pptohtml $1" + #Mime application/vnd.ms-powerpoint text/html "ppthtml $1" + diff --git a/mnogosearch-distconfig.patch b/mnogosearch-distconfig.patch new file mode 100644 index 0000000..a35443a --- /dev/null +++ b/mnogosearch-distconfig.patch @@ -0,0 +1,116 @@ +diff -r -u mnogosearch-3.3.11.orig/etc/indexer.conf-dist mnogosearch-3.3.11/etc/indexer.conf-dist +--- mnogosearch-3.3.11.orig/etc/indexer.conf-dist 2011-01-31 11:06:27.000000000 +0100 ++++ mnogosearch-3.3.11/etc/indexer.conf-dist 2011-01-31 11:15:30.000000000 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/local/mnogosearch/sbin/indexer -d ++#!/usr/bin/indexer -d + + ########################################################################### + # This is a sample indexer config file. +@@ -49,7 +49,7 @@ + # then PostgreSQL will not work via TCP, but will use Unix socket. + # + +-DBAddr mysql://root@localhost/test/?dbmode=blob ++DBAddr sqlite3://localhost/var/lib/mnogosearch/default.db/?dbmode=blob + + + +@@ -139,7 +139,7 @@ + #LocalCharset Shift-JIS + + # Full UNICODE +-#LocalCharset UTF-8 ++LocalCharset UTF-8 + + ####################################################################### + #ForceIISCharset1251 yes/no +@@ -169,7 +169,7 @@ + # + #StopwordFile stopwords/en.sl + +-#Include stopwords.conf ++Include stopwords.conf + + + ########################################################################### +@@ -180,7 +180,7 @@ + # + #LangMapFile langmap/en.ascii.lm + +-#Include langmap.conf ++Include langmap.conf + + + ####################################################################### +@@ -310,11 +310,11 @@ + + # Disallow document extensions that are not understood by default. + # Comment these lines if you have corresponding external parsers. +-Disallow *.rtf +-Disallow *.doc +-Disallow *.xls +-Disallow *.ppt +-Disallow *.pdf ++#Disallow *.rtf ++#Disallow *.doc ++#Disallow *.xls ++#Disallow *.ppt ++#Disallow *.pdf + + # Exclude some known extensions using fast "String" match: + Disallow *.b *.sh *.md5 *.rpm +@@ -531,16 +531,16 @@ + # from_mime to_mime[charset] [command line [$1]] + # + #Mime application/msword "text/plain; charset=utf-8" "catdoc -a -dutf-8 $1" +-#Mime application/msword "text/html; charset=utf-8" "wvHtml --charset=utf-8 $1 -" ++Mime application/msword "text/html; charset=utf-8" "wvHtml --charset=utf-8 $1 -" + #Mime application/x-troff-man text/plain "deroff" + #Mime text/x-postscript text/plain "ps2ascii" +-#Mime application/pdf text/plain "pdftotext $1 -" ++Mime application/pdf "text/plain; charset=utf-8" "pdftotext $1 -" + #Mime application/vnd.ms-excel text/plain "xls2csv $1" +-#Mime application/vnd.ms-excel text/html "xlhtml $1" ++Mime application/vnd.ms-excel "text/html; charset=utf-8" "xlhtml $1" + #Mime "text/rtf*" text/html "rthc --use-stdout $1 2>/dev/null" + #Mime "text/rtf*" text/xml "rtfx -w $1 2>/dev/null" +-#Mime "text/rtf*" text/html "unrtf --html $1" +-#Mime application/vnd.ms-powerpoint "text/html; charset=utf-8" "pptohtml $1" ++Mime "text/rtf*" "text/html; charset=utf-8" "unrtf --html $1" ++Mime application/vnd.ms-powerpoint "text/html; charset=utf-8" "ppthtml $1" + #Mime application/vnd.ms-powerpoint text/html "ppthtml $1" + + +@@ -975,7 +975,7 @@ + # Default value is "path". + # + # To index whole server "localhost": +-#Server http://localhost/ ++Server http://localhost/ + # + # You can also specify some path to index subdirectory only: + #Server http://localhost/subdir/ +diff -r -u mnogosearch-3.3.11.orig/etc/search.htm-dist mnogosearch-3.3.11/etc/search.htm-dist +--- mnogosearch-3.3.11.orig/etc/search.htm-dist 2011-01-27 16:10:07.000000000 +0100 ++++ mnogosearch-3.3.11/etc/search.htm-dist 2011-01-31 11:17:04.000000000 +0100 +@@ -13,7 +13,7 @@ +