From 6fb6a3c07f455ef53c0b6026560df523e16304bb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 20 Apr 2021 13:52:53 +0200 Subject: [PATCH] Resolves: #1950909 (Change what files are installed) --- bogofilter.spec | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/bogofilter.spec b/bogofilter.spec index ac6575b..09d290a 100644 --- a/bogofilter.spec +++ b/bogofilter.spec @@ -1,7 +1,7 @@ Summary: Fast anti-spam filtering by Bayesian statistical analysis Name: bogofilter Version: 1.2.5 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 URL: http://bogofilter.sourceforge.net/ Source0: http://downloads.sourceforge.net/bogofilter/bogofilter-%{version}.tar.xz @@ -10,6 +10,7 @@ BuildRequires: flex libdb-devel gsl-devel BuildRequires: /usr/bin/iconv BuildRequires: perl-generators BuildRequires: make +BuildRequires: xhtml1-dtds %description Bogofilter is a Bayesian spam filter. In its normal mode of @@ -55,6 +56,24 @@ iconv -f iso-8859-1 -t utf-8 \ %{__chmod} -x contrib/* +for d in contrib ; do + install -d %{buildroot}%{_docdir}/%{name}/$d + files=$(find "$d" -maxdepth 1 -type f -print) + for f in $files ; do + case $f in + *.c|*.o|*.obj|*/Makefile*) continue ;; + *.1) + cp -p $f %{buildroot}%{_mandir}/man1 ;; + *) + cp -p $f %{buildroot}%{_docdir}/%{name}/$d ;; + esac + done +done + +mv bogogrep* contrib + +find %{buildroot}%{_docdir}/%{name} -name .dirstamp -print -delete + %check %{__make} %{?_smp_mflags} check @@ -63,18 +82,23 @@ iconv -f iso-8859-1 -t utf-8 \ %{_mandir}/man1/bogoupgrade* %files -%doc AUTHORS COPYING NEWS README* RELEASE.NOTES* TODO bogofilter.cf.example +%doc AUTHORS COPYING GETTING.STARTED NEWS README* RELEASE.NOTES* TODO bogofilter.cf.example %doc doc/bogofilter-SA* doc/bogofilter-tuning.HOWTO* doc/integrating* doc/programmer/ -%doc rpm-doc/html/ rpm-doc/xml/ contrib +%doc doc/README.*db +%doc rpm-doc/html/ rpm-doc/xml/ %{_mandir}/man1/bogo*.1* %{_mandir}/man1/bf_*.1* %config(noreplace) %{_sysconfdir}/bogofilter.cf %{_bindir}/bogo* %{_bindir}/bf_* +%{_docdir}/%{name}/contrib/* %exclude %{_bindir}/bogoupgrade %exclude %{_mandir}/man1/bogoupgrade* %changelog +* Tue Apr 20 2021 Milan Crha - 1.2.5-7 +- Resolves: #1950909 (Change what files are installed) + * Thu Apr 15 2021 Mohan Boddu - 1.2.5-6 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937