]> git.pld-linux.org Git - SPECS.git/blob - vispan.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / vispan.spec
1 Summary:        Vispan - VIrus and SPam ANalyser
2 Summary(pl.UTF-8):      Vispan - analizator wirusów i spamu
3 Name:           vispan
4 Version:        2.0.2
5 Release:        0.12
6 Epoch:          0
7 License:        GPL v2
8 Group:          Applications
9 Source0:        http://www.while.homeunix.net/mailstats/Vispan-%{version}.tar.gz
10 # Source0-md5:  62ff80fced226287ea49f8cb897ede71
11 Patch0:         %{name}-install.patch
12 URL:            http://www.while.homeunix.net/mailstats/
13 BuildRequires:  perl-libwww
14 BuildRequires:  perl-GD-Graph
15 BuildRequires:  perl-Mail-Sendmail
16 BuildRequires:  perl-Net-CIDR
17 BuildRequires:  perl-Net-DNS
18 BuildRequires:  perl-Number-Format
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.1-13
21 Requires:       crondaemon
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This program analyses the mail log file entries created by the
27 MailScanner program written by Julian Field.
28
29 %description -l pl.UTF-8
30 Ten program analizuje pliki logów stworzonych przez program
31 MailScanner.
32
33 %prep
34 %setup -q -n Vispan-%{version}
35 %patch0 -p1
36
37 %build
38 %{__perl} Makefile.PL \
39         INSTALLSCRIPT=%{_sbindir} \
40         INSTALLDIRS=vendor
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44
45 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/var/{lib,cache}/vispan,/etc/cron.d}
46 %{__make} install \
47         DESTDIR=$RPM_BUILD_ROOT
48
49 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/install.pl
50
51 sed -e '
52         s,/sbin/iptables,/usr/sbin/iptables,
53         s,/var/www/html/vispan,/var/lib/vispan,
54         s,sdoe@yourdomain.com,postmaster@localhost,
55         s,mail.yourdomain.com,localhost,
56         s,/tmp/virtmpfile,/var/cache/vispan/virtmpfile,
57 ' Vispan.conf > $RPM_BUILD_ROOT%{_sysconfdir}/Vispan.conf
58
59 install vispan.css $RPM_BUILD_ROOT/var/lib/vispan
60
61 cat <<'EOF' > $RPM_BUILD_ROOT/etc/cron.d/%{name}
62 # This is the cron entry to run the Vispan analysis script every 10 minutes.
63 MAILTO=root
64 */10 * * * * stats %{_sbindir}/Vispan
65 # vim:syn=crontab
66 EOF
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files
72 %defattr(644,root,root,755)
73 %doc ChangeLog README
74 %attr(755,root,root) %{_sbindir}/Vispan
75 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
76 %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/*
77 %{perl_vendorlib}/Vispan
78 %dir %attr(770,root,stats) /var/cache/vispan
79 %dir %attr(775,root,stats) /var/lib/vispan
80 /var/lib/vispan/vispan.css
This page took 0.087259 seconds and 3 git commands to generate.