]> git.pld-linux.org Git - packages/amavis-ng.git/blame - amavis-ng.spec
- tabs in preamble
[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
c9fdb821 37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
afeb56a6 38
36fc3292 39# optionally used
ef42fb78 40%define _noautoreq 'perl(File::Scan)'
36fc3292 41
afeb56a6 42%description
9a43b838 43AMaViS-ng is a modular rewrite of amavisd and amavis-perl. It scans
44email for malicious code inside attachments and archive files,
45stopping delivery if malicious code is found. It supports integration
46of several third-party virus scanners and integrates nicely into
47several MTA setups. Unlike amavis-perl and amavisd, there is no need
48for build-time configuration.
afeb56a6 49
45a1f106
JR
50%description -l pl.UTF-8
51AMaViS-ng to przepisana w sposób modularny wersja projektów amavisd i
52amavis-perl. Skanuje pocztę elektroniczną na okoliczność groźnego kodu
53wewnątrz załączników i archiwów, nie pozwalając na doręczenie w
54przypadku wykrycia. Wspiera integrację różnych zewnętrznych skanerów
55antywirusowych, ładnie integruje się z różnymi serwerami pocztowymi. W
56przeciwieństwie do amavis-perl i amavisd, nie wymaga konfiguracji w
2704bfac 57czasie budowania.
afeb56a6 58
59%prep
60%setup -q
a00ed71e 61%patch0 -p1
63639032 62%patch1 -p1
0b8ae0df
AA
63%patch2 -p1
64%patch3 -p1
ac782e5c
ER
65%patch4 -p1
66
67# precompiled x86 binary
68rm -f amavis-milter/amavis-milter
afeb56a6 69
70%build
f8d17a68 71%{__perl} Makefile.PL \
72 INSTALLDIRS=vendor
a00ed71e 73%{__make}
36fc3292 74
b8c793b5
AA
75cd doc
76%{__make}
77
63639032 78cd ../amavis-milter
ac782e5c
ER
79%{__make} \
80 CC="%{__cc}" \
81 CFLAGS="%{rpmcflags}"
63639032 82
afeb56a6 83%install
84rm -rf $RPM_BUILD_ROOT
8bd412f9 85install -d $RPM_BUILD_ROOT{%{_sysconfdir}/logrotate.d,%{_infodir},%{_sbindir}}
0b8ae0df 86install -d $RPM_BUILD_ROOT/var/spool/amavis-ng/{problems,quarantine,queue,tmp}
8bd412f9 87install -d $RPM_BUILD_ROOT/var/{run/amavis-ng,log/{archiv/amavis-ng,amavis-ng}}
63639032 88install -d $RPM_BUILD_ROOT%{_datadir}/amavis-ng
afeb56a6 89
14827a3c
PG
90%{__make} install \
91 DESTDIR=$RPM_BUILD_ROOT
afeb56a6 92
8bd412f9 93install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/amavis-ng
b8c793b5
AA
94install etc/amavis.conf $RPM_BUILD_ROOT%{_sysconfdir}
95install doc/amavis-ng.info $RPM_BUILD_ROOT%{_infodir}
63639032
AA
96install amavis-milter/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
97install magic.mime $RPM_BUILD_ROOT%{_datadir}/amavis-ng
b8c793b5 98
afeb56a6 99%clean
100rm -rf $RPM_BUILD_ROOT
101
4b43fa10 102%pre
2e6c9ff8 103if [ "$1" = "1" ]; then
80c8efa7 104 echo
9cf8f53d 105 echo 'Type "info amavis-ng" to get help'
80c8efa7 106 echo
2e6c9ff8
AA
107fi
108
9cf8f53d
ER
109%groupadd -g 97 -r -f amavis
110%useradd -u 97 -r -d /var/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis
4b43fa10 111
3cab3a81
AA
112%triggerin -- courier
113chown -R daemon /var/{spool,log}/amavis-ng
08071606 114if [ -f /var/lock/subsys/courier ]; then
80c8efa7 115 %{_sbindir}/filterctl stop perlfilter
116 %{_sbindir}/filterctl start perlfilter
ef42fb78
AA
117fi
118
4b43fa10 119%postun
120if [ "$1" = "0" ]; then
c9fdb821 121 %userremove amavis
122 %groupremove amavis
4b43fa10 123fi
124
afeb56a6 125%files
126%defattr(644,root,root,755)
1a3cf373 127%doc doc/README* doc/ChangeLog doc/RELEASE-NOTES
afeb56a6 128%attr(755,root,root) %{_bindir}/*
63639032 129%attr(755,root,root) %{_sbindir}/*
3cab3a81 130%attr(770,amavis,amavis) /var/log/amavis-ng
8bd412f9 131%attr(770,amavis,amavis) /var/log/archiv/amavis-ng
63639032 132%attr(750,amavis,amavis) /var/run/amavis-ng
3cab3a81 133%attr(770,amavis,amavis) /var/spool/amavis-ng
aaaa9ae2 134%attr(644,amavis,amavis) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavis.conf
63639032 135%{_datadir}/amavis-ng
b8c793b5 136%{_infodir}/amavis-ng.info*
f8d17a68 137%{perl_vendorlib}/AMAVIS.pm
138%{perl_vendorlib}/AMAVIS
c015a8de 139%{_mandir}/man1/*
08071606 140%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/amavis-ng
This page took 0.060379 seconds and 4 git commands to generate.