+# conditional build:
+# _pgsql support for postgres
+# _mysql support for mysql
+
Summary: A 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.1.17
-Release: 2
+Version: 3.2.3
+Release: 1
License: GPL
Group: Networking/Utilities
+Group(de): Netzwerkwesen/Werkzeuge
+Group(es): Red/Utilitarios
+Group(pl): Sieciowe/Narzêdzia
+Group(pt_BR): Rede/Utilitários
Source0: http://www.mnogosearch.ru/Download/%{name}-%{version}.tar.gz
+Source2: %{name}-gethostnames
+%{?_mysql:Source1: %{name}-Mysql-database}
Patch0: %{name}-DESTDIR.patch
-Source1: %{name}-gethostnames
+%{?_mysql:Patch1: %{name}-Mysql-pld.patch}
URL: http://www.mnogosearch.ru/
-BuildRequires: postgresql-devel
+%{?_pgsql:BuildRequires: postgresql-devel}
+%{?_mysql:BuildRequires: mysql-devel}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
Prereq: webserver
-Prereq: postgresql-clients
+%{?_pgsql:Prereq: postgresql-clients}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/httpd/%{name}
- 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/>
+ - 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
jakiejkolwiek stronie www. Zalety:
- przeszukiwaie tagó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))
+ - 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 indexowanie *zawarto¶ci* plików na nim siê znajduj±cych)
- - wyszukiwanie w zwyk³ych URL-ach http://
+ - 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/>
+ - 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,
Summary: Include files and libraries for mnogo
Summary(pl): Pliki nag³ówkowe dla mnogo
Group: Development/Libraries
+Group(de): Entwicklung/Libraries
+Group(es): Desarrollo/Bibliotecas
+Group(fr): Development/Librairies
+Group(pl): Programowanie/Biblioteki
+Group(pt_BR): Desenvolvimento/Bibliotecas
+Group(ru): òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
+Group(uk): òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
Requires: %{name} = %{version}
%description devel
%description devel -l pl
Pliki dla programistów mnogosearch.
+%if%{?_pgsql:1}%{!?_pgsql:0}
+
%package pgsql
-Summary: mnogosearch with pgsql storage-support
+Summary: mnogosearch with pgsql storage-support
Summary(pl): mnogosearch z pgsqlem jako metod± przechowywania danych
Group: Networking/Utilities
+Group(de): Netzwerkwesen/Werkzeuge
+Group(es): Red/Utilitarios
+Group(pl): Sieciowe/Narzêdzia
+Group(pt_BR): Rede/Utilitários
Requires: %{name} = %{version}
%description pgsql
%description pgsql -l pl
Ten pakiet zawiera wsparcie dla postgresa jako sposobu przechowywania
-informacji.
+informacji.
Instalacja tego pakietu spowoduje za³o¿enie tabel w bazie mnogosearch.
+%endif
%package static
Summary: mnogo static libraries
Summary(pl): Biblioteki statyczne mnogo
Group: Development/Libraries
+Group(de): Entwicklung/Libraries
+Group(es): Desarrollo/Bibliotecas
+Group(fr): Development/Librairies
+Group(pl): Programowanie/Biblioteki
+Group(pt_BR): Desenvolvimento/Bibliotecas
+Group(ru): òÁÚÒÁÂÏÔËÁ/âÉÂÌÉÏÔÅËÉ
+Group(uk): òÏÚÒÏÂËÁ/â¦Â̦ÏÔÅËÉ
Requires: %{name}-devel = %{version}
%description static
%prep
%setup -q
-%patch0 -p1
+%patch0 -p0
+#%patch1 -p0
%build
libtoolize --copy --force
aclocal
autoconf
-automake -a -c -f
-#where the hell is pgsql?
-sed -e 's%{_prefix}\/include\/pgsql%{_prefix}\/include\/postgresql/' < configure.in > aqq
-mv -f aqq configure.in
+automake -a -c
+
+db="--with-built-in"
+
+%{?_mysql: db="--with-mysql"}
+%{?_pgsql: db="--with-pgsql"}
+
%configure \
--enable-syslog \
--enable-syslog=LOG_LOCAL6 \
--with-search-dir=/home/httpd/html \
--with-config-dir=%{_sysconfdir}/http/%{name} \
--infodir=%{_infodir} \
- --with-pgsql \
--with-openssl \
+ $db \
--enable-linux-pthreads \
--enable-charset-guesser \
--enable-news-extension \
--enable-fast-tag \
--enable-fast-cat \
--enable-fast-site \
- --enable-phrase
+ --enable-phrase \
+
+%{__make}
+
# enable automatic Russian charset guesser :-]
# wy uze www.linux.ru procitacli sewodnja?
-# --with-msql[=DIR] Include mSQL support. DIR is the mSQL base
# --with-iodbc[=DIR] Include iODBC support. DIR is the iODBC base
# --with-unixODBC[=DIR] Include unixODBC support. DIR is the unixODBC base
# --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-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-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
-# --with-buildin \
-# --with-mysql \
-#
+#
# FIXME: add selection of storage method, spliting into %{name}-common & %{name}-$DB_NAME
-%{__make}
%install
rm -rf $RPM_BUILD_ROOT
touch $RPM_BUILD_ROOT%{_sysconfdir}/locals
install %{SOURCE1} \
$RPM_BUILD_ROOT/etc/cron.daily/mnogosearch-gethostnames
+install %{SOURCE2} create/
gzip -z9 create/*
+gzip -z9 create/*/*
%clean
rm -rf $RPM_BUILD_ROOT
cp -f %{_sysconfdir}/indexer.conf-dist %{_sysconfdir}/indexer.conf
cat << EOF
-Please see docs (%{_defaultdocdir}/%{name} or http://localhost/mnogodoc),
-then read how to setup db connection, and put line like this
-"pgsql://user:password@/dbname/" into %{_sysconfdir}, then run sth like
+Please see docs (%{_defaultdocdir}/%{name} or http://localhost/mnogodoc),
+then read how to setup db connection, and put line like this
+"pgsql://user:password@/dbname/" into %{_sysconfdir}, then run sth like
psql < %{_defaultdocdir}/%{name}/pgsql/*.txt
EOF
+
+%if%{?_pgsql:1}%{!?_pgsql:0}
+
%post pgsql
echo 'Now I will try to Create Tables for postgres: '
su postgres -c "psql -U postgres template1 -c 'CREATE DATABASE mnogosearch;' "
rm -f /tmp/mnogo.aqq
%postun pgsql
-echo -n 'Dropping Database mnogosearch:'
+echo -n 'Dropping Database mnogosearch:'
su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
-
+%endif # _pgsql
+
%files
%defattr(644,root,root,755)
%doc COPYING README doc/* create/* create/*/*
%files devel
%defattr(644,root,root,755)
-#%{_includedir}/%{name}/*
+%{_includedir}/*
%files static
%defattr(644,root,root,755)