Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > by-pkgid > ad93dc44537e32c2a952b692c184306d > files > 11

mnogosearch-3.2.29-6mdk.src.rpm

%define	name mnogosearch
%define version 3.2.29
%define release 6mdk

%define major		3
%define minor		2
%define libname %mklibname %{name} %{major}.%{minor}

%define build_mysql 0
%define build_postgresql 0

# commandline overrides:
# rpm -ba|--rebuild --with 'xxx'
%{?_with_mysql: %{expand: %%define build_mysql 1}}
%{?_with_postgresql: %{expand: %%define build_postgresql 1}}

%if %{build_mysql}
%define build_mysql 1
%define build_postgresql 0
%endif

%if %{build_postgresql}
%define build_mysql 0
%define build_postgresql 1
%endif

Summary:		Another one web indexing and searching system for a small domain or intranet
Name:			%{name}
Version:		%{version}
Release:		%{release}
License:		GPL
Group:			System/Servers
Source0:		http://www.mnogosearch.org/Download/mnogosearch-%{version}.tar.bz2
Source1:		%{name}-gethostnames.bz2
Source2:		%{name}-dbgen.bz2
Source3:		%{name}-Mysql-database.bz2
Source4:		%{name}-searchd.init.bz2
Source5:		%{name}.png.bz2
Patch0:			mnogosearch-3.2.16-local_button.patch.bz2
Patch1:			mnogosearch-3.2.16-udm-config.patch.bz2
Patch2:			mnogosearch-3.2.16-soname.patch.bz2
Patch3:			%{name}-3.2.11-docs_fix.patch.bz2
URL:			http://www.mnogosearch.org/
PreReq:			rpm-helper
PreReq:			webserver
PreReq:			%{libname} = %{version}
BuildRequires:		autoconf2.5
BuildRequires:		automake1.7
BuildRequires:		libtool
BuildRequires:		openssl-devel
BuildRequires:		zlib-devel
BuildRequires:		expat-devel
BuildRequires:		openssl-devel
BuildRequires:		openjade
BuildRequires:		docbook-utils
BuildRequires:		sqlite-devel
Conflicts:		gnusearch
%if %{build_mysql}
BuildRequires:		MySQL-devel
%endif
%if %{build_postgresql}
BuildRequires:		postgresql-devel
%endif
%if %mdkversion >= 1020
BuildRequires:		multiarch-utils >= 1.0.3
%endif
BuildRoot:		%{_tmppath}/%{name}-buildroot

%description
mnoGoSearch (formerly known as UdmSearch) is a full-featured Web
search engine that you can use to build search engines over HTTP,
HTTPS, FTP, and NTTP servers, local files, and database big text
fields. It supports Oracle, MS SQL Server, MySQL, PostgreSQL,
InterBase/Firebird, Openlink Virtuoso, Intersystems Cach, iODBC,
EasySoft ODBC, and unixODBC database backends. It has XML, HTML,
and TEXT built-in support, and external converters support for
other document types. An automatic language/charset guesser for
more 70 language/charset combinations is included, along with
basic authorization support, and you may index password-protected
intranet HTTP servers with proxy authorization support. 

You can also rebuild %{name} with support for either MySQL,
PostgreSQL or use the default SQLite database.

The following are valid build options.

(ie. use with rpm --rebuild):

    --with postgresql	Build with PostgreSQL support
    --with mysql	Build with MySQL support (default)

%package -n		%{libname}
Summary:		Libraries for %{name} 
Group:          	System/Libraries

%description -n		%{libname}
This package contains the %{name} library files.

%package -n		%{libname}-devel
Summary:		Development headers and libraries for %{name}
Group:			Development/C
Requires:		%{libname} = %{version}
Provides:		lib%{name}-devel = %{version}

%description -n		%{libname}-devel
This package contains the %{name} development files.

%prep

%setup -q -n mnogosearch-%{version}
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0

# CVS cleanup
echo "Checking for CVS specific files and removing them"
for i in `find . -type d -name CVS` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -r $i; fi >&/dev/null
done

# fix one weird bug...
echo "SUBDIRS= mysql pgsql sqlite" > create/Makefile.am

bzcat %{SOURCE1} > mnogosearch-gethostnames
bzcat %{SOURCE2} > mnogosearch-dbgen
bzcat %{SOURCE3} > mysql.sql
bzcat %{SOURCE4} > mnogosearch-searchd.init
bzcat %{SOURCE5} > mnogosearch.png

%build
export WANT_AUTOCONF_2_5=1
rm -f missing
libtoolize --copy --force; aclocal-1.7; autoconf; automake-1.7 --add-missing

%serverbuild

