[htdig] Address issues from merge review (#225889)

Tomas Hozza thozza at fedoraproject.org
Mon Jan 19 13:03:20 UTC 2015


commit 880f3a22c7510bf3a921257dc719422bef7700a5
Author: Tomas Hozza <thozza at redhat.com>
Date:   Fri Jan 16 17:17:14 2015 +0100

    Address issues from merge review (#225889)
    
    Signed-off-by: Tomas Hozza <thozza at redhat.com>

 htdig.spec |   86 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 42 insertions(+), 44 deletions(-)
---
diff --git a/htdig.spec b/htdig.spec
index 26bfb1e..cee0834 100644
--- a/htdig.spec
+++ b/htdig.spec
@@ -1,10 +1,23 @@
-%define contentdir /var/www
+%define contentdir %{_localstatedir}/www
 %define buildweb 1
 
+%define pkg_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. \
+ht://Dig is also used by KDE to search KDE's HTML documentation. \
+\
+ht://Dig was developed at San Diego State University as a way to search the \
+various web servers on the campus network.
+
 Summary: ht://Dig - Web search engine
 Name: htdig
 Version: 3.2.0
-Release: 0.19.b6%{?dist}
+Release: 0.20.b6%{?dist}
 Epoch: 4
 License: GPLv2
 Group: Applications/Internet
@@ -23,8 +36,7 @@ Patch12: htdig-3.2-CVE-2007-6110.patch
 Patch13: htdig-3.2.0b6-htstat-segv.patch
 Patch14: htdig-3.2.0-external_parsers.patch
 Patch15: htdig-3.2.0-allow_numbers.patch
-BuildRequires: flex >= 2.5.4a-13
-BuildRequires: zlib-devel openssl-devel httpd autoconf automake libtool
+BuildRequires: zlib-devel openssl-devel httpd libtool flex
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %package web
@@ -33,35 +45,14 @@ Group: Applications/Internet
 Requires: %{name} = %{epoch}:%{version}-%{release} webserver
 
 %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.
-ht://Dig is also used by KDE to search KDE's HTML documentation.
-
-ht://Dig was developed at San Diego State University as a way to search the
-various web servers on the campus network.
+%{pkg_description}
 
 %description web
-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.
+%{pkg_description}
 
 The %{name}-web package includes CGI scripts and HTML code needed to use
 ht://Dig on a website.
 
-ht://Dig was developed at San Diego State University as a way to search the
-various web servers on the campus network.
-
 
 %prep
 %setup -q -n %{name}-%{version}b6
@@ -90,14 +81,14 @@ export CXXFLAGS="$CFLAGS"
 	--enable-bigfile \
 	--with-config-dir=%{_sysconfdir}/htdig \
 	--with-common-dir=%{contentdir}/html/htdig \
-	--with-database-dir=/var/lib/htdig \
-	--localstatedir=/var/lib/htdig \
+	--with-database-dir=%{_sharedstatedir}/htdig \
+	--localstatedir=%{_sharedstatedir}/htdig \
 	--with-cgi-bin-dir=%{contentdir}/cgi-bin \
 	--with-image-dir=%{contentdir}/html/htdig \
 	--with-search-dir=%{contentdir}/html/htdig \
 	--with-default-config-file=%{_sysconfdir}/htdig/htdig.conf \
-	--with-apache=/usr/sbin/httpd \
-	--with-zlib=/usr \
+	--with-apache=%{_sbindir}/httpd \
+	--with-zlib=%{_prefix} \
 	--with-ssl
 make %{?_smp_mflags}
 
@@ -105,37 +96,41 @@ make %{?_smp_mflags}
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 
-ln $RPM_BUILD_ROOT%{contentdir}/cgi-bin/htsearch $RPM_BUILD_ROOT%{_bindir}
+ln -s %{contentdir}/cgi-bin/htsearch $RPM_BUILD_ROOT%{_bindir}
 
 chmod 644 $RPM_BUILD_ROOT%{contentdir}/html/htdig/*
 ln -sf search.html $RPM_BUILD_ROOT%{contentdir}/html/htdig/index.html
 # now get rid of the $RPM_BUILD_ROOT paths in the conf files
-for i in %{_sysconfdir}/htdig/htdig.conf /usr/bin/rundig ; do
+for i in %{_sysconfdir}/htdig/htdig.conf %{_bindir}/rundig ; do
 	perl -pi -e "s|$RPM_BUILD_ROOT||g" $RPM_BUILD_ROOT/$i
 done
 mkdir -p $RPM_BUILD_ROOT%{_datadir}
 mv $RPM_BUILD_ROOT%{contentdir}/html/htdig $RPM_BUILD_ROOT%{_datadir}
-mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d/
-install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/htdig.conf
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/htdig.conf
 
 rm -rf $RPM_BUILD_ROOT%{_includedir}
-rm -rf $RPM_BUILD_ROOT%{_libdir}/htdig/*.a
-rm -rf $RPM_BUILD_ROOT%{_libdir}/htdig/*.la
-rm -rf $RPM_BUILD_ROOT%{_libdir}/htdig_db/*.a
-rm -rf $RPM_BUILD_ROOT%{_libdir}/htdig_db/*.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/htdig/*.a
+rm -f $RPM_BUILD_ROOT%{_libdir}/htdig/*.la
+rm -f $RPM_BUILD_ROOT%{_libdir}/htdig_db/*.a
+rm -f $RPM_BUILD_ROOT%{_libdir}/htdig_db/*.la
+
+
+%post -p /sbin/ldconfig
+
+
+%postun -p /sbin/ldconfig
 
-%clean
-rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %doc htdoc/*html htdoc/*gif htdoc/COPYING htdoc/ChangeLog
 %dir %{_sysconfdir}/htdig
 %config(noreplace) %{_sysconfdir}/htdig/htdig.conf
 %config(noreplace) %{_sysconfdir}/htdig/cookies.txt
 %{_sysconfdir}/htdig/HtFileType-magic.mime
 %{_sysconfdir}/htdig/mime.types
-%dir /var/lib/htdig
+%dir %{_sharedstatedir}/htdig
 %{_bindir}/*
 %{_libdir}/htdig
 %{_libdir}/htdig_db
@@ -144,7 +139,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %if %buildweb
 %files web
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %{contentdir}/cgi-bin/*
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/htdig.conf
 %dir %{_datadir}/htdig
@@ -152,6 +147,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Fri Jan 16 2015 Tomas Hozza <thozza at redhat.com> - 4:3.2.0-0.20.b6
+- Address issues from merge review (#225889)
+
 * Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4:3.2.0-0.19.b6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 


More information about the scm-commits mailing list