]> git.pld-linux.org Git - packages/mnogosearch.git/blob - mnogosearch.spec
- up to 3.2.14
[packages/mnogosearch.git] / mnogosearch.spec
1 #
2 # Conditional build:
3 # _with_pgsql   support for postgres
4 # _with_mysql   support for mysql
5 #
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
8 Name:           mnogosearch
9 Version:        3.2.14
10 Release:        1
11 License:        GPL v2+
12 Group:          Networking/Utilities
13 Source0:        http://www.mnogosearch.ru/Download/%{name}-%{version}.tar.gz
14 # Source0-md5:  4849a49f00ea7da6f808cf404be49654
15 Source1:        %{name}-gethostnames
16 Source2:        %{name}-Mysql-database
17 Source3:        %{name}-stored.init
18 Source4:        %{name}-dbgen
19 URL:            http://www.mnogosearch.ru/
20 BuildRequires:  autoconf
21 BuildRequires:  automake
22 BuildRequires:  libtool
23 %{?_with_mysql:BuildRequires:   mysql-devel}
24 BuildRequires:  openssl-devel >= 0.9.7
25 %{?_with_pgsql:BuildRequires:   postgresql-devel}
26 PreReq:         webserver
27 %{?_with_pgsql:PreReq:          postgresql-clients}
28 Requires:       %{name}-lib = %{version}
29 Obsoletes:      udmsearch
30 Obsoletes:      aspseek
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _sysconfdir     /etc/%{name}
34 %define         _localstatedir  /var/lib/mnogosearch
35 %define         htmldir         /home/services/httpd/html
36 %define         cgidir          /home/services/httpd/cgi-bin
37
38 %description
39 The mnogosearch system is a complete world wide web indexing and
40 searching system for a small domain or intranet. This system is not
41 meant to replace the need for powerful internet-wide search systems
42 like Lycos, Infoseek, Webcrawler and AltaVista. Instead it is meant to
43 cover the search needs for a single company, campus, or even a
44 particular sub section of a web site. Features:
45  - mp3 tag info
46  - news searching(?)
47  - http: (and ftp: - via proxy) URL schemaa
48  - charset guesser
49  - externel parsers
50  - support for ssl (https://)
51  - limiting queries to one hostname by sth like this: <INPUT
52    TYPE=HIDDEN NAME=ul VALUE=http://www.something.com/>
53  - it's posilble to run indexers on several diffrent (theoreticaly 128)
54    hosts, and gather information on one of them, reindexing proceses make
55    no harm to avalibility of search engine. See cachemode.txt
56
57 As opposed to some WAIS-based or web-server based search engines,
58 mnogsearch can span several web servers at a site. The type of these
59 different web servers doesn't matter as long as they understand the
60 HTTP 1.0 protocol. Mnogosearch supports also virtual domains.
61
62 %description -l pl
63 Mnogosearch jest kompletnym systemem indeksuj±cym i przeszukuj±cym www
64 dla ma³ych domen oraz intranetu. System nie zosta³ opracowany jako
65 wielki system typu Lycos, Infoseek WebCrawler i AltaVista. Natomiast
66 nadaje siê do zastosowania w pojedynczej firmie, kampusie lub
67 jakiejkolwiek stronie www. Zalety:
68  - przeszukiwaie tagów mp3,
69  - niusów (Server news://localhost/pl/),
70  - htdb czyli baz danych udostêpnianych przez www/cgi. (HTDBList SELECT
71    \ concat("http://search.mnogo.ru/board/message.php?id=",id) \ FROM
72    udm.messages LIMIT 2))
73  - zawarto¶ci serwerów ftp (rada za 2gr: "Index no" dla serwera ftp
74    spowoduje nie indexowanie *zawarto¶ci* plików na nim siê znajduj±cych)
75  - wyszukiwanie w zwyk³ych URL-ach http://
76  - wsparcie dla SSL (https://)
77  - wyszukiwanie w mirrorach (równie¿ lokalnych) odleg³ych sieci
78  - zgadywanie zestawu znaków
79  - zewnêtrzne przetwarzacze dokumentów na potrzeby indeksowania
80  - ograniczanie zapytañ do jednej nazwy hosta: <INPUT TYPE=HIDDEN
81    NAME=ul VALUE=http://www.something.com/>
82  - kategoryzacja witryny (doc/categories.txt)
83  - mo¿liwe jest uruchomienie kilku procesów indeksuj±cych na kilku
84    (teoretycznie 128) hostach i trzymanie bazy na jednym z nich,
85    reindeksacja nie powoduje wtedy niedostêpno¶ci wyszukiwarki.
86    Przeczytaj cachemode.txt
87
88 W odró¿nieniu od innych systemów bazuj±cych na WAIS-ie lub serwerach
89 www, mnogosearch mo¿e ³±czyæ kilka serwerów www w jednym miejscu. Typ
90 serwera nie ma znaczenia, dopóki pracuje on zgodnie z protoko³em HTTP
91 1.0. Pakiet wspó³pracuje równie¿ z domenami wirtualnymi.
92
93 %package lib
94 Summary:        mnogosearch library
95 Summary(pl):    Biblioteka mnogosearch
96 Group:          Libraries
97 Requires(post): /sbin/ldconfig
98
99 %description lib
100 This package contains mnogosearch library files.
101
102 %description lib -l pl
103 Ten pakiet zawiera pliki biblioteki mnogosearch.
104
105 %package devel
106 Summary:        Include files for mnogosearch
107 Summary(pl):    Pliki nag³ówkowe mnogosearch
108 Group:          Development/Libraries
109 Requires:       %{name}-lib = %{version}
110
111 %description devel
112 This package contains mnogosearch development files.
113
114 %description devel -l pl
115 Pliki dla programistów u¿ywaj±cych mnogosearch.
116
117 %package static
118 Summary:        mnogosearch static libraries
119 Summary(pl):    Biblioteki statyczne mnogosearch
120 Group:          Development/Libraries
121 Requires:       %{name}-devel = %{version}
122
123 %description static
124 This package contains static libraries of mnogosearch.
125
126 %description static -l pl
127 Ten pakiet zawiera statyczne biblioteki mnogosearch.
128
129 %package pgsql
130 Summary:        pgsql storage-support for mnogosearch
131 Summary(pl):    Obs³uga przechowywania danych w bazie PostgreSQL
132 Group:          Networking/Utilities
133 Requires:       %{name} = %{version}
134
135 %description pgsql
136 This package contains PostgreSQL storage support.
137
138 Note: install will try to create tables in database mnogosearch.
139
140 %description pgsql -l pl
141 Ten pakiet zawiera obs³ugê baz PostgreSQL do przechowywania
142 informacji.
143
144 Instalacja tego pakietu spowoduje za³o¿enie tabel w bazie mnogosearch.
145
146 %package stored
147 Summary:        Deamon for saving gziped versions of documents
148 Summary(pl):    Demon zapisuj±cy zgzipowane wersje dokumentów
149 Group:          Development/Libraries
150 PreReq:         rc-scripts
151 Requires(post,preun):   /sbin/chkconfig
152 Requires:       %{name} = %{version}
153
154 %description stored
155 This package contains optional part of mnogosearch stored daemon,
156 which stores locally gziped versions of parsed (& indexed) html files,
157 news articles, etc.
158
159 %description stored -l pl
160 Pakiet zawiera opcjonaln± czê¶æ mnogosearch demon stored, zajmuj±cy
161 siê lokalnym przechowywaniem przetworzonych (i zindeksowanych)
162 spakowanych wersji plików html, artyku³ów usenetu, itp.
163
164 %prep
165 %setup -q
166
167 %build
168 find . -type d -name CVS | xargs rm -rf
169 rm -f missing
170 %{__libtoolize}
171 %{__aclocal}
172 %{__autoconf}
173 %{__automake}
174
175 db="--with-built-in"
176
177 %{?_with_mysql: db="--with-mysql"}
178 %{?_with_pgsql: db="--with-pgsql"}
179
180 %configure \
181         DOCBOOKSTYLE="/usr/share/sgml/docbook/dsssl-stylesheets" \
182         --enable-syslog      \
183         --enable-syslog=LOG_LOCAL6 \
184         --with-image-dir=%{htmldir}/%{name} \
185         --with-cgi-bin-dir=%{cgidir} \
186         --with-search-dir=%{htmldir} \
187         --with-config-dir=%{_sysconfdir}/http/%{name} \
188         --with-openssl \
189         $db \
190         --enable-linux-pthreads \
191         --enable-charset-guesser \
192         --enable-news-extension \
193         --enable-fast-tag \
194         --enable-fast-cat \
195         --enable-fast-site \
196         --enable-phrase \
197         --enable-shared \
198         --with-zlib             \
199 #       --enable-dmalloc
200
201 %{__make}
202
203 #  enable automatic Russian charset guesser :-]
204 # wy uze www.linux.ru procitacli sewodnja?
205
206 #  --with-iodbc[=DIR]      Include iODBC support.  DIR is the iODBC base
207 #  --with-unixODBC[=DIR]   Include unixODBC support.  DIR is the unixODBC base
208 #  --with-solid[=DIR]      Include Solid support.  DIR is the Solid base
209 #  --with-openlink[=DIR]   Include OpenLink ODBC support.
210 #  --with-easysoft[=DIR]   Include EasySoft ODBC support.
211 #  --with-sapdb[=DIR]      Include SAPDB support.  DIR is the SAPDB base
212 #  --with-ibase[=DIR]      Include InterBase support.  DIR is the InterBase
213 #  --with-oracle7[=DIR]    Include Oracle 7.3 support.  DIR is the Oracle
214 #  --with-oracle8[=DIR]    Include Oracle8 support.  DIR is the Oracle
215 #  --with-oracle8i[=DIR]   Include Oracle8i support.  DIR is the Oracle
216 #
217 # FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME
218
219 %install
220 rm -rf $RPM_BUILD_ROOT
221 install -d $RPM_BUILD_ROOT{%{_localstatedir},%{htmldir},%{cgidir},%{_sysconfdir}} \
222         $RPM_BUILD_ROOT{/etc/cron.daily,%{_infodir}}
223
224 %{__make} install \
225         DESTDIR=$RPM_BUILD_ROOT \
226         doc_FILES='$(HTML_ALL)'
227
228 ln -sf %{_defaultdocdir}/%{name}-%{version}/html \
229         $RPM_BUILD_ROOT%{htmldir}/mnogodoc
230
231 mv -f $RPM_BUILD_ROOT%{_bindir}/*.cgi \
232         $RPM_BUILD_ROOT%{cgidir}
233
234 (cd $RPM_BUILD_ROOT%{_sysconfdir}
235 touch locals
236 for f in *-dist ; do
237         mv -f $f `basename $f -dist`
238 done
239 )
240
241 install %{SOURCE1} \
242         $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-gethostnames
243 install -d $RPM_BUILD_ROOT/usr/src/example/mnogosearch
244 install %{SOURCE2} $RPM_BUILD_ROOT/usr/src/example/mnogosearch/mysql.sql
245 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-dbgen
246
247 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
248 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/mnogosearch-stored
249
250 cat > $RPM_BUILD_ROOT/usr/src/example/mnogosearch/pg-sql.sql <<EOF
251 \connect template1
252 CREATE DATABASE mnogosearch;
253 \connect mnogosearch
254 EOF
255 cat create/pgsql/{create,crc-multi}.txt >> create/pgsql/mnogosearch-all.sql
256 cat >> create/pgsql/mnogosearch-all.sql <<EOF
257 CREATE USER "mnogosearch" WITH PASSWORD 'aqq123' NOCREATEDB NOCREATEUSER;
258 GRANT ALL ON url,dict,robots,stopword,categories,next_url_id,affix TO mnogosearch;
259 GRANT ALL ON ndict,server,thread,spell,next_cat_id,next_server_id,next_url_id TO mnogosearch;
260 GRANT ALL ON ndict2,ndict3,ndict4,ndict5,ndict6,ndict7,ndict8,ndict9,
261 ndict10,ndict11,ndict12,ndict16,ndict32 TO mnogosearch;
262 GRANT ALL ON dict2,dict3,dict4,dict5,dict6,dict7,dict8,dict9,dict10,
263 dict11,dict12,dict16,dict32 TO mnogosearch;
264 GRANT ALL ON "qtrack" TO mnogosearch;
265 EOF
266
267 mkdir html
268 mv -f doc/*.{html,css} html
269
270 %clean
271 rm -rf $RPM_BUILD_ROOT
272
273 %post
274 cat << EOF
275 Please see docs (%{_defaultdocdir}/%{name}-%{version} or http://localhost/mnogodoc),
276 then read how to setup db connection, and put line like this
277 "pgsql://user:password@/dbname/" into %{_sysconfdir}, then setup database
278 by something like "psql < %{_defaultdocdir}/%{name}-%{version}/create/pgsql/*.txt"
279 EOF
280
281 %postun lib -p /sbin/ldconfig
282 %post   lib -p /sbin/ldconfig
283
284 %post pgsql
285 echo "Creating database mnogosearch..."
286 su postgres -c "psql -U postgres template1 < %{_docdir}/%{name}-%{version}/create/pgsql/mnogosearch-all.psql"
287 echo "Mnogosearch user was created with passwd aqq123 - change it!"
288
289 %postun pgsql
290 echo -n 'Dropping Database mnogosearch:'
291 su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
292
293 %post stored
294 /sbin/chkconfig --add mnogosearch-stored
295
296 %preun stored
297 if [ "$1" = "0" ]; then
298         if [ -f /var/lock/subsys/mnogosearch-stored ]; then
299                 /etc/rc.d/init.d/mnogosearch-stored stop 1>&2
300         fi
301         /sbin/chkconfig --del mnogosearch-stored
302 fi
303
304 %files
305 %defattr(644,root,root,755)
306 %doc ChangeLog README TODO html doc/samples
307 # instructions for database creation
308 %doc create/db2 create/ibase create/msql create/mysql create/oracle create/pgsql create/sapdb create/solid create/sybase create/virtuoso
309 %attr(755,root,root) %{_sbindir}/[!s]*
310 %attr(755,root,root) %{_sbindir}/s[!t]*
311 %attr(755,root,root) %{cgidir}/*
312 %{htmldir}/mnogodoc
313 %dir %{_localstatedir}
314 %{_localstatedir}/raw
315 %{_localstatedir}/splitter
316 %{_localstatedir}/tree
317 %attr(775,root,http) %{_localstatedir}/cache
318 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
319 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.freq
320 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
321 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
322 %dir %{_sysconfdir}/langmap
323 %dir %{_sysconfdir}/stopwords
324 %dir %{_sysconfdir}/synonym
325 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*/*
326 %config(noreplace) %attr(750,root,root) /etc/cron.daily/*
327 %{_mandir}/man?/*
328
329 %files lib
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_libdir}/lib*-*.so
332
333 %files devel
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{_bindir}/udm-config
336 %attr(755,root,root) %{_libdir}/libmnogosearch.so
337 %attr(755,root,root) %{_libdir}/libmnogocharset.so
338 %{_libdir}/lib*.la
339 %{_includedir}/*
340
341 %files static
342 %defattr(644,root,root,755)
343 %{_libdir}/lib*.a
344
345 %files stored
346 %defattr(644,root,root,755)
347 %attr(755,root,root) %{_sbindir}/stored
348 %{_localstatedir}/store
349 %attr(754,root,root)/etc/rc.d/init.d/mnogosearch-stored
This page took 0.137194 seconds and 4 git commands to generate.