%configure2_5x \
    --localstatedir=%{_var}/lib/%{name} \
    --sysconfdir=%{_sysconfdir}/%{name} \
    --datadir=%{_datadir}/%{name} \
    --enable-syslog \
    --enable-syslog=LOG_LOCAL6 \
    --with-image-dir=%{_var}/www/html/%{name} \
    --with-cgi-bin-dir=%{_var}/www/cgi-bin \
    --with-search-dir=%{_var}/www/html \
    --with-config-dir=%{_sysconfdir}/httpd/%{name} \
    --with-openssl \
%if !%{build_mysql} && !%{build_postgresql}
    --with-sqlite=%{_prefix} \
%endif
%if %{build_mysql}
    --with-mysql \
%endif
%if %{build_postgresql}
    --with-pgsql \
%endif
    --enable-linux-pthreads \
    --enable-charset-guesser \
    --with-extra-charsets=all \
    --enable-news-extension \
    --enable-fast-tag \
    --enable-fast-cat \
    --enable-fast-site \
    --enable-phrase \
    --enable-shared \
    --with-zlib \
    --with-expat

%make

# TODO: --with-expat
# conditional build: --with-unixODBC --with-freetds

%install
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}

# don't fiddle with the initscript!
export DONT_GPRINTIFY=1

install -d %{buildroot}%{_includedir}/%{name}-%{version}
install -d %{buildroot}%{_infodir}
install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_localstatedir}
install -d %{buildroot}%{_sysconfdir}/cron.daily
install -d %{buildroot}%{_var}/www/cgi-bin
install -d %{buildroot}%{_var}/www/html
install -d %{buildroot}%{_var}/www/icons

%makeinstall_std

