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 Patch0: %{name}-DESTDIR.patch
17 Patch1: %{name}-Mysql-pld.patch
18 URL: http://www.mnogosearch.ru/
19 BuildRequires: autoconf
20 BuildRequires: automake
21 BuildRequires: libtool
22 %{?_with_mysql:BuildRequires: mysql-devel}
23 BuildRequires: openssl-devel
24 %{?_with_pgsql:BuildRequires: postgresql-devel}
26 %{?_with_pgsql:Prereq: postgresql-clients}
27 Requires(post): /sbin/ldconfig
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _sysconfdir /etc/%{name}
31 %define _localstatedir /var/lib/mnogosearch
32 %define htmldir /home/httpd/html
33 %define cgidir /home/httpd/cgi-bin
36 The mnogosearch system is a complete world wide web indexing and
37 searching system for a small domain or intranet. This system is not
38 meant to replace the need for powerful internet-wide search systems
39 like Lycos, Infoseek, Webcrawler and AltaVista. Instead it is meant to
40 cover the search needs for a single company, campus, or even a
41 particular sub section of a web site. Features:
44 - http: (and ftp: - via proxy) URL schemaa
47 - support for ssl (https://)
48 - limiting queries to one hostname by sth like this:
49 <INPUT TYPE=HIDDEN NAME=ul VALUE=http://www.something.com/>
50 - it's posilble to run indexers on several diffrent (theoreticaly 128)
51 hosts, and gather information on one of them, reindexing proceses make
52 no harm to avalibility of search engine. See cachemode.txt
54 As opposed to some WAIS-based or web-server based search engines,
55 mnogsearch can span several web servers at a site. The type of these
56 different web servers doesn't matter as long as they understand the
57 HTTP 1.0 protocol. Mnogosearch supports also virtual domains.
60 Mnogosearch jest kompletnym systemem indeksuj±cym i przeszukuj±cym www
61 dla ma³ych domen oraz intranetu. System nie zosta³ opracowany jako
62 wielki system typu Lycos, Infoseek WebCrawler i AltaVista. Natomiast
63 nadaje siê do zastosowania w pojedynczej firmie, kampusie lub
64 jakiejkolwiek stronie www. Zalety:
65 - przeszukiwaie tagów mp3,
66 - niusów (Server news://localhost/pl/),
67 - htdb czyli baz danych udostêpnianych przez www/cgi. (HTDBList SELECT \
68 concat("http://search.mnogo.ru/board/message.php?id=",id) \
69 FROM udm.messages LIMIT 2))
70 - zawarto¶ci serwerów ftp (rada za 2gr: "Index no" dla serwera ftp
71 spowoduje nie indexowanie *zawarto¶ci* plików na nim siê znajduj±cych)
72 - wyszukiwanie w zwyk³ych URL-ach http://
73 - wsparcie dla SSL (https://)
74 - wyszukiwanie w mirrorach (równie¿ lokalnych) odleg³ych sieci
75 - zgadywanie zestawu znaków
76 - zewnêtrzne przetwarzacze dokumentów na potrzeby indeksowania
77 - ograniczanie zapytañ do jednej nazwy hosta:
78 <INPUT TYPE=HIDDEN NAME=ul VALUE=http://www.something.com/>
79 - kategoryzacja witryny (doc/categories.txt)
80 - mo¿liwe jest uruchomienie kilku procesów indeksuj±cych na kilku
81 (teoretycznie 128) hostach i trzymanie bazy na jednym z nich,
82 reindeksacja nie powoduje wtedy niedostêpno¶ci wyszukiwarki.
83 Przeczytaj cachemode.txt
85 W odró¿nieniu od innych systemów bazuj±cych na WAIS-ie lub serwerach
86 www, mnogosearch mo¿e ³±czyæ kilka serwerów www w jednym miejscu. Typ
87 serwera nie ma znaczenia, dopóki pracuje on zgodnie z protoko³em HTTP
88 1.0. Pakiet wspó³pracuje równie¿ z domenami wirtualnymi.
91 Summary: Include files for mnogosearch
92 Summary(pl): Pliki nag³ówkowe mnogosearch
93 Group: Development/Libraries
94 Requires: %{name} = %{version}
97 This package contains mnogosearch development files.
99 %description devel -l pl
100 Pliki dla programistów u¿ywaj±cych mnogosearch.
103 Summary: mnogosearch static libraries
104 Summary(pl): Biblioteki statyczne mnogosearch
105 Group: Development/Libraries
106 Requires: %{name}-devel = %{version}
109 This package contains static libraries of mnogosearch.
111 %description static -l pl
112 Ten pakiet zawiera statyczne biblioteki mnogosearch.
115 Summary: pgsql storage-support for mnogosearch
116 Summary(pl): Obs³uga przechowywania danych w bazie PostgreSQL
117 Group: Networking/Utilities
118 Requires: %{name} = %{version}
121 This package contains PostgreSQL storage support.
123 Note: install will try to create tables in database mnogosearch.
125 %description pgsql -l pl
126 Ten pakiet zawiera obs³ugê baz PostgreSQL do przechowywania
129 Instalacja tego pakietu spowoduje za³o¿enie tabel w bazie mnogosearch.
137 libtoolize --copy --force
144 %{?_with_mysql: db="--with-mysql"}
145 %{?_with_pgsql: db="--with-pgsql"}
149 --enable-syslog=LOG_LOCAL6 \
150 --with-image-dir=/home/httpd/html/%{name} \
151 --with-cgi-bin-dir=/home/httpd/cgi-bin \
152 --with-search-dir=/home/httpd/html \
153 --with-config-dir=%{_sysconfdir}/http/%{name} \
156 --enable-linux-pthreads \
157 --enable-charset-guesser \
158 --enable-news-extension \
167 # enable automatic Russian charset guesser :-]
168 # wy uze www.linux.ru procitacli sewodnja?
170 # --with-iodbc[=DIR] Include iODBC support. DIR is the iODBC base
171 # --with-unixODBC[=DIR] Include unixODBC support. DIR is the unixODBC base
172 # --with-solid[=DIR] Include Solid support. DIR is the Solid base
173 # --with-openlink[=DIR] Include OpenLink ODBC support.
174 # --with-easysoft[=DIR] Include EasySoft ODBC support.
175 # --with-sapdb[=DIR] Include SAPDB support. DIR is the SAPDB base
176 # --with-ibase[=DIR] Include InterBase support. DIR is the InterBase
177 # --with-oracle7[=DIR] Include Oracle 7.3 support. DIR is the Oracle
178 # --with-oracle8[=DIR] Include Oracle8 support. DIR is the Oracle
179 # --with-oracle8i[=DIR] Include Oracle8i support. DIR is the Oracle
181 # FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME
184 rm -rf $RPM_BUILD_ROOT
185 install -d $RPM_BUILD_ROOT{%{_localstatedir},%{htmldir},%{cgidir},%{_sysconfdir}} \
186 $RPM_BUILD_ROOT{/etc/cron.daily,%{_infodir}}
189 DESTDIR=$RPM_BUILD_ROOT
191 ln -sf %{_sbindir}/indexer \
192 $RPM_BUILD_ROOT/etc/cron.daily/mnogo-dbgen
194 ln -sf %{_defaultdocdir}/%{name}-%{version}/html \
195 $RPM_BUILD_ROOT%{htmldir}/mnogodoc
197 mv -f $RPM_BUILD_ROOT%{_bindir}/*.cgi \
198 $RPM_BUILD_ROOT/home/httpd/cgi-bin
200 (cd $RPM_BUILD_ROOT%{_sysconfdir}
203 mv -f $f `basename $f -dist`
208 $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-gethostnames
210 install %{SOURCE2} create/mysql/mnogosearch-all.sql
212 cat > create/pgsql/mnogosearch-all.sql <<EOF
214 CREATE DATABASE mnogosearch;
217 cat create/pgsql/{create,crc-multi,news-extension}.txt \
218 >> create/pgsql/mnogosearch-all.sql
219 cat >> create/pgsql/mnogosearch-all.sql <<EOF
220 CREATE USER "mnogosearch" WITH PASSWORD 'aqq123' NOCREATEDB NOCREATEUSER;
221 GRANT ALL ON url,dict,robots,stopword,categories,next_url_id,affix TO mnogosearch;
222 GRANT ALL ON ndict,server,thread,spell,next_cat_id,next_server_id,next_url_id TO mnogosearch;
223 GRANT ALL ON ndict2,ndict3,ndict4,ndict5,ndict6,ndict7,ndict8,ndict9,
224 ndict10,ndict11,ndict12,ndict16,ndict32 TO mnogosearch;
225 GRANT ALL ON dict2,dict3,dict4,dict5,dict6,dict7,dict8,dict9,dict10,
226 dict11,dict12,dict16,dict32 TO mnogosearch;
227 GRANT ALL ON "qtrack" TO mnogosearch;
230 gzip -9nf ChangeLog README TODO
232 mv -f doc/*.html html
233 rm -rf doc/samples/CVS create/CVS create/*/CVS
236 rm -rf $RPM_BUILD_ROOT
241 Please see docs (%{_defaultdocdir}/%{name}-%{version} or http://localhost/mnogodoc),
242 then read how to setup db connection, and put line like this
243 "pgsql://user:password@/dbname/" into %{_sysconfdir}, then setup database
244 by something like "psql < %{_defaultdocdir}/%{name}-%{version}/create/pgsql/*.txt"
247 %postun -p /sbin/ldconfig
250 echo "Creating database mnogosearch..."
251 su postgres -c "psql -U postgres template1 < %{_docdir}/%{name}-%{version}/create/pgsql/mnogosearch-all.psql"
252 echo "Mnogosearch user was created with passwd aqq123 - change it!"
255 echo -n 'Dropping Database mnogosearch:'
256 su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
259 %defattr(644,root,root,755)
260 %doc *.gz html doc/samples create
261 %attr(755,root,root) %{_libdir}/lib*-*.so
262 %attr(755,root,root) %{_sbindir}/*
263 %attr(755,root,root) %{cgidir}/*
265 %dir %{_localstatedir}
266 %{_localstatedir}/[rst]*
267 %attr(775,root,http) %{_localstatedir}/cache
268 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
269 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
270 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
271 %dir %{_sysconfdir}/langmap
272 %dir %{_sysconfdir}/stopwords
273 %dir %{_sysconfdir}/synonym
274 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*/*
275 %config(noreplace) %attr(750,root,root) /etc/cron.daily/*
279 %defattr(644,root,root,755)
280 %attr (755,root,root) %{_bindir}/udm-config
282 %attr (755,root,root) %{_libdir}/libudmsearch.so
283 %attr (755,root,root) %{_libdir}/lib*.la
286 %defattr(644,root,root,755)