summaryrefslogtreecommitdiff
path: root/mnogosearch.spec
blob: 9919d88aed70ac8cf34feffdbcf20cee1d93fe85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
#
# Conditional build:
%bcond_with	chasen		# use ChaSen Japanese morphological analisys system
				# (not tested, maybe on by default?)
%bcond_without	expat		# without XML support (using expat library)
%bcond_without	ssl		# without SSL support (using OpenSSL)
# databases
%bcond_without	mysql		# support for MySQL
%bcond_without	pgsql		# support for PostgreSQL
# databases through ODBC
%bcond_with	iodbc		# with ODBC support through iODBC
%bcond_with	unixodbc	# with ODBC support through unixODBC
# databases through FreeTDS
%bcond_without	freetds		# support for MS SQL through FreeTDS
#
Summary:	Another one web indexing and searching system for a small domain or intranet
Summary(pl):	Kolejny system indeksowania i przeszukiwania WWW dla małych domen i intranetu
Name:		mnogosearch
Version:	3.2.34
Release:	4
License:	GPL v2+
Group:		Networking/Utilities
#Source0Download: http://www.mnogosearch.ru/download.html
Source0:	http://www.mnogosearch.ru/Download/%{name}-%{version}.tar.gz
# Source0-md5:	1706fcba5abde4bbea794379a9f672d0
Source1:	%{name}-dbgen
Patch0:		%{name}-acfixes.patch
Patch1:		%{name}-as_needed-fix.patch
URL:		http://www.mnogosearch.ru/
BuildRequires:	autoconf
BuildRequires:	automake
%{?with_chasen:BuildRequires:	chasen-devel}
%{?with_expat:BuildRequires:	expat-devel}
%{?with_freetds:BuildRequires:	freetds-devel}
%{?with_iodbc:BuildRequires:	libiodbc-devel}
BuildRequires:	libtool
%{?with_mysql:BuildRequires:	mysql-devel}
%{?with_ssl:BuildRequires:	openssl-devel >= 0.9.7d}
%{?with_pgsql:BuildRequires:	postgresql-devel}
%{?with_unixodbc:BuildRequires:	unixODBC-devel}
BuildRequires:	zlib-devel
Requires:	%{name}-lib = %{version}-%{release}
#%{?with_pgsql:Requires: postgresql-clients}
Requires:	webserver
Obsoletes:	aspseek
Obsoletes:	mnogosearch-stored
Obsoletes:	udmsearch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define		_sysconfdir	/etc/%{name}
%define		_localstatedir	/var/lib/mnogosearch
%define		_ourdatadir	%{_datadir}/%{name}
%define		htmldir		/home/services/httpd/html
%define		cgidir		/home/services/httpd/cgi-bin