mv -f %{buildroot}%{_bindir}/*.cgi %{buildroot}%{_var}/www/cgi-bin/

(cd %{buildroot}%{_sysconfdir}/%{name}
echo "#"> locals
for f in *-dist ; do
    mv -f $f `basename $f -dist`
done
)

install -m0755 mnogosearch-gethostnames %{buildroot}%{_sysconfdir}/cron.daily/
install -m0755 mnogosearch-dbgen %{buildroot}%{_sysconfdir}/cron.daily/
install -m0755 mnogosearch-searchd.init %{buildroot}%{_initrddir}/searchd
install -m0644 mnogosearch.png %{buildroot}%{_var}/www/icons/

mkdir html
mv -f doc/*.html html

# rename this file
mv %{buildroot}%{_bindir}/udm-config %{buildroot}%{_bindir}/%{name}-%{version}-config

# move headers in place (P2 should help finding this)
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/%{name}-%{version}/

# cleanup
rm -rf %{buildroot}/usr/doc
rm -rf %{buildroot}%{_datadir}/%{name}
find create -type f -name "Makefile*" | xargs rm

%if %mdkversion >= 1020
%multiarch_binaries %{buildroot}%{_bindir}/%{name}-%{version}-config
%multiarch_includes %{buildroot}%{_includedir}/%{name}-%{version}/udm_config.h
%endif

%clean
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}

%post
%_post_service searchd

%preun
%_preun_service searchd

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%files
%defattr (0644,root,root,0755)
%doc ChangeLog README TODO html doc/samples
%doc create/sqlite

%if %{build_mysql}
%doc create/mysql
%endif

%if %{build_postgresql}
%doc create/pgsql
%endif

%attr (0755,root,root) %{_sbindir}/indexer
%attr (0755,root,root) %{_bindir}/mconv
%attr (0755,root,root) %{_bindir}/mguesser
%attr (0755,root,root) %{_sbindir}/searchd
%attr (0755,root,root) %{_var}/www/cgi-bin/*
%attr (0644,root,root) %{_var}/www/icons/mnogosearch.png
%dir %{_localstatedir}/%{name}
%dir %{_sysconfdir}/%{name}

%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/indexer.conf
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/langmap.conf
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/searchd.conf
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/stopwords.conf
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.htm
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/mandarin.freq
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/thai.freq
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/TraditionalChinese.freq
%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/locals

%dir %{_sysconfdir}/%{name}/langmap
%dir %{_sysconfdir}/%{name}/stopwords
%dir %{_sysconfdir}/%{name}/synonym

%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*/*
%attr (0755,root,root) %{_sysconfdir}/cron.daily/*
%attr (0755,root,root) %{_initrddir}/searchd
%attr (0644,root,root) %{_mandir}/man?/*

%files -n %{libname}
%defattr (0644,root,root,0755)
%attr (0755,root,root) %{_libdir}/libmnogocharset-%{major}.%{minor}*
%attr (0755,root,root) %{_libdir}/libmnogosearch-%{major}.%{minor}*

%files -n %{libname}-devel
%defattr (0644,root,root,0755)
%if %mdkversion >= 1020
%multiarch %attr (0755,root,root) %{multiarch_bindir}/%{name}-%{version}-config
%multiarch %attr (0644,root,root) %{multiarch_includedir}/%{name}-%{version}/udm_config.h
%endif
%attr (0755,root,root) %{_bindir}/%{name}-%{version}-config
%attr (0644,root,root) %{_includedir}/%{name}-%{version}/*.h
%attr (0644,root,root) %{_libdir}/libmnogocharset.a
%attr (0644,root,root) %{_libdir}/libmnogosearch.a
%attr (0644,root,root) %{_libdir}/libmnogocharset.la
%attr (0755,root,root) %{_libdir}/libmnogocharset.so
%attr (0644,root,root) %{_libdir}/libmnogosearch.la
%attr (0755,root,root) %{_libdir}/libmnogosearch.so

%changelog
* Mon Feb 07 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.29-6mdk
- rpmlint fixes

* Mon Feb 07 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.29-5mdk
- fix deps and conditional %%multiarch

* Fri Dec 31 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.29-4mdk
- revert latest "lib64 fixes"

* Tue Dec 28 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.29-3mdk
- lib64 fixes
- no..., spamassassin at mdk does not like this package...

* Sat Dec 25 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.29-2mdk
- new %%description (the old one annoyed spamassassin on the changelog list;))

* Sat Dec 25 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.29-1mdk
- 3.2.29

* Fri Dec 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.28-1mdk
- 3.2.28

* Sun Dec 05 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.26-1mdk
- 3.2.26

* Wed Nov 24 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.25-2mdk
- nuke redundant provides
- fix deps

* Tue Nov 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.25-1mdk
- 3.2.25

* Fri Nov 05 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.24-1mdk
- 3.2.24

* Thu Oct 21 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.23-1mdk
- 3.2.23

* Fri Oct 15 2004 Lenny Cartier <lenny@mandrakesoft.com> 3.2.22-1mdk
- 3.2.22

* Wed Sep 01 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.21-1mdk
- 3.2.21

* Mon Aug 23 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.20-1mdk
- 3.2.20

* Mon Jul 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.19-1mdk
- 3.2.19

* Tue Jun 08 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.18-1mdk
- 3.2.18

* Wed May 05 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.17-1mdk
- 3.2.17

* Mon Apr 19 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.2.16-1mdk
- 3.2.16
- stored and cached is dead, long live searchd...
- added S2 from PLD
- merge the static devel package into the devel package
- misc spec file fixes

* Wed Feb 25 2004 Pascal Terjan <pterjan@mandrake.org> 3.2.15-3mdk
- own %%{_sysconfdir}/%%{name}

* Tue Feb 24 2004 Pascal Terjan <pterjan@mandrake.org> 3.2.15-2mdk
- conflict gnusearch

* Sat Sep 27 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.15-1mdk
- 3.2.15
- build against sqlite per default
- fix invalid-build-requires
- fix explicit-lib-dependency

* Tue Aug 26 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.14-1mdk
- 3.2.14
- use --with-mysql as --with-built-in is broken
- fix requires, buildrequires and obsoletes
- misc spec file fixes

* Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.11-2mdk
- rebuild

* Mon Jun 23 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.11-1mdk
- 3.2.11
- drop P0, it's included upstream
- rediff P2 & P3
- added P4 to make the install work (wierd stuff!)
- added new installed files
- misc spec file fixes

* Tue Jun 03 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.10-3mdk
- make it provide

* Mon Apr 28 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.10-2mdk
- try to fix the soname again...

* Fri Apr 25 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.10-1mdk
- 3.2.10
- try to fix the soname

* Sat Apr 12 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.9-1mdk
- 3.2.9
- lots and lots and lots of spec and config file fixes
- use the %%mklibname stuff
- added P2 and fix unversioned files (is this correct?)
- fix S3 & S4 (piddir amongst others, duh!)
- need help fixing "invalid-soname", anyone?

* Sat Feb 01 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.8-1mdk
- 3.2.8
- drop P2 & P3
- rediff P1
- add UDM_CONF_DIR env var to S3 & S4

* Sat Jan 18 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.7-3mdk
- rebuilt against rebuilt buildrequires

* Tue Jan 14 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.7-2mdk
- new S3 & S4
- misc spec file fixes

* Wed Jan 08 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.7-1mdk
- 3.2.7
- rediff P0

* Sat Sep 21 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.2.6-1mdk
- initial cooker contrib, ripped from PLD, adapted for ML
- used spec file voodoo magic from the nagios package to be able
  to rebuild with either MySQL or PostgreSQL support.
- fixed the init scripts
- added S5 and P3