| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- ##
- ## htdig.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package information
- Name: htdig
- Summary: Web Crawler
- URL: http://www.htdig.org/
- Vendor: The ht://Dig Group
- Packager: OpenPKG
- Distribution: OpenPKG
- Class: PLUS
- Group: Searching
- License: GPL
- Version: 3.2.0b6
- Release: 20060924
- # list of sources
- Source0: http://www.htdig.org/files/htdig-%{version}.tar.gz
- Source1: rc.htdig
- Patch0: htdig.patch
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20060823, gcc, make, flex, perl
- PreReq: OpenPKG, openpkg >= 20060823
- BuildPreReq: zlib, openssl
- PreReq: zlib, openssl
- AutoReq: no
- AutoReqProv: no
- %description
- The ht://Dig system is a complete world wide web indexing and
- searching system for a domain or intranet. This system is not meant
- to replace the need for powerful internet-wide search systems
- like Lycos, Infoseek, Google 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. As opposed to some WAIS-based
- or web-server based search engines, ht://Dig can easily span several
- web servers. The type of these different web servers doesn't matter
- as long as they understand common protocols like HTTP.
- %track
- prog htdig = {
- version = %{version}
- url = http://www.htdig.org/files/
- regex = htdig-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q
- %patch -p0
- %build
- # configure program
- %{l_shtool} subst \
- -e 's;/cgi-bin/htsearch;/openpkg-cgi/htsearch;g' \
- -e 's;$(VERSION);;' \
- installdir/search.html
- CC="%{l_cc}" \
- CXX="%{l_cxx} -Wno-deprecated" \
- CPPFLAGS="%{l_cppflags}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cxxflags -O}" \
- ./configure \
- --prefix=%{l_prefix} \
- --with-config-dir=%{l_prefix}/etc/htdig \
- --with-common-dir=%{l_prefix}/etc/htdig \
- --with-database-dir=%{l_prefix}/var/htdig/db \
- --with-default-config-file=%{l_prefix}/etc/htdig/htdig.conf \
- --with-cgi-bin-dir=%{l_prefix}/cgi \
- --with-image-dir=%{l_prefix}/share/htdig/image \
- --with-image-url-prefix=/openpkg-htdig/image \
- --with-search-dir=%{l_prefix}/share/htdig \
- --with-search-form=index.html \
- --with-zlib=%{l_prefix} \
- --with-ssl=%{l_prefix} \
- --with-apache=%{l_prefix}/bin/apache \
- --disable-bigfile \
- --disable-shared
- # build program
- %{l_make} %{l_mflags}
- %install
- # install program
- rm -rf $RPM_BUILD_ROOT
- %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
- # strip down installation
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
- rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
- # install run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.htdig} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # create additional directories
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/var/htdig/run
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%config %{l_prefix}/etc/htdig/*' \
- '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/htdig/*'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
- %post
- if [ $1 -eq 1 ]; then
- # add hook to Apache configuration
- apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
- if [ -f $apacheconf ]; then
- ( echo "Alias /openpkg-htdig $RPM_INSTALL_PREFIX/share/htdig"
- ) | $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
- -a -i "$RPM_INSTALL_PREFIX:htdig" $apacheconf
- fi
- # display final hints on initial installation
- ( echo "To complete this installation of ht://Dig please edit"
- echo "the configuration file and run ht://Dig once to initially"
- echo "create the database:"
- echo " \$ vi $RPM_INSTALL_PREFIX/etc/htdig/htdig.conf"
- echo " \$ $RPM_INSTALL_PREFIX/etc/rc htdig daily"
- echo " \$ $RPM_INSTALL_PREFIX/etc/rc apache stop start"
- echo "Now you should be able to access the search form and"
- echo "perform your first search:"
- echo " http://localhost/openpkg-htdig/"
- ) | %{l_rpmtool} msg -b -t notice
- fi
- exit 0
- %preun
- if [ $1 -eq 0 ]; then
- # remove hook from Apache configuration
- apacheconf="$RPM_INSTALL_PREFIX/etc/apache/apache.conf"
- if [ -f $apacheconf ]; then
- $RPM_INSTALL_PREFIX/lib/openpkg/rpmtool config \
- -r -i "$RPM_INSTALL_PREFIX:htdig" $apacheconf
- fi
- # before erase, remove data
- rm -f $RPM_INSTALL_PREFIX/var/htdig/run/* >/dev/null 2>&1 || true
- rm -f $RPM_INSTALL_PREFIX/var/htdig/db/* >/dev/null 2>&1 || true
- fi
- exit 0
|