%description
The mnogosearch system is a complete world wide web indexing and
searching system for a small domain or intranet. This system is not
meant to replace the need for powerful internet-wide search systems
like Lycos, Infoseek, Webcrawler and AltaVista. Instead it is meant to
cover the search needs for a single company, campus, or even a
particular sub section of a web site. Features:
- MP3 tag info
- news searching(?)
- http: (and ftp: - via proxy) URL schemaa
- charset guesser
- externel parsers
- support for ssl (https://)
- limiting queries to one hostname by sth like this: <INPUT
  TYPE=HIDDEN NAME=ul VALUE=http://www.something.com/>
- it's posilble to run indexers on several diffrent (theoreticaly 128)
  hosts, and gather information on one of them, reindexing proceses make
  no harm to avalibility of search engine. See cachemode.txt

As opposed to some WAIS-based or web-server based search engines,
mnogsearch can span several web servers at a site. The type of these
different web servers doesn't matter as long as they understand the
HTTP 1.0 protocol. Mnogosearch supports also virtual domains.

%description -l pl
Mnogosearch jest kompletnym systemem indeksującym i przeszukującym WWW
dla małych domen oraz intranetu. System nie został opracowany jako
wielki system typu Lycos, Infoseek WebCrawler i AltaVista. Natomiast
nadaje się do zastosowania w pojedynczej firmie, kampusie lub
jakiejkolwiek stronie WWW. Zalety:
- przeszukiwanie znaczników MP3,
- niusów (Server news://localhost/pl/),
- htdb czyli baz danych udostępnianych przez WWW/CGI. (HTDBList SELECT
  \ concat("http://search.mnogo.ru/board/message.php?id=",id) \ FROM
  udm.messages LIMIT 2))
- zawartości serwerów FTP (rada za 2gr: "Index no" dla serwera FTP
  spowoduje nie indeksowanie *zawartości* plików na nim się
  znajdujących)
- wyszukiwanie w zwykłych URL-ach http://
- wsparcie dla SSL (https://)
- wyszukiwanie w mirrorach (również lokalnych) odległych sieci
- zgadywanie zestawu znaków
- zewnętrzne przetwarzacze dokumentów na potrzeby indeksowania
- ograniczanie zapytań do jednej nazwy hosta: <INPUT TYPE=HIDDEN
  NAME=ul VALUE=http://www.something.com/>
- kategoryzacja witryny (doc/categories.txt)
- możliwe jest uruchomienie kilku procesów indeksujących na kilku
  (teoretycznie 128) hostach i trzymanie bazy na jednym z nich,
  reindeksacja nie powoduje wtedy niedostępności wyszukiwarki.
  Przeczytaj cachemode.txt

W odróżnieniu od innych systemów bazujących na WAIS-ie lub serwerach
WWW, mnogosearch może łączyć kilka serwerów WWW w jednym miejscu. Typ
serwera nie ma znaczenia, dopóki pracuje on zgodnie z protokołem HTTP
1.0. Pakiet współpracuje również z domenami wirtualnymi.

%package lib
Summary:	mnogosearch library
Summary(pl):	Biblioteka mnogosearch
Group:		Libraries

%description lib
This package contains mnogosearch library files.

%description lib -l pl
Ten pakiet zawiera pliki biblioteki mnogosearch.

%package devel
Summary:	Include files for mnogosearch
Summary(pl):	Pliki nagłówkowe mnogosearch
Group:		Development/Libraries
Requires:	%{name}-lib = %{version}-%{release}
%{?with_expat:Requires:	expat-devel}
%{?with_freetds:Requires:	freetds-devel}
%{?with_iodbc:Requires:	libiodbc-devel}
%{?with_mysql:Requires:	mysql-devel}
%{?with_ssl:Requires:	openssl-devel}
%{?with_pgsql:Requires:	postgresql-devel}
%{?with_unixodbc:Requires:	unixODBC-devel}
Requires:	zlib-devel

%description devel
This package contains mnogosearch development files.

%description devel -l pl
Pliki dla programistów używających mnogosearch.

%package static
Summary:	mnogosearch static libraries
Summary(pl):	Biblioteki statyczne mnogosearch
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
This package contains static libraries of mnogosearch.

%description static -l pl
Ten pakiet zawiera statyczne biblioteki mnogosearch.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
find . -type d -name CVS | xargs rm -rf
%{__libtoolize}
%{__aclocal} -I build/m4
%{__autoconf}
%{__automake}
%configure \
	--datadir=%{_ourdatadir} \
	DOCBOOKSTYLE="/usr/share/sgml/docbook/dsssl-stylesheets" \
	--enable-syslog=LOG_LOCAL6 \
	--enable-charset-guesser \
	%{?with_chasen:--enable-chasen} \
	--enable-fast-cat \
	--enable-fast-tag \
	--enable-fast-site \
	--enable-linux-pthreads \
	--enable-news-extension \
	--enable-phrase \
	--enable-shared \
	--with-built-in \
	--with-cgi-bin-dir=%{cgidir} \
	--with-config-dir=%{_sysconfdir}/http/%{name} \
	%{?with_expat:--with-expat} \
	--with-image-dir=%{htmldir}/%{name} \
	%{?with_freetds:--with-freetds} \
	%{?with_iodbc:--with-iodbc} \
	%{?with_mysql:--with-mysql} \
	%{?with_ssl:--with-openssl} \
	%{?with_pgsql:--with-pgsql} \
	--with-search-dir=%{htmldir} \
	%{?with_unixodbc:--with-unixODBC} \
	--with-zlib

# --with-readline (for SQL monitor) ?
# --wiht-extra-charsets=big5,gb2312,gbk,japanese,euc-kr,gujarati,tscii ?

%{__make}

#  enable automatic Russian charset guesser :-]
# wy uze www.linux.ru procitacli sewodnja?

#  --with-solid[=DIR]      Include Solid support.  DIR is the Solid base
#  --with-openlink[=DIR]   Include OpenLink ODBC support.
#  --with-easysoft[=DIR]   Include EasySoft ODBC support.
#  --with-sapdb[=DIR]      Include SAPDB support.  DIR is the SAPDB base
#  --with-ibase[=DIR]      Include InterBase support.  DIR is the InterBase
#  --with-ctlib[=DIR]      Include Ct-Lib support.
#  --with-freetds[=DIR]    Include FreeTDS Ct-Lib support.
#  --with-oracle7[=DIR]    Include Oracle 7.3 support.  DIR is the Oracle
#  --with-oracle8[=DIR]    Include Oracle8 support.  DIR is the Oracle
#  --with-oracle8i[=DIR]   Include Oracle8i support.  DIR is the Oracle
#
# FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_localstatedir},%{htmldir},%{cgidir},%{_sysconfdir}} \
	$RPM_BUILD_ROOT{/etc/cron.daily,%{_infodir}}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT \
	doc_FILES='$(HTML_ALL)'

ln -sf %{_defaultdocdir}/%{name}-%{version}/html \
	$RPM_BUILD_ROOT%{htmldir}/mnogodoc

mv -f $RPM_BUILD_ROOT%{_bindir}/*.cgi \
	$RPM_BUILD_ROOT%{cgidir}

install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-dbgen

mkdir html
cp -af doc/*.{html,css} html

cd $RPM_BUILD_ROOT%{_sysconfdir}
touch locals
for f in *-dist ; do
	mv -f $f `basename $f -dist`
done

rm -rf $RPM_BUILD_ROOT%{_prefix}/doc

%clean
rm -rf $RPM_BUILD_ROOT

%post
cat << EOF
Please see docs (%{_defaultdocdir}/%{name}-%{version}),
then read how to setup db connection, and put line like this
"pgsql://user:password@/dbname/" into %{_sysconfdir}, then setup database
using "indexer -Ecreate" command.
EOF

%post	lib -p /sbin/ldconfig
%postun	lib -p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc ChangeLog README TODO html doc/samples
%attr(755,root,root) %{_sbindir}/*
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{cgidir}/*
%{_datadir}/%{name}
%{htmldir}/mnogodoc
%dir %{_localstatedir}
%attr(775,root,http) %{_localstatedir}/cache
%dir %{_sysconfdir}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.freq
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.htm
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locals
%dir %{_sysconfdir}/langmap
%dir %{_sysconfdir}/stopwords
%dir %{_sysconfdir}/synonym
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*/*
%config(noreplace) %attr(750,root,root) /etc/cron.daily/*
%{_mandir}/man?/*

%files lib
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/lib*-*.so

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/udm-config
%attr(755,root,root) %{_libdir}/libmnogosearch.so
%attr(755,root,root) %{_libdir}/libmnogocharset.so
%{_libdir}/lib*.la
%{_includedir}/*

%files static
%defattr(644,root,root,755)
%{_libdir}/lib*.a