Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > by-pkgid > 09990237836dd6d297c62600a0a50802 > files > 2

hyperestraier-1.4.0-1mdv2007.0.src.rpm

%define qdbm_version 1.8.70

%define major 8
%define libname_orig lib%{name}
%define libname %mklibname %{name} %{major}

Summary:	A full-text search system for communities
Name:		hyperestraier
Version:	1.4.0
Release:	%mkrel 1
Group:		Text tools
License:	LGPL
URL:		http://hyperestraier.sourceforge.net/
Source0:	http://hyperestraier.sourceforge.net/%{name}-%{version}.tar.bz2
BuildRequires:	libqdbm-devel >= %{qdbm_version}
BuildRequires:	zlib-devel
BuildRequires:	bzip2-devel
BuildConflicts:	%{libname}-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root

%description
Hyper Estraier is a full-text search system. You can search lots of documents
for some documents including specified words. If you run a web site, it is
useful as your own search engine for pages in your site. Also, it is useful as
search utilities of mail boxes and file servers.

%package	cgi
Summary:	Hyperestraier CGI programs
Group:		System/Servers
Requires(pre): rpm-helper
Requires(postun): rpm-helper
Requires(pre):  apache-conf >= 2.2.0
Requires(pre):  apache >= %{apache_version}
Requires:	apache-conf >= 2.2.0
Requires:	apache >= %{apache_version}
Requires:	%{name} = %{version}

%description	cgi
Hyper Estraier is a full-text search system. You can search lots of documents
for some documents including specified words. If you run a web site, it is
useful as your own search engine for pages in your site. Also, it is useful as
search utilities of mail boxes and file servers.

This package contains the CGI programs for Hyperestraier

%package -n	%{libname}
Summary:	Hyperestraier library
Group:		System/Libraries
Provides:	%{libname_orig} = %{version}-%{release}

%description -n	%{libname}
Hyper Estraier is a full-text search system. You can search lots of documents
for some documents including specified words. If you run a web site, it is
useful as your own search engine for pages in your site. Also, it is useful as
search utilities of mail boxes and file servers.

This package contains the Hyperestraier shared library.

%package -n	%{libname}-devel
Summary:	Headers of %{name} for development
Group:		Development/C
Requires:	%{libname} = %{version}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	%{libname_orig}-devel = %{version}-%{release}

%description -n %{libname}-devel
Hyper Estraier is a full-text search system. You can search lots of documents
for some documents including specified words. If you run a web site, it is
useful as your own search engine for pages in your site. Also, it is useful as
search utilities of mail boxes and file servers.

This package contains the Hyperestraier static library and its header files.

%prep

%setup -q

%build

%configure2_5x \
    --disable-mecab \
    --enable-zlib \
    --disable-lzo \
    --enable-bzip \
    --libexecdir=/var/www/cgi-bin

# (oe) zeroing out LDENV="" RUNENV="" prevents rpath to be compiled in, but can cause binaries
# to be built against old installed libs, hence the BuildConflicts: %{libname}-devel

%make CFLAGS="%{optflags} -fPIC" LDENV="" RUNENV=""

%check
make check

%install
rm -rf %{buildroot}

%makeinstall_std

mv %{buildroot}%{_bindir}/estconfig %{buildroot}%{_bindir}/est-config

install -d %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d
cat > apache-hyperestraier.conf << EOF

<Files /var/www/cgi-bin/estseek.cgi>
    Options ExecCGI FollowSymlinks
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Files>

EOF
install -m0755 apache-hyperestraier.conf %{buildroot}%{_sysconfdir}/httpd/conf/webapps.d/hyperestraier.conf

install -d %{buildroot}%{_sysconfdir}/%{name}
install -m0644 estseek.conf %{buildroot}%{_sysconfdir}/%{name}/
install -m0644 estseek.tmpl %{buildroot}%{_sysconfdir}/%{name}/
install -m0644 estseek.top %{buildroot}%{_sysconfdir}/%{name}/

pushd %{buildroot}/var/www/cgi-bin
    ln -s %{_sysconfdir}/%{name}/estseek.conf estseek.conf
    ln -s %{_sysconfdir}/%{name}/estseek.tmpl estseek.tmpl
    ln -s %{_sysconfdir}/%{name}/estseek.top estseek.top
