]> git.pld-linux.org Git - packages/mnogosearch.git/blob - mnogosearch.spec
- perl -pi -e "s/^libtoolize --copy --force/\%\{__libtoolize\}/"
[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.5
10 Release:        1
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(post): /sbin/ldconfig
30 Obsoletes:      udmsearch
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/httpd/html
36 %define         cgidir          /home/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 devel
94 Summary:        Include files for mnogosearch
95 Summary(pl):    Pliki nag³ówkowe mnogosearch
96 Group:          Development/Libraries
97 Requires:       %{name} = %{version}
98
99 %description devel
100 This package contains mnogosearch development files.
101
102 %description devel -l pl
103 Pliki dla programistów u¿ywaj±cych mnogosearch.
104
105 %package static
106 Summary:        mnogosearch static libraries
107 Summary(pl):    Biblioteki statyczne mnogosearch
108 Group:          Development/Libraries
109 Requires:       %{name}-devel = %{version}
110
111 %description static
112 This package contains static libraries of mnogosearch.
113
114 %description static -l pl
115 Ten pakiet zawiera statyczne biblioteki mnogosearch.
116
117 %package pgsql
118 Summary:        pgsql storage-support for mnogosearch
119 Summary(pl):    Obs³uga przechowywania danych w bazie PostgreSQL
120 Group:          Networking/Utilities
121 Requires:       %{name} = %{version}
122
123 %description pgsql
124 This package contains PostgreSQL storage support.
125
126 Note: install will try to create tables in database mnogosearch.
127
128 %description pgsql -l pl
129 Ten pakiet zawiera obs³ugê baz PostgreSQL do przechowywania
130 informacji.
131
132 Instalacja tego pakietu spowoduje za³o¿enie tabel w bazie mnogosearch.
133
134
135 %package stored
136 Summary:        Deamon for saving gziped versions of documents.
137 Summary(pl):    Demon zapisuj±cy zgzipowane wersje dokumentów
138 Group:          Development/Libraries
139 Requires:       %{name} = %{version}
140
141 %description stored
142 This package contains optional part of mnogosearch stored daemon,
143 which stores locally gziped versions of parsed (& indexed) html files,
144 news articles, etc.
145
146 %description stored -l pl
147 Pakiet zawiera opcjonaln± czê¶æ mnogosearch demon stored, zajmuj±cy
148 siê lokalnym przechowywaniem przetworzonych (i zindeksowanych)
149 spakowanych wersji plików html, artyku³ów usenetu, itp.
150
151 %prep
152 %setup -q
153 %patch0 -p0
154 #%patch1 -p0
155 %patch2 -p0
156
157 %build
158 find . -type d -name CVS | xargs rm -rf
159 rm -f missing
160 %{__libtoolize}
161 aclocal
162 %{__autoconf}
163 %{__automake}
164
165 db="--with-built-in"
166
167 %{?_with_mysql: db="--with-mysql"}
168 %{?_with_pgsql: db="--with-pgsql"}
169
170 %configure \
171         --enable-syslog      \
172         --enable-syslog=LOG_LOCAL6 \
173         --with-image-dir=/home/httpd/html/%{name} \
174         --with-cgi-bin-dir=/home/httpd/cgi-bin \
175         --with-search-dir=/home/httpd/html \
176         --with-config-dir=%{_sysconfdir}/http/%{name} \
177         --with-openssl \
178         $db \
179         --enable-linux-pthreads \
180         --enable-charset-guesser \
181         --enable-news-extension \
182         --enable-fast-tag \
183         --enable-fast-cat \
184         --enable-fast-site \
185         --enable-phrase \
186         --enable-shared \
187         --with-zlib             \
188 #       --enable-dmalloc
189
190 %{__make}
191
192 #  enable automatic Russian charset guesser :-]
193 # wy uze www.linux.ru procitacli sewodnja?
194
195 #  --with-iodbc[=DIR]      Include iODBC support.  DIR is the iODBC base
196 #  --with-unixODBC[=DIR]   Include unixODBC support.  DIR is the unixODBC base
197 #  --with-solid[=DIR]      Include Solid support.  DIR is the Solid base
198 #  --with-openlink[=DIR]   Include OpenLink ODBC support. 
199 #  --with-easysoft[=DIR]   Include EasySoft ODBC support. 
200 #  --with-sapdb[=DIR]      Include SAPDB support.  DIR is the SAPDB base
201 #  --with-ibase[=DIR]      Include InterBase support.  DIR is the InterBase
202 #  --with-oracle7[=DIR]    Include Oracle 7.3 support.  DIR is the Oracle
203 #  --with-oracle8[=DIR]    Include Oracle8 support.  DIR is the Oracle
204 #  --with-oracle8i[=DIR]   Include Oracle8i support.  DIR is the Oracle
205 #       
206 # FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME
207
208 %install
209 rm -rf $RPM_BUILD_ROOT
210 install -d $RPM_BUILD_ROOT{%{_localstatedir},%{htmldir},%{cgidir},%{_sysconfdir}} \
211         $RPM_BUILD_ROOT{/etc/cron.daily,%{_infodir}}
212
213 %{__make} install \
214         DESTDIR=$RPM_BUILD_ROOT
215
216 ln -sf %{_sbindir}/indexer \
217         $RPM_BUILD_ROOT/etc/cron.daily/mnogo-dbgen
218
219 ln -sf %{_defaultdocdir}/%{name}-%{version}/html \
220         $RPM_BUILD_ROOT%{htmldir}/mnogodoc
221
222 mv -f $RPM_BUILD_ROOT%{_bindir}/*.cgi \
223         $RPM_BUILD_ROOT/home/httpd/cgi-bin
224
225 (cd $RPM_BUILD_ROOT%{_sysconfdir}
226 touch locals
227 for f in *-dist ; do
228         mv -f $f `basename $f -dist`
229 done
230 )
231
232 install %{SOURCE1} \
233         $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-gethostnames
234 install -d $RPM_BUILD_ROOT/usr/src/example/mnogosearch
235 install %{SOURCE2} $RPM_BUILD_ROOT/usr/src/example/mnogosearch/mysql.sql
236
237 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
238 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/mnogosearch-stored
239
240 cat > $RPM_BUILD_ROOT/usr/src/example/mnogosearch/pg-sql.sql <<EOF
241 \connect template1
242 CREATE DATABASE mnogosearch;
243 \connect mnogosearch
244 EOF
245 cat pgsql/{create,crc-multi,news-extension}.txt >> pgsql/mnogosearch-all.sql
246 cat >> pgsql/mnogosearch-all.sql <<EOF
247 CREATE USER "mnogosearch" WITH PASSWORD 'aqq123' NOCREATEDB NOCREATEUSER;
248 GRANT ALL ON url,dict,robots,stopword,categories,next_url_id,affix TO mnogosearch;
249 GRANT ALL ON ndict,server,thread,spell,next_cat_id,next_server_id,next_url_id TO mnogosearch;
250 GRANT ALL ON ndict2,ndict3,ndict4,ndict5,ndict6,ndict7,ndict8,ndict9,
251 ndict10,ndict11,ndict12,ndict16,ndict32 TO mnogosearch;
252 GRANT ALL ON dict2,dict3,dict4,dict5,dict6,dict7,dict8,dict9,dict10,
253 dict11,dict12,dict16,dict32 TO mnogosearch;
254 GRANT ALL ON "qtrack" TO mnogosearch;
255 EOF
256
257 mkdir html
258 mv -f doc/*.html html
259
260 %clean
261 rm -rf $RPM_BUILD_ROOT
262
263 %post
264 /sbin/ldconfig
265 cat << EOF
266 Please see docs (%{_defaultdocdir}/%{name}-%{version} or http://localhost/mnogodoc),
267 then read how to setup db connection, and put line like this
268 "pgsql://user:password@/dbname/" into %{_sysconfdir}, then setup database
269 by something like "psql < %{_defaultdocdir}/%{name}-%{version}/create/pgsql/*.txt"
270 EOF
271
272 %postun -p /sbin/ldconfig
273
274 %post pgsql
275 echo "Creating database mnogosearch..."
276 su postgres -c "psql -U postgres template1 < %{_docdir}/%{name}-%{version}/create/pgsql/mnogosearch-all.psql"
277 echo "Mnogosearch user was created with passwd aqq123 - change it!"
278
279 %postun pgsql
280 echo -n 'Dropping Database mnogosearch:' 
281 su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
282
283 %files
284 %defattr(644,root,root,755)
285 %doc ChangeLog README TODO html doc/samples
286 # instructions for database creation
287 %doc db2 ibase msql mysql oracle pgsql sapdb solid sybase virtuoso
288 %attr(755,root,root) %{_libdir}/lib*-*.so
289 %attr(755,root,root) %{_sbindir}/*
290 %attr(755,root,root) %{cgidir}/*
291 %{htmldir}/mnogodoc
292 %dir %{_localstatedir}
293 %{_localstatedir}/[rst]*
294 %attr(775,root,http) %{_localstatedir}/cache
295 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
296 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.htm
297 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/locals
298 %dir %{_sysconfdir}/langmap
299 %dir %{_sysconfdir}/stopwords
300 %dir %{_sysconfdir}/synonym
301 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*/*
302 %config(noreplace) %attr(750,root,root) /etc/cron.daily/*
303 %{_mandir}/man?/*
304
305 %files devel
306 %defattr(644,root,root,755)
307 %attr (755,root,root) %{_bindir}/udm-config
308 %{_includedir}/*
309 %attr (755,root,root) %{_libdir}/libudmsearch.so
310 %attr (755,root,root) %{_libdir}/lib*.la
311
312 %files static
313 %defattr(644,root,root,755)
314 %{_libdir}/lib*.a
315
316 %files stored
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_sbindir}/stored
319 /var/lib/mnogosearch/store
320 /etc/rc.d/init.d/mnogosearch-stored
This page took 0.098487 seconds and 4 git commands to generate.