]> git.pld-linux.org Git - packages/amavis-ng.git/blame - amavis-ng.spec
- oops, it's 3.7-4 not 3.7.4
[packages/amavis-ng.git] / amavis-ng.spec
CommitLineData
36fc3292 1%include /usr/lib/rpm/macros.perl
c3e713d4 2%define pdir AMAVIS
afeb56a6 3Summary: New generation amavis
08956ee5 4Summary(pl.UTF-8): Amavis nowej generacji
afeb56a6 5Name: amavis-ng
1a3cf373 6Version: 0.1.6.9
7e4ed1b8 7Release: 3
afeb56a6 8License: GPL
9Group: Applications/Mail
1a3cf373
SP
10Source0: http://dl.sourceforge.net/amavis/%{name}-%{version}.tar.gz
11# Source0-md5: e9086bfbd3fa2049860d176a0c30549e
8bd412f9 12Source1: %{name}-logrotate
b8c793b5 13Patch0: %{name}-quarantine.patch
63639032 14Patch1: %{name}-config.patch
3cab3a81 15Patch2: %{name}-courier.patch
0b8ae0df 16Patch3: %{name}-mks.patch
ac782e5c 17Patch4: %{name}-make.patch
afeb56a6 18URL: http://amavis.sourceforge.net/
afeb56a6 19BuildRequires: perl-devel
36fc3292
JB
20BuildRequires: perl-libnet
21BuildRequires: rpm-perlprov
9cf8f53d 22BuildRequires: rpmbuild(macros) >= 1.202
ac782e5c 23BuildRequires: sendmail-devel
08071606
ER
24Requires(postun): /usr/sbin/groupdel
25Requires(postun): /usr/sbin/userdel
a9214f16 26Requires(pre): /bin/id
08071606 27Requires(pre): /usr/bin/getgid
a9214f16 28Requires(pre): /usr/sbin/groupadd
29Requires(pre): /usr/sbin/useradd
08071606
ER
30Requires: perl-Config-IniFiles
31Requires: perl-File-MMagic
c9fdb821 32Provides: group(amavis)
33Provides: user(amavis)
afeb56a6 34Obsoletes: AMaViS
08071606
ER
35Obsoletes: amavis
36Obsoletes: amavisd
aad85b2c 37Conflicts: logrotate < 3.7-4
c9fdb821 38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
afeb56a6 39
36fc3292 40# optionally used
ef42fb78 41%define _noautoreq 'perl(File::Scan)'
36fc3292 42
afeb56a6 43%description
9a43b838 44AMaViS-ng is a modular rewrite of amavisd and amavis-perl. It scans
45email for malicious code inside attachments and archive files,
46stopping delivery if malicious code is found. It supports integration
47of several third-party virus scanners and integrates nicely into
48several MTA setups. Unlike amavis-perl and amavisd, there is no need
49for build-time configuration.
afeb56a6 50
45a1f106
JR
51%description -l pl.UTF-8
52AMaViS-ng to przepisana w sposób modularny wersja projektów amavisd i
53amavis-perl. Skanuje pocztę elektroniczną na okoliczność groźnego kodu
54wewnątrz załączników i archiwów, nie pozwalając na doręczenie w
55przypadku wykrycia. Wspiera integrację różnych zewnętrznych skanerów
56antywirusowych, ładnie integruje się z różnymi serwerami pocztowymi. W
57przeciwieństwie do amavis-perl i amavisd, nie wymaga konfiguracji w
2704bfac 58czasie budowania.
afeb56a6 59
60%prep
61%setup -q
a00ed71e 62%patch0 -p1
63639032 63%patch1 -p1
0b8ae0df
AA
64%patch2 -p1
65%patch3 -p1
ac782e5c
ER
66%patch4 -p1
67
68# precompiled x86 binary
69rm -f amavis-milter/amavis-milter
afeb56a6 70
71%build
f8d17a68 72%{__perl} Makefile.PL \
73 INSTALLDIRS=vendor
a00ed71e 74%{__make}
36fc3292 75
b8c793b5
AA
76cd doc
77%{__make}
78
63639032 79cd ../amavis-milter
ac782e5c
ER
80%{__make} \
81 CC="%{__cc}" \
82 CFLAGS="%{rpmcflags}"
63639032 83
afeb56a6 84%install
85rm -rf $RPM_BUILD_ROOT
8bd412f9 86install -d $RPM_BUILD_ROOT{%{_sysconfdir}/logrotate.d,%{_infodir},%{_sbindir}}
0b8ae0df 87install -d $RPM_BUILD_ROOT/var/spool/amavis-ng/{problems,quarantine,queue,tmp}
f84e79f4 88install -d $RPM_BUILD_ROOT/var/{run/amavis-ng,log/{archive/amavis-ng,amavis-ng}}
63639032 89install -d $RPM_BUILD_ROOT%{_datadir}/amavis-ng
afeb56a6 90
14827a3c
PG
91%{__make} install \
92 DESTDIR=$RPM_BUILD_ROOT
afeb56a6 93
8bd412f9 94install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/amavis-ng
b8c793b5
AA
95install etc/amavis.conf $RPM_BUILD_ROOT%{_sysconfdir}
96install doc/amavis-ng.info $RPM_BUILD_ROOT%{_infodir}
63639032
AA
97install amavis-milter/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
98install magic.mime $RPM_BUILD_ROOT%{_datadir}/amavis-ng
b8c793b5 99
afeb56a6 100%clean
101rm -rf $RPM_BUILD_ROOT
102
4b43fa10 103%pre
2e6c9ff8 104if [ "$1" = "1" ]; then
80c8efa7 105 echo
9cf8f53d 106 echo 'Type "info amavis-ng" to get help'
80c8efa7 107 echo
2e6c9ff8
AA
108fi
109
9cf8f53d
ER
110%groupadd -g 97 -r -f amavis
111%useradd -u 97 -r -d /var/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis
4b43fa10 112
3cab3a81
AA
113%triggerin -- courier
114chown -R daemon /var/{spool,log}/amavis-ng
08071606 115if [ -f /var/lock/subsys/courier ]; then
80c8efa7 116 %{_sbindir}/filterctl stop perlfilter
117 %{_sbindir}/filterctl start perlfilter
ef42fb78
AA
118fi
119
4b43fa10 120%postun
121if [ "$1" = "0" ]; then
c9fdb821 122 %userremove amavis
123 %groupremove amavis
4b43fa10 124fi
125
afeb56a6 126%files
127%defattr(644,root,root,755)
1a3cf373 128%doc doc/README* doc/ChangeLog doc/RELEASE-NOTES
afeb56a6 129%attr(755,root,root) %{_bindir}/*
63639032 130%attr(755,root,root) %{_sbindir}/*
3cab3a81 131%attr(770,amavis,amavis) /var/log/amavis-ng
8a76f171 132%attr(770,amavis,amavis) /var/log/archive/amavis-ng
63639032 133%attr(750,amavis,amavis) /var/run/amavis-ng
3cab3a81 134%attr(770,amavis,amavis) /var/spool/amavis-ng
aaaa9ae2 135%attr(644,amavis,amavis) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavis.conf
63639032 136%{_datadir}/amavis-ng
b8c793b5 137%{_infodir}/amavis-ng.info*
f8d17a68 138%{perl_vendorlib}/AMAVIS.pm
139%{perl_vendorlib}/AMAVIS
c015a8de 140%{_mandir}/man1/*
08071606 141%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/amavis-ng
This page took 0.068572 seconds and 4 git commands to generate.