]> git.pld-linux.org Git - packages/mnogosearch.git/blob - mnogosearch.spec
- previous commit log means "updated to 3.2.11"
[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.11
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:  738866d47ecf1723c1efc445ae964477
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 Requires:       %{name} = %{version}
151
152 %description stored
153 This package contains optional part of mnogosearch stored daemon,
154 which stores locally gziped versions of parsed (& indexed) html files,
155 news articles, etc.
156
157 %description stored -l pl
158 Pakiet zawiera opcjonaln± czê¶æ mnogosearch demon stored, zajmuj±cy
159 siê lokalnym przechowywaniem przetworzonych (i zindeksowanych)
160 spakowanych wersji plików html, artyku³ów usenetu, itp.
161
162 %prep
163 %setup -q
164
165 %build
166 find . -type d -name CVS | xargs rm -rf
167 rm -f missing
168 %{__libtoolize}
169 %{__aclocal}
170 %{__autoconf}
171 %{__automake}
172
173 db="--with-built-in"
174
175 %{?_with_mysql: db="--with-mysql"}
176 %{?_with_pgsql: db="--with-pgsql"}
177
178 %configure \
179         DOCBOOKSTYLE="/usr/share/sgml/docbook/dsssl-stylesheets" \
180         --enable-syslog      \
181         --enable-syslog=LOG_LOCAL6 \
182         --with-image-dir=%{htmldir}/%{name} \
183         --with-cgi-bin-dir=%{cgidir} \
184         --with-search-dir=%{htmldir} \
185         --with-config-dir=%{_sysconfdir}/http/%{name} \
186         --with-openssl \
187         $db \
188         --enable-linux-pthreads \
189         --enable-charset-guesser \
190         --enable-news-extension \
191         --enable-fast-tag \
192         --enable-fast-cat \
193         --enable-fast-site \
194         --enable-phrase \
195         --enable-shared \
196         --with-zlib             \
197 #       --enable-dmalloc
198
199 %{__make}
200
201 #  enable automatic Russian charset guesser :-]
202 # wy uze www.linux.ru procitacli sewodnja?
203
204 #  --with-iodbc[=DIR]      Include iODBC support.  DIR is the iODBC base
205 #  --with-unixODBC[=DIR]   Include unixODBC support.  DIR is the unixODBC base
206 #  --with-solid[=DIR]      Include Solid support.  DIR is the Solid base
207 #  --with-openlink[=DIR]   Include OpenLink ODBC support. 
208 #  --with-easysoft[=DIR]   Include EasySoft ODBC support. 
209 #  --with-sapdb[=DIR]      Include SAPDB support.  DIR is the SAPDB base
210 #  --with-ibase[=DIR]      Include InterBase support.  DIR is the InterBase
211 #  --with-oracle7[=DIR]    Include Oracle 7.3 support.  DIR is the Oracle
212 #  --with-oracle8[=DIR]    Include Oracle8 support.  DIR is the Oracle
213 #  --with-oracle8i[=DIR]   Include Oracle8i support.  DIR is the Oracle
214 #       
215 # FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME
216
217 %install
218 rm -rf $RPM_BUILD_ROOT
219 install -d $RPM_BUILD_ROOT{%{_localstatedir},%{htmldir},%{cgidir},%{_sysconfdir}} \
220         $RPM_BUILD_ROOT{/etc/cron.daily,%{_infodir}}
221
222 %{__make} install \
223         DESTDIR=$RPM_BUILD_ROOT \
224         doc_FILES='$(HTML_ALL)'
225
226 ln -sf %{_defaultdocdir}/%{name}-%{version}/html \
227         $RPM_BUILD_ROOT%{htmldir}/mnogodoc
228
229 mv -f $RPM_BUILD_ROOT%{_bindir}/*.cgi \
230         $RPM_BUILD_ROOT%{cgidir}
231
232 (cd $RPM_BUILD_ROOT%{_sysconfdir}
233 touch locals
234 for f in *-dist ; do
235         mv -f $f `basename $f -dist`
236 done
237 )
238
239 install %{SOURCE1} \
240         $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-gethostnames
241 install -d $RPM_BUILD_ROOT/usr/src/example/mnogosearch
242 install %{SOURCE2} $RPM_BUILD_ROOT/usr/src/example/mnogosearch/mysql.sql
243 install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-dbgen
244
245 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
246 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/mnogosearch-stored
247
248 cat > $RPM_BUILD_ROOT/usr/src/example/mnogosearch/pg-sql.sql <<EOF
249 \connect template1
250 CREATE DATABASE mnogosearch;
251 \connect mnogosearch
252 EOF
253 cat create/pgsql/{create,crc-multi}.txt >> create/pgsql/mnogosearch-all.sql
254 cat >> create/pgsql/mnogosearch-all.sql <<EOF
255 CREATE USER "mnogosearch" WITH PASSWORD 'aqq123' NOCREATEDB NOCREATEUSER;
256 GRANT ALL ON url,dict,robots,stopword,categories,next_url_id,affix TO mnogosearch;
257 GRANT ALL ON ndict,server,thread,spell,next_cat_id,next_server_id,next_url_id TO mnogosearch;
258 GRANT ALL ON ndict2,ndict3,ndict4,ndict5,ndict6,ndict7,ndict8,ndict9,
259 ndict10,ndict11,ndict12,ndict16,ndict32 TO mnogosearch;
260 GRANT ALL ON dict2,dict3,dict4,dict5,dict6,dict7,dict8,dict9,dict10,
261 dict11,dict12,dict16,dict32 TO mnogosearch;
262 GRANT ALL ON "qtrack" TO mnogosearch;
263 EOF
264
265 mkdir html
266 mv -f doc/*.{html,css} html
267
268 %clean
269 rm -rf $RPM_BUILD_ROOT
270
271 %post
272 cat << EOF
273 Please see docs (%{_defaultdocdir}/%{name}-%{version} or http://localhost/mnogodoc),
274 then read how to setup db connection, and put line like this
275 "pgsql://user:password@/dbname/" into %{_sysconfdir}, then setup database
276 by something like "psql < %{_defaultdocdir}/%{name}-%{version}/create/pgsql/*.txt"
277 EOF
278
279 %postun lib -p /sbin/ldconfig
280 %post   lib -p /sbin/ldconfig
281
282 %post pgsql
283 echo "Creating database mnogosearch..."
284 su postgres -c "psql -U postgres template1 < %{_docdir}/%{name}-%{version}/create/pgsql/mnogosearch-all.psql"
285 echo "Mnogosearch user was created with passwd aqq123 - change it!"
286
287 %postun pgsql
288 echo -n 'Dropping Database mnogosearch:' 
289 su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
290
291 %post stored
292 /sbin/chkconfig --add mnogosearch-stored
293
294 %preun stored
295 if [ "$1" = "0" ]; then
296         if [ -f /var/lock/subsys/mnogosearch-stored ]; then
297                 /etc/rc.d/init.d/mnogosearch-stored stop 1>&2
298         fi
299         /sbin/chkconfig --del mnogosearch-stored
300 fi
301                                                 
302 %files
303 %defattr(644,root,root,755)
304 %doc ChangeLog README TODO html doc/samples
305 # instructions for database creation
306 %doc create/db2 create/ibase create/msql create/mysql create/oracle create/pgsql create/sapdb create/solid create/sybase create/virtuoso
307 %attr(755,root,root) %{_sbindir}/[!s]*
308 %attr(755,root,root) %{_sbindir}/s[!t]*
309 %attr(755,root,root) %{cgidir}/*
310 %{htmldir}/mnogodoc
311 %dir %{_localstatedir}
312 %{_localstatedir}/raw
313 %{_localstatedir}/splitter
314 %{_localstatedir}/tree
315 %attr(775,root,http) %{_localstatedir}/cache
316 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
317 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.freq
318 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
319 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
320 %dir %{_sysconfdir}/langmap
321 %dir %{_sysconfdir}/stopwords
322 %dir %{_sysconfdir}/synonym
323 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*/*
324 %config(noreplace) %attr(750,root,root) /etc/cron.daily/*
325 %{_mandir}/man?/*
326
327 %files lib
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_libdir}/lib*-*.so
330
331 %files devel
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_bindir}/udm-config
334 %attr(755,root,root) %{_libdir}/libmnogosearch.so
335 %attr(755,root,root) %{_libdir}/libmnogocharset.so
336 %{_libdir}/lib*.la
337 %{_includedir}/*
338
339 %files static
340 %defattr(644,root,root,755)
341 %{_libdir}/lib*.a
342
343 %files stored
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_sbindir}/stored
346 %{_localstatedir}/store
347 %attr(754,root,root)/etc/rc.d/init.d/mnogosearch-stored
This page took 0.119283 seconds and 4 git commands to generate.