3 # _with_pgsql support for postgres
4 # _with_mysql support for mysql
6 Summary: Another one web indexing and searching system for a small domain or intranet
7 Summary(pl): Kolejny System indeksowania i przeszukiwania www dla ma³ych domen i intranetu
12 Group: Networking/Utilities
13 Source0: http://www.mnogosearch.ru/Download/%{name}-%{version}.tar.gz
14 Source1: %{name}-gethostnames
15 Source2: %{name}-Mysql-database
16 Source3: %{name}-stored.init
17 Patch0: %{name}-DESTDIR.patch
18 Patch1: %{name}-Mysql-pld.patch
19 Patch2: %{name}-stored-dirs_1.patch
20 URL: http://www.mnogosearch.ru/
21 BuildRequires: autoconf
22 BuildRequires: automake
23 BuildRequires: libtool
24 %{?_with_mysql:BuildRequires: mysql-devel}
25 BuildRequires: openssl-devel
26 %{?_with_pgsql:BuildRequires: postgresql-devel}
28 %{?_with_pgsql:Prereq: postgresql-clients}
29 Requires: %{name}-lib = %{version}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _sysconfdir /etc/%{name}
35 %define _localstatedir /var/lib/mnogosearch
36 %define htmldir /home/services/httpd/html
37 %define cgidir /home/services/httpd/cgi-bin
40 The mnogosearch system is a complete world wide web indexing and
41 searching system for a small domain or intranet. This system is not
42 meant to replace the need for powerful internet-wide search systems
43 like Lycos, Infoseek, Webcrawler and AltaVista. Instead it is meant to
44 cover the search needs for a single company, campus, or even a
45 particular sub section of a web site. Features:
48 - http: (and ftp: - via proxy) URL schemaa
51 - support for ssl (https://)
52 - limiting queries to one hostname by sth like this: <INPUT
53 TYPE=HIDDEN NAME=ul VALUE=http://www.something.com/>
54 - it's posilble to run indexers on several diffrent (theoreticaly 128)
55 hosts, and gather information on one of them, reindexing proceses make
56 no harm to avalibility of search engine. See cachemode.txt
58 As opposed to some WAIS-based or web-server based search engines,
59 mnogsearch can span several web servers at a site. The type of these
60 different web servers doesn't matter as long as they understand the
61 HTTP 1.0 protocol. Mnogosearch supports also virtual domains.
64 Mnogosearch jest kompletnym systemem indeksuj±cym i przeszukuj±cym www
65 dla ma³ych domen oraz intranetu. System nie zosta³ opracowany jako
66 wielki system typu Lycos, Infoseek WebCrawler i AltaVista. Natomiast
67 nadaje siê do zastosowania w pojedynczej firmie, kampusie lub
68 jakiejkolwiek stronie www. Zalety:
69 - przeszukiwaie tagów mp3,
70 - niusów (Server news://localhost/pl/),
71 - htdb czyli baz danych udostêpnianych przez www/cgi. (HTDBList SELECT
72 \ concat("http://search.mnogo.ru/board/message.php?id=",id) \ FROM
73 udm.messages LIMIT 2))
74 - zawarto¶ci serwerów ftp (rada za 2gr: "Index no" dla serwera ftp
75 spowoduje nie indexowanie *zawarto¶ci* plików na nim siê znajduj±cych)
76 - wyszukiwanie w zwyk³ych URL-ach http://
77 - wsparcie dla SSL (https://)
78 - wyszukiwanie w mirrorach (równie¿ lokalnych) odleg³ych sieci
79 - zgadywanie zestawu znaków
80 - zewnêtrzne przetwarzacze dokumentów na potrzeby indeksowania
81 - ograniczanie zapytañ do jednej nazwy hosta: <INPUT TYPE=HIDDEN
82 NAME=ul VALUE=http://www.something.com/>
83 - kategoryzacja witryny (doc/categories.txt)
84 - mo¿liwe jest uruchomienie kilku procesów indeksuj±cych na kilku
85 (teoretycznie 128) hostach i trzymanie bazy na jednym z nich,
86 reindeksacja nie powoduje wtedy niedostêpno¶ci wyszukiwarki.
87 Przeczytaj cachemode.txt
89 W odró¿nieniu od innych systemów bazuj±cych na WAIS-ie lub serwerach
90 www, mnogosearch mo¿e ³±czyæ kilka serwerów www w jednym miejscu. Typ
91 serwera nie ma znaczenia, dopóki pracuje on zgodnie z protoko³em HTTP
92 1.0. Pakiet wspó³pracuje równie¿ z domenami wirtualnymi.
95 Summary: mnogosearch library
96 Summary(pl): Biblioteka mnogosearch
98 Requires(post): /sbin/ldconfig
101 This package contains mnogosearch library files.
103 %description lib -l pl
104 Ten pakiet zawiera pliki biblioteki mnogosearch.
107 Summary: Include files for mnogosearch
108 Summary(pl): Pliki nag³ówkowe mnogosearch
109 Group: Development/Libraries
110 Requires: %{name}-lib = %{version}
113 This package contains mnogosearch development files.
115 %description devel -l pl
116 Pliki dla programistów u¿ywaj±cych mnogosearch.
119 Summary: mnogosearch static libraries
120 Summary(pl): Biblioteki statyczne mnogosearch
121 Group: Development/Libraries
122 Requires: %{name}-devel = %{version}
125 This package contains static libraries of mnogosearch.
127 %description static -l pl
128 Ten pakiet zawiera statyczne biblioteki mnogosearch.
131 Summary: pgsql storage-support for mnogosearch
132 Summary(pl): Obs³uga przechowywania danych w bazie PostgreSQL
133 Group: Networking/Utilities
134 Requires: %{name} = %{version}
137 This package contains PostgreSQL storage support.
139 Note: install will try to create tables in database mnogosearch.
141 %description pgsql -l pl
142 Ten pakiet zawiera obs³ugê baz PostgreSQL do przechowywania
145 Instalacja tego pakietu spowoduje za³o¿enie tabel w bazie mnogosearch.
148 Summary: Deamon for saving gziped versions of documents
149 Summary(pl): Demon zapisuj±cy zgzipowane wersje dokumentów
150 Group: Development/Libraries
151 Requires: %{name} = %{version}
154 This package contains optional part of mnogosearch stored daemon,
155 which stores locally gziped versions of parsed (& indexed) html files,
158 %description stored -l pl
159 Pakiet zawiera opcjonaln± czê¶æ mnogosearch demon stored, zajmuj±cy
160 siê lokalnym przechowywaniem przetworzonych (i zindeksowanych)
161 spakowanych wersji plików html, artyku³ów usenetu, itp.
170 find . -type d -name CVS | xargs rm -rf
179 %{?_with_mysql: db="--with-mysql"}
180 %{?_with_pgsql: db="--with-pgsql"}
184 --enable-syslog=LOG_LOCAL6 \
185 --with-image-dir=%{htmldir}/%{name} \
186 --with-cgi-bin-dir=%{cgidir} \
187 --with-search-dir=%{htmldir} \
188 --with-config-dir=%{_sysconfdir}/http/%{name} \
191 --enable-linux-pthreads \
192 --enable-charset-guesser \
193 --enable-news-extension \
204 # enable automatic Russian charset guesser :-]
205 # wy uze www.linux.ru procitacli sewodnja?
207 # --with-iodbc[=DIR] Include iODBC support. DIR is the iODBC base
208 # --with-unixODBC[=DIR] Include unixODBC support. DIR is the unixODBC base
209 # --with-solid[=DIR] Include Solid support. DIR is the Solid base
210 # --with-openlink[=DIR] Include OpenLink ODBC support.
211 # --with-easysoft[=DIR] Include EasySoft ODBC support.
212 # --with-sapdb[=DIR] Include SAPDB support. DIR is the SAPDB base
213 # --with-ibase[=DIR] Include InterBase support. DIR is the InterBase
214 # --with-oracle7[=DIR] Include Oracle 7.3 support. DIR is the Oracle
215 # --with-oracle8[=DIR] Include Oracle8 support. DIR is the Oracle
216 # --with-oracle8i[=DIR] Include Oracle8i support. DIR is the Oracle
218 # FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME
221 rm -rf $RPM_BUILD_ROOT
222 install -d $RPM_BUILD_ROOT{%{_localstatedir},%{htmldir},%{cgidir},%{_sysconfdir}} \
223 $RPM_BUILD_ROOT{/etc/cron.daily,%{_infodir}}
226 DESTDIR=$RPM_BUILD_ROOT
228 ln -sf %{_sbindir}/indexer \
229 $RPM_BUILD_ROOT/etc/cron.daily/mnogo-dbgen
231 ln -sf %{_defaultdocdir}/%{name}-%{version}/html \
232 $RPM_BUILD_ROOT%{htmldir}/mnogodoc
234 mv -f $RPM_BUILD_ROOT%{_bindir}/*.cgi \
235 $RPM_BUILD_ROOT%{cgidir}
237 (cd $RPM_BUILD_ROOT%{_sysconfdir}
240 mv -f $f `basename $f -dist`
245 $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-gethostnames
246 install -d $RPM_BUILD_ROOT/usr/src/example/mnogosearch
247 install %{SOURCE2} $RPM_BUILD_ROOT/usr/src/example/mnogosearch/mysql.sql
249 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
250 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/mnogosearch-stored
252 cat > $RPM_BUILD_ROOT/usr/src/example/mnogosearch/pg-sql.sql <<EOF
254 CREATE DATABASE mnogosearch;
257 cat pgsql/{create,crc-multi,news-extension}.txt >> pgsql/mnogosearch-all.sql
258 cat >> pgsql/mnogosearch-all.sql <<EOF
259 CREATE USER "mnogosearch" WITH PASSWORD 'aqq123' NOCREATEDB NOCREATEUSER;
260 GRANT ALL ON url,dict,robots,stopword,categories,next_url_id,affix TO mnogosearch;
261 GRANT ALL ON ndict,server,thread,spell,next_cat_id,next_server_id,next_url_id TO mnogosearch;
262 GRANT ALL ON ndict2,ndict3,ndict4,ndict5,ndict6,ndict7,ndict8,ndict9,
263 ndict10,ndict11,ndict12,ndict16,ndict32 TO mnogosearch;
264 GRANT ALL ON dict2,dict3,dict4,dict5,dict6,dict7,dict8,dict9,dict10,
265 dict11,dict12,dict16,dict32 TO mnogosearch;
266 GRANT ALL ON "qtrack" TO mnogosearch;
270 mv -f doc/*.html html
273 rm -rf $RPM_BUILD_ROOT
277 Please see docs (%{_defaultdocdir}/%{name}-%{version} or http://localhost/mnogodoc),
278 then read how to setup db connection, and put line like this
279 "pgsql://user:password@/dbname/" into %{_sysconfdir}, then setup database
280 by something like "psql < %{_defaultdocdir}/%{name}-%{version}/create/pgsql/*.txt"
283 %postun lib -p /sbin/ldconfig
284 %post lib -p /sbin/ldconfig
287 echo "Creating database mnogosearch..."
288 su postgres -c "psql -U postgres template1 < %{_docdir}/%{name}-%{version}/create/pgsql/mnogosearch-all.psql"
289 echo "Mnogosearch user was created with passwd aqq123 - change it!"
292 echo -n 'Dropping Database mnogosearch:'
293 su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
296 %defattr(644,root,root,755)
297 %doc ChangeLog README TODO html doc/samples
298 # instructions for database creation
299 %doc db2 ibase msql mysql oracle pgsql sapdb solid sybase virtuoso
300 %attr(755,root,root) %{_sbindir}/[^s]*
301 %attr(755,root,root) %{_sbindir}/s[^t]*
302 %attr(755,root,root) %{cgidir}/*
304 %dir %{_localstatedir}
305 %{_localstatedir}/raw
306 %{_localstatedir}/splitter
307 %{_localstatedir}/tree
308 %attr(775,root,http) %{_localstatedir}/cache
309 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
310 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
311 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
312 %dir %{_sysconfdir}/langmap
313 %dir %{_sysconfdir}/stopwords
314 %dir %{_sysconfdir}/synonym
315 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*/*
316 %config(noreplace) %attr(750,root,root) /etc/cron.daily/*
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/lib*-*.so
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_bindir}/udm-config
327 %attr(755,root,root) %{_libdir}/libudmsearch.so
331 %defattr(644,root,root,755)
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_sbindir}/stored
337 %{_localstatedir}/store
338 /etc/rc.d/init.d/mnogosearch-stored