%define name mnogosearch %define version 3.2.15 %define release 3mdk %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.ru/Download/mnogosearch-%{version}.tar.bz2 Source1: %{name}-gethostnames.bz2 Source2: %{name}-Mysql-database.bz2 Source3: %{name}-stored.init.bz2 Source4: %{name}-cached.init.bz2 Source5: %{name}.png.bz2 Patch1: %{name}-local_button.patch.bz2 Patch2: %{name}-3.2.11-udm-config.patch.bz2 Patch3: %{name}-3.2.11-soname.patch.bz2 Patch4: %{name}-3.2.11-docs_fix.patch.bz2 URL: http://www.mnogosearch.ru/ PreReq: rpm-helper PreReq: webserver PreReq: %{libname} = %{version} BuildRequires: autoconf2.5 BuildRequires: automake BuildRequires: libtool BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: expat-devel BuildRequires: openssl-devel BuildRequires: openjade BuildRequires: docbook-utils BuildRequires: sqlite-devel Obsoletes: udmsearch Provides: udmsearch Provides: indexserver Conflicts: gnusearch %if %{build_mysql} #Requires: libmysql12 BuildRequires: MySQL-devel %endif %if %{build_postgresql} #Requires: libpq3 BuildRequires: postgresql-libs-devel BuildRequires: postgresql-devel %endif BuildRoot: %{_tmppath}/%{name}-buildroot %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. You can also rebuild %{name} with support for either MySQL, PostgreSQL or the built-in 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}-%{release} Provides: lib%{name}-devel = %{version} %description -n %{libname}-devel This package contains the %{name} development files. %package -n %{libname}-static-devel Summary: Development static libraries for %{name} Group: Development/C Requires: %{libname}-devel = %{version}-%{release} %description -n %{libname}-static-devel This package contains static libraries of %{name}. %package stored Summary: Daemon for saving gziped versions of documents. Group: System/Servers PreReq: rpm-helper Requires: %{name} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} %description stored This package contains optional part of %{name} stored daemon, which stores locally gziped versions of parsed (& indexed) html files, news articles, etc. %prep %setup -q -n mnogosearch-%{version} %patch1 -p1 -b .local_button %patch2 -p0 -b .udm-config %patch3 -p0 -b .soname %patch4 -p0 -b .docs_fix # 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 %build export WANT_AUTOCONF_2_5=1 rm -f missing libtoolize --copy --force; aclocal; autoconf; automake --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 %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 ln -sf %{_sbindir}/indexer %{buildroot}%{_sysconfdir}/cron.daily/mnogo-dbgen mv -f %{buildroot}%{_bindir}/*.cgi %{buildroot}/var/www/cgi-bin/ (cd %{buildroot}%{_sysconfdir}/%{name} touch locals for f in *-dist ; do mv -f $f `basename $f -dist` done ) bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/cron.daily/mnogosearch-gethostnames bzcat %{SOURCE2} > mysql.sql bzcat %{SOURCE3} > %{buildroot}%{_initrddir}/mnogosearch-stored bzcat %{SOURCE4} > %{buildroot}%{_initrddir}/mnogosearch-cached bzcat %{SOURCE5} > %{buildroot}/var/www/icons/mnogosearch.png chmod 755 %{buildroot}%{_sysconfdir}/cron.daily/mnogosearch-gethostnames chmod 755 %{buildroot}%{_initrddir}/* chmod 644 %{buildroot}/var/www/icons/mnogosearch.png mkdir html mv -f doc/*.html html # fix this rm -rf %{buildroot}/usr/doc # and this... rm -rf %{buildroot}%{_datadir}/%{name} # and the sql stuff for doc inclusion... find create -type f -name "Makefile*" | xargs rm # 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}/ %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} %post %_post_service mnogosearch-cached %preun %_preun_service mnogosearch-cached %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %post stored %_post_service mnogosearch-stored %preun stored %_preun_service mnogosearch-stored %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 %config(noreplace) %attr(0755,root,root) %{_initrddir}/mnogosearch-cached %attr(0755,root,root) %{_sbindir}/[^s]* %attr(0755,root,root) %{_sbindir}/s[^t]* %attr(0755,root,root) /var/www/cgi-bin/* %attr(0644,root,root) /var/www/icons/mnogosearch.png %dir %{_localstatedir}/%{name} %{_localstatedir}/%{name}/raw %{_localstatedir}/%{name}/splitter %{_localstatedir}/%{name}/tree %attr(0775,root,apache) %{_localstatedir}/%{name}/cache %dir %{_sysconfdir}/%{name} %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.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}/locals %dir %{_sysconfdir}/%{name}/langmap %dir %{_sysconfdir}/%{name}/stopwords %dir %{_sysconfdir}/%{name}/synonym %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*/* %config(noreplace) %attr(0755,root,root) %{_sysconfdir}/cron.daily/* %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) %attr (0755,root,root) %{_bindir}/%{name}-%{version}-config %attr (0644,root,root) %{_includedir}/%{name}-%{version}/*.h %attr (0755,root,root) %{_libdir}/libmnogocharset.la %attr (0755,root,root) %{_libdir}/libmnogocharset.so %attr (0755,root,root) %{_libdir}/libmnogosearch.la %attr (0755,root,root) %{_libdir}/libmnogosearch.so %files -n %{libname}-static-devel %defattr(0644,root,root,0755) %attr (0644,root,root) %{_libdir}/libmnogocharset.a %attr (0644,root,root) %{_libdir}/libmnogosearch.a %files stored %defattr(0644,root,root,0755) %config(noreplace) %attr(0755,root,root) %{_initrddir}/mnogosearch-stored %attr(0755,root,root) %{_sbindir}/stored %{_localstatedir}/%{name}/store %changelog * 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