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