[devel] q: htdig to mike pls
Michael Shigorin
=?iso-8859-1?q?mike_=CE=C1_osdn=2Eorg=2Eua?=
Вт Авг 14 11:06:48 MSD 2007
Здравствуйте.
Я тут немного починил сборку/почистил htdig.spec, предлагаю
забрать его у kt@ до формального отвала по несобираемости.
Если Константин объявится и будет удивлён, обязуюсь отдать :-)
--
---- WBR, Michael Shigorin <mike на altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
----------- следующая часть -----------
Name: htdig
Version: 3.1.6
Release: alt2
Summary: A web indexing and searching system for a small domain or intranet
License: GPL
Group: Networking/Other
Url: http://www.htdig.org
Source: %name-%version.tar.bz2
Source1: %name-dbgen
Source3: rus-ispell-0.99d6.tar.bz2
Patch1: rundig-emptydb.patch
Patch2: %name-charset.patch
Patch3: %name-alt.patch
Patch4: %name-3.1.6-gcc3.patch
Packager: Michael Shigorin <mike на altlinux.org>
PreReq: grep shadow-utils
# Automatically added by buildreq on Tue Oct 15 2002
BuildRequires: gcc-c++ ispell libstdc++-devel zlib-devel
# for apache_* macros; may be adjusted
BuildRequires: apache-devel
%description
The ht://Dig 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.
As opposed to some WAIS-based or web-server based search engines, ht://Dig 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.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
mkdir rusdict
cd rusdict
tar jxf %SOURCE3
cd ..
%build
%configure --prefix=%_prefix \
--bindir=%_sbindir --mandir=%_mandir \
--with-common-dir=%_localstatedir/%name/common \
--with-database-dir=%_localstatedir/%name/db \
--with-config-dir=%_sysconfdir/%name \
--with-image-dir=%apache_htdocsdir/%name \
--with-cgi-bin-dir=%apache_cgibindir \
--with-search-dir=%apache_htdocsdir
%make_build
cd rusdict
make
perl -pi -e "s|,-|,|" russian.aff
cd ..
%install
make INSTALL_ROOT=%buildroot install-strip
mkdir -p %buildroot%_sysconfdir/cron.daily
cp -a $RPM_SOURCE_DIR/%name-dbgen %buildroot%_sysconfdir/cron.daily/%name-dbgen
ln -s ../../../..%_datadir/doc/%name-%PACKAGE_VERSION \
%buildroot%apache_htdocsdir/%name/htdoc
cp -a %buildroot%apache_cgibindir/htsearch %buildroot%_sbindir
cp -a rusdict/russian.aff rusdict/russian.dict %buildroot%_localstatedir/%name/common
%pre
egrep -qs "^htdig:" /etc/passwd ||
useradd -r -g apache -s /dev/null -d %_localstatedir/%name %name
%post
# Only run this if installing for the first time
if [ "$1" = 1 ]; then
if [ -f %apache_confdir/httpd.conf ];then
SERVERNAME="`grep '^ServerName' /etc/httpd/conf/httpd.conf | awk 'NR == 1 {print $2}'`"
fi
[ -z "$SERVERNAME" ] && SERVERNAME="`hostname -f`"
[ -z "$SERVERNAME" ] && SERVERNAME="localhost"
TEMPFILE=`mkstemp`
sed 's/^start_url:.*/#&\
# (See end of file for this parameter.)/' /etc/htdig/htdig.conf > $TEMPFILE
cat $TEMPFILE > /etc/htdig/htdig.conf
rm $TEMPFILE
cat >> /etc/htdig/htdig.conf <<!
# Automatically set up by htdig RPM, from your current Apache httpd.conf...
# Verify and configure these, and set maintainer above, before running
# /usr/sbin/rundig.
# See /usr/doc/htdig*/attrs.html for descriptions of attributes.
# The URL(s) where htdig will start. See also limit_urls_to above.
start_url: http://$SERVERNAME/
# This makes sure that we don't spider the web
local_urls_only: true
# These attributes allow indexing server via local filesystem rather than HTTP.
#local_urls: http://$SERVERNAME/=/var/www/html/
#local_user_urls: http://$SERVERNAME/=/home/,/public_html/
dict_charset: koi
#default ${common_dir}/tables
recodetables_dir: /etc/httpd/conf/tables/russian/
locale: $LANG
!
fi
%files
%doc CONFIG README htdoc/*
%config(noreplace) %_sysconfdir/%name/%name.conf
%_sbindir/rundig
%apache_htdocsdir/search.html
%config(missingok, noreplace) %attr(0755,root,root) %_sysconfdir/cron.daily/%name-dbgen
%_sbindir/%name
%_sbindir/htfuzzy
%_sbindir/htmerge
%_sbindir/htnotify
%_sbindir/htsearch
%_sbindir/htdump
%_sbindir/htload
%attr(-,htdig,apache) %_localstatedir/%name
%attr(-,htdig,apache) %dir %_sysconfdir/%name
%apache_cgibindir/htsearch
%apache_htdocsdir/%name
%changelog
* Tue Aug 14 2007 Michael Shigorin <mike на altlinux.org> 3.1.6-alt2
- picked up an orphan, in fact
+ build broke due to console-tools missing
- considerable spec cleanup
+ use macros from apache-devel
+ remove superfluous macros
+ handle temporary file better in %%post
+ package htdump, htload
- it's still 3.1.6 latest stable release five years on...
* Tue Jan 18 2005 ALT QA Team Robot <qa-robot на altlinux.org> 3.1.6-alt1.1.1
- Rebuilt with libstdc++.so.6.
* Tue Oct 29 2002 Konstantin Timoshenko <kt на altlinux.ru> 3.1.6-alt1.1
- 3.1.6
- remove old patches
* Tue Oct 9 2001 Kostya Timoshenko <kt на altlinux.ru> 3.1.5-ipl13mdk
- fix bug in htsearch
* Wed Sep 12 2001 Dmitry V. Levin <ldv на altlinux.ru> 3.1.5-ipl12mdk
- Fixed cron script.
* Fri May 11 2001 Kostya Timoshenko <kt на altlinux.ru> 3.1.5-ipl11mdk
- change group htdig to apache
* Thu Feb 8 2001 Kostya Timoshenko <kt на petr.kz> 3.1.5-ipl10mdk
- add htdig.lexa.patch.bz2
- add htdig-patch-charset.bz2
- add htdig-patch-ctype.bz2
- add htdig.ipl.patch.bz2
* Mon Feb 5 2001 Chmouel Boudjnah <chmouel на mandrakesoft.com> 3.1.5-9mdk
- grep httpd.conf only if exist.
* Fri Dec 29 2000 Renaud Chaillat <rchaillat на mandrakesoft.com> 3.1.5-8mdk
- patch to avoid using htmerge when database is empty
(avoid error message being sent by cron job)
- added '-a' option to rundig in the cron script, to allow searching
while a new index is created (in separate *.work files)
- corrected doc link
* Fri Nov 17 2000 Lenny Cartier <lenny на mandrakesoft.com> 3.1.5-7mdk
- build for gcc-2.96
* Fri Sep 15 2000 Renaud Chaillat <rchaillat на mandrakesoft.com> 3.1.5-6mdk
- well, changed /var/www/httpd to /var/www ; don't know what I was
thinking...
* Thu Sep 14 2000 Renaud Chaillat <rchaillat на mandrakesoft.com> 3.1.5-5mdk
- added noreplace for cron daily job
- added accent patches
* Thu Sep 14 2000 Renaud Chaillat <rchaillat на mandrakesoft.com> 3.1.5-4mdk
- moved /home/httpd to /var/www/httpd
- copied htsearch to sbindir to allow users to search locally
* Wed Sep 06 2000 Lenny Cartier <lenny на mandrakesoft.com> 3.1.5-3mdk
- BM
- macros
* Wed Apr 12 2000 Chris Green <cmg на dok.org> 3.1.5-2mdk
- made htdig run as the htdig user
- added noreplace to config file
* Tue Apr 11 2000 Lenny Cartier <lenny на mandrakesoft.com> 3.1.5-1mdk
- used srpm provided by Vincent Danen <vdanen на linux-mandrake.com>
* Fri Mar 24 2000 Vincent Danen <vdanen на linux-mandrake.com>
- adapted spec file by Gilles Detillieux <grdetil на scrc.umanitoba.ca>
- 3.1.5
- bzip sources
Подробная информация о списке рассылки Devel