]>
Commit | Line | Data |
---|---|---|
36fc3292 | 1 | %include /usr/lib/rpm/macros.perl |
c3e713d4 | 2 | %define pdir AMAVIS |
afeb56a6 | 3 | Summary: New generation amavis |
45a1f106 | 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 | |
c9fdb821 | 37 | BuildRoot: %{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 | 43 | AMaViS-ng is a modular rewrite of amavisd and amavis-perl. It scans |
44 | email for malicious code inside attachments and archive files, | |
45 | stopping delivery if malicious code is found. It supports integration | |
46 | of several third-party virus scanners and integrates nicely into | |
47 | several MTA setups. Unlike amavis-perl and amavisd, there is no need | |
48 | for build-time configuration. | |
afeb56a6 | 49 | |
45a1f106 JR |
50 | %description -l pl.UTF-8 |
51 | AMaViS-ng to przepisana w sposób modularny wersja projektów amavisd i | |
52 | amavis-perl. Skanuje pocztę elektroniczną na okoliczność groźnego kodu | |
53 | wewnątrz załączników i archiwów, nie pozwalając na doręczenie w | |
54 | przypadku wykrycia. Wspiera integrację różnych zewnętrznych skanerów | |
55 | antywirusowych, ładnie integruje się z różnymi serwerami pocztowymi. W | |
56 | przeciwieństwie do amavis-perl i amavisd, nie wymaga konfiguracji w | |
2704bfac | 57 | czasie 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 | |
68 | rm -f amavis-milter/amavis-milter | |
afeb56a6 | 69 | |
70 | %build | |
f8d17a68 | 71 | %{__perl} Makefile.PL \ |
72 | INSTALLDIRS=vendor | |
a00ed71e | 73 | %{__make} |
36fc3292 | 74 | |
b8c793b5 AA |
75 | cd doc |
76 | %{__make} | |
77 | ||
63639032 | 78 | cd ../amavis-milter |
ac782e5c ER |
79 | %{__make} \ |
80 | CC="%{__cc}" \ | |
81 | CFLAGS="%{rpmcflags}" | |
63639032 | 82 | |
afeb56a6 | 83 | %install |
84 | rm -rf $RPM_BUILD_ROOT | |
8bd412f9 | 85 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/logrotate.d,%{_infodir},%{_sbindir}} |
0b8ae0df | 86 | install -d $RPM_BUILD_ROOT/var/spool/amavis-ng/{problems,quarantine,queue,tmp} |
8bd412f9 | 87 | install -d $RPM_BUILD_ROOT/var/{run/amavis-ng,log/{archiv/amavis-ng,amavis-ng}} |
63639032 | 88 | install -d $RPM_BUILD_ROOT%{_datadir}/amavis-ng |
afeb56a6 | 89 | |
14827a3c PG |
90 | %{__make} install \ |
91 | DESTDIR=$RPM_BUILD_ROOT | |
afeb56a6 | 92 | |
8bd412f9 | 93 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/amavis-ng |
b8c793b5 AA |
94 | install etc/amavis.conf $RPM_BUILD_ROOT%{_sysconfdir} |
95 | install doc/amavis-ng.info $RPM_BUILD_ROOT%{_infodir} | |
63639032 AA |
96 | install amavis-milter/amavis-milter $RPM_BUILD_ROOT%{_sbindir} |
97 | install magic.mime $RPM_BUILD_ROOT%{_datadir}/amavis-ng | |
b8c793b5 | 98 | |
afeb56a6 | 99 | %clean |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
4b43fa10 | 102 | %pre |
2e6c9ff8 | 103 | if [ "$1" = "1" ]; then |
80c8efa7 | 104 | echo |
9cf8f53d | 105 | echo 'Type "info amavis-ng" to get help' |
80c8efa7 | 106 | echo |
2e6c9ff8 AA |
107 | fi |
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 |
113 | chown -R daemon /var/{spool,log}/amavis-ng | |
08071606 | 114 | if [ -f /var/lock/subsys/courier ]; then |
80c8efa7 | 115 | %{_sbindir}/filterctl stop perlfilter |
116 | %{_sbindir}/filterctl start perlfilter | |
ef42fb78 AA |
117 | fi |
118 | ||
4b43fa10 | 119 | %postun |
120 | if [ "$1" = "0" ]; then | |
c9fdb821 | 121 | %userremove amavis |
122 | %groupremove amavis | |
4b43fa10 | 123 | fi |
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 |