--- /dev/null
+--- mnogosearch-3.2.14/configure.in.orig 2003-07-29 12:05:53.000000000 +0200
++++ mnogosearch-3.2.14/configure.in 2003-10-04 12:53:39.032878392 +0200
+@@ -470,8 +470,12 @@
+ if test "$chasen" != no; then
+ LIBS_SAVE="$LIBS"
+ CFLAGS_SAVE="$CFLAGS"
+- LIBS="$LIBS -L/usr/local/lib -lchasen"
+- CFLAGS="$CFLAGS -I/usr/local/include"
++ if test "$chasen" != "yes"; then
++ LIBS="$LIBS -L$chasen/lib -lchasen"
++ CFLAGS="$CFLAGS -I$chasen/include"
++ else
++ LIBS="$LIBS -lchasen"
++ fi
+
+ AC_TRY_LINK([#include <stdio.h>
+ #include <chasen.h>
+@@ -500,8 +504,12 @@
+ if test "$mecab" != no; then
+ LIBS_SAVE="$LIBS"
+ CFLAGS_SAVE="$CFLAGS"
+- LIBS="$LIBS -L/usr/local/lib -lmecab -lstdc++ -lc_r"
+- CFLAGS="$CFLAGS -I/usr/local/include"
++ if test "$mecab" != "yes"; then
++ LIBS="$LIBS -L$mecab/lib -lmecab -lstdc++ -lc_r"
++ CFLAGS="$CFLAGS -I$mecab/include"
++ else
++ LIBS="$LIBS -lmecab -lstdc++ -lc_r"
++ fi
+
+ AC_TRY_LINK([#include <stdio.h>
+ #include <mecab.h>
+@@ -533,12 +541,12 @@
+ if test "$withval" = "yes"; then
+ if test -f /usr/include/expat.h; then
+ CFLAGS="$CFLAGS"
+- withval="/usr/"
++ withval="/usr"
+ else
+ CFLAGS="$CFLAGS -I/usr/local/include"
+- withval="/usr/local/"
++ withval="/usr/local"
+ fi
+- if test -f /usr/lib/libexpat.a; then
++ if test -f /usr/lib/libexpat.so -o -f /usr/lib/libexpat.a ; then
+ LIBS="$LIBS -lexpat"
+ else
+ LIBS="$LIBS -L/usr/local/lib -lexpat"
+@@ -549,9 +557,9 @@
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid Expat directory - unable to find expat.h under $withval)
+- $withval=""
++ withval=""
+ fi
+- if test -f $withval/lib/libexpat.a; then
++ if test -f $withval/lib/libexpat.so -o -f $withval/lib/libexpat.a; then
+ LIBS="$LIBS -L$withval/lib -lexpat"
+ else
+ AC_MSG_RESULT(no)
+@@ -580,18 +588,17 @@
+ else
+ SSL_INCDIR=/usr/local/ssl/include
+ fi
+- if test -f /usr/lib/libssl.a; then
+- SSL_LIBDIR=/usr/lib
++ if test -f /usr/lib/libssl.so -o -f /usr/lib/libssl.a; then
++ SSL_LFLAGS="-lcrypto -lssl"
+ else
+- SSL_LIBDIR=/usr/local/ssl/lib
++ SSL_LFLAGS="-L/usr/local/ssl/lib -lcrypto -lssl"
+ fi
+ else
+ SSL_INCDIR=$withval/include
+ test -d $withval/include/openssl && SSL_INCDIR=$withval/include
+- SSL_LIBDIR=$withval/lib
++ SSL_LFLAGS="-L$withval/lib -lcrypto -lssl"
+ fi
+ SSL_INCLUDE="-I$SSL_INCDIR"
+- SSL_LFLAGS="-L$SSL_LIBDIR -lcrypto -lssl"
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_HTTPS)
+ else
+@@ -634,7 +641,7 @@
+ [ --with-readline enable readline support for SQL monitor],
+ [
+ AC_DEFINE(HAVE_READLINE)
+- LIBS="$LIBS -lreadline -ltermcap"
++ LIBS="$LIBS -lreadline"
+ AC_MSG_RESULT(yes)
+ ],
+ [AC_MSG_RESULT([no])]
+@@ -662,7 +669,7 @@
+ withval="/usr/local/mysql"
+ elif test -f /usr/include/mysql/mysql.h; then
+ MYSQL_INCDIR=/usr/include/mysql
+- MYSQL_LIBDIR=/usr/lib/mysql
++ MYSQL_LIBDIR=/usr/lib
+ withval="/usr"
+ elif test -f /usr/include/mysql.h; then
+ MYSQL_INCDIR=/usr/include
+@@ -697,7 +704,11 @@
+ fi
+ fi
+ MYSQL_INCLUDE="-I$MYSQL_INCDIR"
++ if test "$MYSQL_LIBDIR" = "/usr/lib" ; then
++ MYSQL_LFLAGS="-lmysqlclient"
++ else
+ MYSQL_LFLAGS="-L$MYSQL_LIBDIR -lmysqlclient"
++ fi
+
+ AC_DEFINE(HAVE_MYSQL)
+ AC_MSG_RESULT($withval)
+@@ -735,8 +746,8 @@
+ test -f /usr/include/postgresql/libpq-fe.h && PGSQL_INCDIR=/usr/include/postgresql
+ test -f /usr/local/include/libpq-fe.h && PGSQL_INCDIR=/usr/local/include
+ PGSQL_LIBDIR=/usr/local/lib
+- test -f /usr/lib/libpq.a && PGSQL_LIBDIR=/usr/lib
+- test -f /usr/local/pgsql/lib/libpq.a && PGSQL_LIBDIR=/usr/local/pgsql/lib
++ test -f /usr/lib/libpq.so -o -f /usr/lib/libpq.a && PGSQL_LIBDIR=/usr/lib
++ test -f /usr/local/pgsql/lib/libpq.so -o -f /usr/local/pgsql/lib/libpq.a && PGSQL_LIBDIR=/usr/local/pgsql/lib
+ else
+ PGSQL_INCDIR=$withval/include
+ test -d $withval/include/pgsql && PGSQL_INCDIR=$withval/include/pgsql
+@@ -744,7 +755,11 @@
+ test -d $withval/lib/pgsql && PGSQL_LIBDIR=$withval/lib/pgsql
+ fi
+ PGSQL_INCLUDE="-I$PGSQL_INCDIR"
++ if "$PGSQL_LIBDIR" = "/usr/lib"; then
++ PGSQL_LFLAGS="-lpq"
++ else
+ PGSQL_LFLAGS="-L$PGSQL_LIBDIR -lpq"
++ fi
+ AC_DEFINE(HAVE_PGSQL)
+ AC_MSG_RESULT(yes)
+ have_db=yes
+@@ -809,7 +824,7 @@
+ install directory, defaults to /usr/local.],
+ [
+ if test "$withval" = "yes"; then
+- withval=/usr/local
++ withval=/usr
+ fi
+
+ if test "$withval" != "no"; then
+@@ -820,8 +835,16 @@
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid iODBC directory - unable to find isql.h)
+ fi
++ if test "$IODBC_LIBDIR" = "/usr/lib"; then
++ IODBC_LFLAGS="-liodbc"
++ else
+ IODBC_LFLAGS="-L$IODBC_LIBDIR -liodbc"
++ fi
++ if test "$IODBC_INCDIR" = "/usr/include"; then
++ IODBC_INCLUDE=
++ else
+ IODBC_INCLUDE="-I$IODBC_INCDIR"
++ fi
+ AC_DEFINE(HAVE_IODBC)
+ AC_MSG_RESULT(yes)
+ have_db=yes
+@@ -842,12 +865,12 @@
+ if test "$withval" != "no"; then
+ if test "$withval" = "yes"; then
+ if test -f /usr/include/sql.h; then
+- UNIXODBC_INCDIR=/usr/include
+- UNIXODBC_LIBDIR=/usr/lib
++ UNIXODBC_INCLUDE=
++ UNIXODBC_LFLAGS="-lodbc"
+ withval="/usr"
+ elif test -f /usr/local/include/sql.h; then
+- UNIXODBC_INCDIR=/usr/local/include
+- UNIXODBC_LIBDIR=/usr/local/lib
++ UNIXODBC_INCLUDE="-I/usr/local/include"
++ UNIXODBC_LFLAGS="-L/usr/local/lib -lodbc"
+ withval="/usr/local"
+ else
+ AC_MSG_RESULT(no)
+@@ -855,16 +878,14 @@
+ fi
+ else
+ if test -f $withval/include/sql.h; then
+- UNIXODBC_INCDIR=$withval/include
+- UNIXODBC_LIBDIR=$withval/lib
++ UNIXODBC_INCLUDE="-I$withval/include"
++ UNIXODBC_LFLAGS="-L$withval/lib -lodbc"
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid unixODBC directory - unable to find sql.h)
+ fi
+ fi
+ have_db=yes
+- UNIXODBC_LFLAGS="-L$UNIXODBC_LIBDIR -lodbc"
+- UNIXODBC_INCLUDE="-I$UNIXODBC_INCDIR"
+ AC_DEFINE(HAVE_UNIXODBC)
+ AC_MSG_RESULT($withval)
+ if test "x$DBTYPE" = "x" ; then
+@@ -1178,7 +1199,7 @@
+ install directory, defaults to /usr/local.],
+ [
+ if test "$withval" = "yes"; then
+- withval=/usr/local
++ withval=/usr
+ fi
+
+ if test "$withval" != "no"; then
+@@ -1189,8 +1210,16 @@
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid FreeTDS directory - unable to find ctpublic.h)
+ fi
++ if test "$CTLIB_LIBDIR" = "/usr/lib"; then
++ CTLIB_LFLAGS="-lct"
++ else
+ CTLIB_LFLAGS="-L$CTLIB_LIBDIR -lct"
++ fi
++ if test "$CTLIB_INCDIR" = "/usr/include"; then
++ CTLIB_INCLUDE=
++ else
+ CTLIB_INCLUDE="-I$CTLIB_INCDIR"
++ fi
+ AC_DEFINE(HAVE_CTLIB)
+ AC_MSG_RESULT(yes)
+ have_db=yes
#
# Conditional build:
-# _with_pgsql support for postgres
-# _with_mysql support for mysql
+%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_with 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
#
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
Source2: %{name}-Mysql-database
Source3: %{name}-stored.init
Source4: %{name}-dbgen
+Patch0: %{name}-acfixes.patch
URL: http://www.mnogosearch.ru/
BuildRequires: autoconf
BuildRequires: automake
+%{?with_chasen:BuildRequires: chasen-devel}
+%{?with_expat:BuildRequires: expat-devel}
+%{?with_iodbc:BuildRequires: libiodbc-devel}
BuildRequires: libtool
-%{?_with_mysql:BuildRequires: mysql-devel}
-BuildRequires: openssl-devel >= 0.9.7c
-%{?_with_pgsql:BuildRequires: postgresql-devel}
+%{?with_mysql:BuildRequires: mysql-devel}
+%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7c}
+%{?with_pgsql:BuildRequires: postgresql-devel}
+%{?with_unixodbc:BuildRequires: unixODBC-devel}
+BuildRequires: zlib-devel
PreReq: webserver
-%{?_with_pgsql:PreReq: postgresql-clients}
+#%{?with_pgsql:PreReq: postgresql-clients}
Requires: %{name}-lib = %{version}
Obsoletes: udmsearch
Obsoletes: aspseek
Summary: mnogosearch library
Summary(pl): Biblioteka mnogosearch
Group: Libraries
-Requires(post): /sbin/ldconfig
%description lib
This package contains mnogosearch library files.
Summary(pl): Pliki nag³ówkowe mnogosearch
Group: Development/Libraries
Requires: %{name}-lib = %{version}
+%{?with_expat:Requires: expat-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.
%prep
%setup -q
+%patch -p1
%build
find . -type d -name CVS | xargs rm -rf
-rm -f missing
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__automake}
-
-db="--with-built-in"
-
-%{?_with_mysql: db="--with-mysql"}
-%{?_with_pgsql: db="--with-pgsql"}
-
%configure \
DOCBOOKSTYLE="/usr/share/sgml/docbook/dsssl-stylesheets" \
- --enable-syslog \
--enable-syslog=LOG_LOCAL6 \
- --with-image-dir=%{htmldir}/%{name} \
- --with-cgi-bin-dir=%{cgidir} \
- --with-search-dir=%{htmldir} \
- --with-config-dir=%{_sysconfdir}/http/%{name} \
- --with-openssl \
- $db \
- --enable-linux-pthreads \
--enable-charset-guesser \
- --enable-news-extension \
- --enable-fast-tag \
+ %{?with_chasen:--enable-chasen} \
--enable-fast-cat \
+ --enable-fast-tag \
--enable-fast-site \
+ --enable-linux-pthreads \
+ --enable-news-extension \
--enable-phrase \
--enable-shared \
- --with-zlib \
-# --enable-dmalloc
+ --with-built-in \
+ --with-cgi-bin-dir=%{cgidir} \
+ --with-config-dir=%{_sysconfdir}/http/%{name} \
+ %{?with_expat:--with-expat} \
+ --with-image-dir=%{htmldir}/%{name} \
+ %{?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-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-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
by something like "psql < %{_defaultdocdir}/%{name}-%{version}/create/pgsql/*.txt"
EOF
-%postun lib -p /sbin/ldconfig
%post lib -p /sbin/ldconfig
+%postun lib -p /sbin/ldconfig
-%post pgsql
-echo "Creating database mnogosearch..."
-su postgres -c "psql -U postgres template1 < %{_docdir}/%{name}-%{version}/create/pgsql/mnogosearch-all.psql"
-echo "Mnogosearch user was created with passwd aqq123 - change it!"
-
-%postun pgsql
-echo -n 'Dropping Database mnogosearch:'
-su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
+# can be only in some script - %post/%postun must not mess with databases
+#%post pgsql
+#echo "Creating database mnogosearch..."
+#su postgres -c "psql -U postgres template1 < %{_docdir}/%{name}-%{version}/create/pgsql/mnogosearch-all.psql"
+#echo "Mnogosearch user was created with passwd aqq123 - change it!"
+#
+#%postun pgsql
+#echo -n 'Dropping Database mnogosearch:'
+#su postgres -c "psql -U postgres template1 -c 'DROP DATABASE mnogosearch;' "
%post stored
/sbin/chkconfig --add mnogosearch-stored