]> git.pld-linux.org Git - packages/mnogosearch.git/blob - mnogosearch.spec
- /home -> /home/services
[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.6
10 Release:        3
11 License:        GPL
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}
27 Prereq:         webserver
28 %{?_with_pgsql:Prereq:          postgresql-clients}
29 Requires:       %{name}-lib = %{version}
30 Obsoletes:      udmsearch
31 Obsoletes:      aspseek
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
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
38
39 %description
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:
46  - mp3 tag info
47  - news searching(?)
48  - http: (and ftp: - via proxy) URL schemaa
49  - charset guesser
50  - externel parsers
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
57
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.
62
63 %description -l pl
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
88
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.
93
94 %package lib
95 Summary:        mnogosearch library
96 Summary(pl):    Biblioteka mnogosearch
97 Group:          Libraries
98 Requires(post): /sbin/ldconfig
99
100 %description lib
101 This package contains mnogosearch library files.
102
103 %description lib -l pl
104 Ten pakiet zawiera pliki biblioteki mnogosearch.
105
106 %package devel
107 Summary:        Include files for mnogosearch
108 Summary(pl):    Pliki nag³ówkowe mnogosearch
109 Group:          Development/Libraries
110 Requires:       %{name}-lib = %{version}
111
112 %description devel
113 This package contains mnogosearch development files.
114
115 %description devel -l pl
116 Pliki dla programistów u¿ywaj±cych mnogosearch.
117
118 %package static
119 Summary:        mnogosearch static libraries
120 Summary(pl):    Biblioteki statyczne mnogosearch
121 Group:          Development/Libraries
122 Requires:       %{name}-devel = %{version}
123
124 %description static
125 This package contains static libraries of mnogosearch.
126
127 %description static -l pl
128 Ten pakiet zawiera statyczne biblioteki mnogosearch.
129
130 %package pgsql
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}
135
136 %description pgsql
137 This package contains PostgreSQL storage support.
138
139 Note: install will try to create tables in database mnogosearch.
140
141 %description pgsql -l pl
142 Ten pakiet zawiera obs³ugê baz PostgreSQL do przechowywania
143 informacji.
144
145 Instalacja tego pakietu spowoduje za³o¿enie tabel w bazie mnogosearch.
146
147 %package stored
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}
152
153 %description stored
154 This package contains optional part of mnogosearch stored daemon,
155 which stores locally gziped versions of parsed (& indexed) html files,
156 news articles, etc.
157
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.
162
163 %prep
164 %setup -q
165 %patch0 -p0
166 #%patch1 -p0
167 %patch2 -p0
168
169 %build
170 find . -type d -name CVS | xargs rm -rf
171 rm -f missing
172 %{__libtoolize}
173 %{__aclocal}
174 %{__autoconf}
175 %{__automake}
176
177 db="--with-built-in"
178
179 %{?_with_mysql: db="--with-mysql"}
180 %{?_with_pgsql: db="--with-pgsql"}
181
182 %configure \
183         --enable-syslog      \
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} \
189         --with-openssl \
190         $db \
191         --enable-linux-pthreads \
192         --enable-charset-guesser \
193         --enable-news-extension \
194         --enable-fast-tag \
195         --enable-fast-cat \
196         --enable-fast-site \
197         --enable-phrase \
198         --enable-shared \
199         --with-zlib             \
200 #       --enable-dmalloc
201
202 %{__make}
203
204 #  enable automatic Russian charset guesser :-]
205 # wy uze www.linux.ru procitacli sewodnja?
206
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
217 #       
218 # FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME
219
220 %install
221 rm -rf $RPM_BUILD_ROOT
222 install -d $RPM_BUILD_ROOT{%{_localstatedir},%{htmldir},%{cgidir},%{_sysconfdir}} \
223         $RPM_BUILD_ROOT{/etc/cron.daily,%{_infodir}}
224
225 %{__make} install \
226         DESTDIR=$RPM_BUILD_ROOT
227
228 ln -sf %{_sbindir}/indexer \
229         $RPM_BUILD_ROOT/etc/cron.daily/mnogo-dbgen
230
231 ln -sf %{_defaultdocdir}/%{name}-%{version}/html \
232         $RPM_BUILD_ROOT%{htmldir}/mnogodoc
233
234 mv -f $RPM_BUILD_ROOT%{_bindir}/*.cgi \
235         $RPM_BUILD_ROOT%{cgidir}
236
237 (cd $RPM_BUILD_ROOT%{_sysconfdir}
238 touch locals
239 for f in *-dist ; do
240         mv -f $f `basename $f -dist`
241 done
242 )
243
244 install %{SOURCE1} \
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
248
249 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
250 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/mnogosearch-stored
251
252 cat > $RPM_BUILD_ROOT/usr/src/example/mnogosearch/pg-sql.sql <<EOF
253 \connect template1
254 CREATE DATABASE mnogosearch;
255 \connect mnogosearch
256 EOF
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;
267 EOF
268
269 mkdir html
270 mv -f doc/*.html html
271
272 %clean
273 rm -rf $RPM_BUILD_ROOT
274
275 %post
276 cat << EOF
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"
281 EOF
282
283 %postun lib -p /sbin/ldconfig
284 %post   lib -p /sbin/ldconfig
285
286 %post pgsql
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!"
290
291 %postun pgsql
292 echo -n 'Dropping Database mnogosearch:' 
293 su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
294
295 %files
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}/*
303 %{htmldir}/mnogodoc
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/*
317 %{_mandir}/man?/*
318
319 %files lib
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_libdir}/lib*-*.so
322
323 %files devel
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_bindir}/udm-config
326 %{_includedir}/*
327 %attr(755,root,root) %{_libdir}/libudmsearch.so
328 %{_libdir}/lib*.la
329
330 %files static
331 %defattr(644,root,root,755)
332 %{_libdir}/lib*.a
333
334 %files stored
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_sbindir}/stored
337 %{_localstatedir}/store
338 /etc/rc.d/init.d/mnogosearch-stored
This page took 0.16033 seconds and 4 git commands to generate.