]>
Commit | Line | Data |
---|---|---|
36fc3292 | 1 | %include /usr/lib/rpm/macros.perl |
c3e713d4 | 2 | %define pdir AMAVIS |
afeb56a6 | 3 | Summary: New generation amavis |
08956ee5 | 4 | Summary(pl.UTF-8): Amavis nowej generacji |
afeb56a6 | 5 | Name: amavis-ng |
1a3cf373 | 6 | Version: 0.1.6.9 |
7e4ed1b8 | 7 | Release: 3 |
afeb56a6 | 8 | License: GPL |
9 | Group: Applications/Mail | |
1a3cf373 SP |
10 | Source0: http://dl.sourceforge.net/amavis/%{name}-%{version}.tar.gz |
11 | # Source0-md5: e9086bfbd3fa2049860d176a0c30549e | |
8bd412f9 | 12 | Source1: %{name}-logrotate |
b8c793b5 | 13 | Patch0: %{name}-quarantine.patch |
63639032 | 14 | Patch1: %{name}-config.patch |
3cab3a81 | 15 | Patch2: %{name}-courier.patch |
0b8ae0df | 16 | Patch3: %{name}-mks.patch |
ac782e5c | 17 | Patch4: %{name}-make.patch |
afeb56a6 | 18 | URL: http://amavis.sourceforge.net/ |
afeb56a6 | 19 | BuildRequires: perl-devel |
36fc3292 JB |
20 | BuildRequires: perl-libnet |
21 | BuildRequires: rpm-perlprov | |
9cf8f53d | 22 | BuildRequires: rpmbuild(macros) >= 1.202 |
ac782e5c | 23 | BuildRequires: sendmail-devel |
08071606 ER |
24 | Requires(postun): /usr/sbin/groupdel |
25 | Requires(postun): /usr/sbin/userdel | |
a9214f16 | 26 | Requires(pre): /bin/id |
08071606 | 27 | Requires(pre): /usr/bin/getgid |
a9214f16 | 28 | Requires(pre): /usr/sbin/groupadd |
29 | Requires(pre): /usr/sbin/useradd | |
08071606 ER |
30 | Requires: perl-Config-IniFiles |
31 | Requires: perl-File-MMagic | |
c9fdb821 | 32 | Provides: group(amavis) |
33 | Provides: user(amavis) | |
afeb56a6 | 34 | Obsoletes: AMaViS |
08071606 ER |
35 | Obsoletes: amavis |
36 | Obsoletes: amavisd | |
aad85b2c | 37 | Conflicts: logrotate < 3.7-4 |
c9fdb821 | 38 | BuildRoot: %{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 | 44 | AMaViS-ng is a modular rewrite of amavisd and amavis-perl. It scans |
45 | email for malicious code inside attachments and archive files, | |
46 | stopping delivery if malicious code is found. It supports integration | |
47 | of several third-party virus scanners and integrates nicely into | |
48 | several MTA setups. Unlike amavis-perl and amavisd, there is no need | |
49 | for build-time configuration. | |
afeb56a6 | 50 | |
45a1f106 JR |
51 | %description -l pl.UTF-8 |
52 | AMaViS-ng to przepisana w sposób modularny wersja projektów amavisd i | |
53 | amavis-perl. Skanuje pocztę elektroniczną na okoliczność groźnego kodu | |
54 | wewnątrz załączników i archiwów, nie pozwalając na doręczenie w | |
55 | przypadku wykrycia. Wspiera integrację różnych zewnętrznych skanerów | |
56 | antywirusowych, ładnie integruje się z różnymi serwerami pocztowymi. W | |
57 | przeciwieństwie do amavis-perl i amavisd, nie wymaga konfiguracji w | |
2704bfac | 58 | czasie 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 | |
69 | rm -f amavis-milter/amavis-milter | |
afeb56a6 | 70 | |
71 | %build | |
f8d17a68 | 72 | %{__perl} Makefile.PL \ |
73 | INSTALLDIRS=vendor | |
a00ed71e | 74 | %{__make} |
36fc3292 | 75 | |
b8c793b5 AA |
76 | cd doc |
77 | %{__make} | |
78 | ||
63639032 | 79 | cd ../amavis-milter |
ac782e5c ER |
80 | %{__make} \ |
81 | CC="%{__cc}" \ | |
82 | CFLAGS="%{rpmcflags}" | |
63639032 | 83 | |
afeb56a6 | 84 | %install |
85 | rm -rf $RPM_BUILD_ROOT | |
8bd412f9 | 86 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/logrotate.d,%{_infodir},%{_sbindir}} |
0b8ae0df | 87 | install -d $RPM_BUILD_ROOT/var/spool/amavis-ng/{problems,quarantine,queue,tmp} |
f84e79f4 | 88 | install -d $RPM_BUILD_ROOT/var/{run/amavis-ng,log/{archive/amavis-ng,amavis-ng}} |
63639032 | 89 | install -d $RPM_BUILD_ROOT%{_datadir}/amavis-ng |
afeb56a6 | 90 | |
14827a3c PG |
91 | %{__make} install \ |
92 | DESTDIR=$RPM_BUILD_ROOT | |
afeb56a6 | 93 | |
8bd412f9 | 94 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/amavis-ng |
b8c793b5 AA |
95 | install etc/amavis.conf $RPM_BUILD_ROOT%{_sysconfdir} |
96 | install doc/amavis-ng.info $RPM_BUILD_ROOT%{_infodir} | |
63639032 AA |
97 | install amavis-milter/amavis-milter $RPM_BUILD_ROOT%{_sbindir} |
98 | install magic.mime $RPM_BUILD_ROOT%{_datadir}/amavis-ng | |
b8c793b5 | 99 | |
afeb56a6 | 100 | %clean |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
4b43fa10 | 103 | %pre |
2e6c9ff8 | 104 | if [ "$1" = "1" ]; then |
80c8efa7 | 105 | echo |
9cf8f53d | 106 | echo 'Type "info amavis-ng" to get help' |
80c8efa7 | 107 | echo |
2e6c9ff8 AA |
108 | fi |
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 |
114 | chown -R daemon /var/{spool,log}/amavis-ng | |
08071606 | 115 | if [ -f /var/lock/subsys/courier ]; then |
80c8efa7 | 116 | %{_sbindir}/filterctl stop perlfilter |
117 | %{_sbindir}/filterctl start perlfilter | |
ef42fb78 AA |
118 | fi |
119 | ||
4b43fa10 | 120 | %postun |
121 | if [ "$1" = "0" ]; then | |
c9fdb821 | 122 | %userremove amavis |
123 | %groupremove amavis | |
4b43fa10 | 124 | fi |
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 |