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