popd

# remove docs (they should be installed by %doc)
rm -rf %{buildroot}%{_datadir}/hyperestraier/doc/
rm -f %{buildroot}%{_datadir}/hyperestraier/{COPYING,ChangeLog,THANKS}
rm -f %{buildroot}%{_libdir}/*.*cgi

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

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

%post cgi
if [ -f %{_var}/lock/subsys/httpd ]; then
    %{_initrddir}/httpd restart 1>&2;
fi

%postun cgi
if [ "$1" = "0" ]; then
    if [ -f %{_var}/lock/subsys/httpd ]; then
        %{_initrddir}/httpd restart 1>&2
    fi
fi

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING ChangeLog README THANKS
%doc doc/*
%{_bindir}/estcall
%{_bindir}/estcmd
%{_bindir}/estload
%{_bindir}/estmaster
%{_bindir}/estmttest
%{_bindir}/estwolefind
%{_bindir}/estwaver
%{_bindir}/estbutler
%{_datadir}/hyperestraier/est*
%{_datadir}/hyperestraier/filter/*
%{_datadir}/hyperestraier/increm/*
%{_datadir}/hyperestraier/locale/*/*
%{_mandir}/man1/*

%files cgi
%defattr(-,root,root)
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/estseek.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/estseek.tmpl
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/estseek.top
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf/webapps.d/hyperestraier.conf
/var/www/cgi-bin/estseek.cgi
/var/www/cgi-bin/estseek.conf
/var/www/cgi-bin/estseek.tmpl
/var/www/cgi-bin/estseek.top

%files -n %{libname}
%defattr(-,root,root)
%doc COPYING
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%{_bindir}/est-config
%{_includedir}/*.h
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man3/*

%changelog
* Mon Aug 28 2006 Lenny Cartier <lenny@mandriva.com> 1.4.0-1mdv2007.0
- 1.4.0

* Wed Aug 23 2006 Lenny Cartier <lenny@mandriva.com> 1.3.9-1mdv2007.0
- 1.3.9

* Wed Jul 05 2006 Lenny Cartier <lenny@mandriva.com> 1.3.1-1mdv2007.0
- 1.3.1

* Thu Jun 22 2006 Lenny Cartier <lenny@mandriva.com> 1.2.9-1mdv2007.0
- 1.2.9

* Sun Jun 18 2006 Emmanuel Andry <eandry@mandriva.org> 1.2.8-1mdv2007.0
- 1.2.8

* Mon May 29 2006 Emmanuel Andry <eandry@mandriva.org> 1.2.7-1mdk
- 1.2.7

* Tue May 16 2006 Lenny Cartier <lenny@mandriva.com> 1.2.6-1mdk
- 1.2.6

* Wed Apr 26 2006 Lenny Cartier <lenny@mandriva.com> 1.2.3-1mdk
- 1.2.3

* Mon Mar 27 2006 Lenny Cartier <lenny@mandriva.com> 1.1.6-2mdk
- rebuild with new qdbm

* Mon Mar 27 2006 Lenny Cartier <lenny@mandriva.com> 1.1.6-1mdk
- 1.1.6

* Mon Mar 20 2006 Oden Eriksson <oeriksson@mandriva.com> 1.1.5-2mdk
- spec file cleanup

* Mon Mar 20 2006 Oden Eriksson <oeriksson@mandriva.com> 1.1.5-1mdk
- 1.1.5
- fix deps
- broke out the cgi programs into its own sub package

* Fri Jan 13 2006 UTUMI Hirosi <utuhiro78@yahoo.co.jp> 1.1.2-1mdk
- new release
- bump major from 7 to 8

* Tue Nov 29 2005 Thierry Vignaud <tvignaud@mandriva.com> 1.0.6-1mdk
- bump major from 6 to 7 (it was wrong before)
- new release (UTUMI Hirosi <utuhiro78@yahoo.co.jp>)

* Thu Nov 03 2005 UTUMI Hirosi <utuhiro78@yahoo.co.jp> 1.0.3-1mdk
- new release

* Sun Oct 30 2005 UTUMI Hirosi <utuhiro78@yahoo.co.jp> 1.0.2-1mdk
- initial spec for Mandriva Linux