]>
Commit | Line | Data |
---|---|---|
f88b1492 | 1 | # TODO: |
e8d05b10 | 2 | # - Add polish info mail templates |
497858ff PG |
3 | # - move amavis part of tmpwatch configuration from tmpwatch.spec |
4 | # | |
97f11894 | 5 | %include /usr/lib/rpm/macros.perl |
ff313eb6 | 6 | Summary: A Mail Virus Scanner with SpamAssassin support - daemon |
af178a5e | 7 | Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej z obsługą SpamAssasina - demon |
97f11894 | 8 | Name: amavisd-new |
21d5eaae | 9 | Version: 2.4.2 |
7deaa50b | 10 | Release: 4 |
7292b331 | 11 | Epoch: 1 |
97f11894 JR |
12 | License: GPL |
13 | Group: Applications/Mail | |
1a8eacb6 | 14 | Source0: http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.gz |
21d5eaae | 15 | # Source0-md5: d750176de7481498ebd1011e08a488da |
97f11894 | 16 | Source1: %{name}.init |
02ce1e50 | 17 | Source2: %{name}-milter.init |
497858ff | 18 | Source3: %{name}.tmpwatch |
df75f8e3 | 19 | Patch0: %{name}-config.patch |
56ae3514 PG |
20 | Patch1: %{name}-lib64.patch |
21 | Patch2: %{name}-tools-dbdir.patch | |
847d6b1c | 22 | URL: http://www.ijs.si/software/amavisd/ |
242a717d | 23 | BuildRequires: autoconf |
0b64b70e | 24 | BuildRequires: rpm-perlprov |
8d1778df | 25 | BuildRequires: rpmbuild(macros) >= 1.268 |
f64399ed | 26 | BuildRequires: sendmail-devel |
8d1778df ER |
27 | Requires(post,preun): /sbin/chkconfig |
28 | Requires(postun): /usr/sbin/groupdel | |
29 | Requires(postun): /usr/sbin/userdel | |
adeb4420 | 30 | Requires(pre): /bin/id |
8d1778df | 31 | Requires(pre): /usr/bin/getgid |
adeb4420 JB |
32 | Requires(pre): /usr/sbin/groupadd |
33 | Requires(pre): /usr/sbin/useradd | |
8d1778df | 34 | Requires: /usr/lib/sendmail |
f64399ed | 35 | Requires: perl-Archive-Tar |
4df93795 | 36 | Requires: perl-Archive-Zip >= 1.14 |
669b6a0f | 37 | Requires: perl-Compress-Zlib >= 1.35 |
f64399ed | 38 | Requires: perl-Convert-TNEF |
bc735747 | 39 | Requires: perl-Convert-UUlib >= 1.05 |
f64399ed | 40 | Requires: perl-MIME-tools |
8d1778df | 41 | Requires: perl-Mail-SpamAssassin |
6db09628 | 42 | Requires: perl-Net-Server >= 0.93 |
49563eba | 43 | Requires: perl-Time-HiRes >= 1.49 |
f64399ed | 44 | Requires: perl-Unix-Syslog |
8d1778df | 45 | Requires: perl-libnet |
f64399ed | 46 | Requires: sh-utils |
31694df9 | 47 | Provides: group(amavis) |
48 | Provides: user(amavis) | |
97f11894 JR |
49 | Obsoletes: AMaViS |
50 | Obsoletes: amavis | |
540cd986 | 51 | Obsoletes: amavisd |
20dd82e7 | 52 | Obsoletes: amavisd-daemon |
20dd82e7 | 53 | Obsoletes: amavisd-exim |
20dd82e7 | 54 | Obsoletes: amavisd-new-exim |
8d1778df | 55 | Obsoletes: amavisd-new-postfix |
20dd82e7 | 56 | Obsoletes: amavisd-new-qmail |
8d1778df ER |
57 | Obsoletes: amavisd-postfix |
58 | Obsoletes: amavisd-qmail | |
7c245890 | 59 | Conflicts: amavis-stats <= 0.1.12 |
b2d76cba | 60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
97f11894 | 61 | |
497858ff PG |
62 | %define _tmpwatchdir /etc/tmpwatch |
63 | ||
97f11894 JR |
64 | %description |
65 | AMaViS is a script that interfaces a mail transport agent (MTA) with | |
c7fcd0ab | 66 | one or more virus scanners and SpamAssasin. This is daemonized version |
67 | of amavis. | |
97f11894 | 68 | |
af178a5e JR |
69 | %description -l pl.UTF-8 |
70 | AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA) | |
71 | a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja | |
c7fcd0ab | 72 | zdemonizowana. |
97f11894 | 73 | |
97f11894 | 74 | %package sendmail |
577916a3 | 75 | Summary: A Mail Virus Scanner with SpamAssasin support - sendmail backend |
af178a5e | 76 | Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla sendmaila |
97f11894 | 77 | Group: Applications/Mail |
0eaa8d8d | 78 | Requires: %{name} = %{epoch}:%{version}-%{release} |
97f11894 JR |
79 | Requires: sendmail |
80 | ||
81 | %description sendmail | |
82 | AMaViS is a script that interfaces a mail transport agent (MTA) with | |
83 | one or more virus scanners. This is daemonized version of amavis. | |
84 | ||
85 | This package contains backend for sendmail. | |
86 | ||
af178a5e JR |
87 | %description sendmail -l pl.UTF-8 |
88 | AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA) | |
89 | a jednym lub więcej programów antywirusowych. Wersja zdemonizowana. | |
97f11894 JR |
90 | |
91 | Pakiet ten zawiera back-end dla sendmaila. | |
92 | ||
93 | %prep | |
7292b331 | 94 | %setup -q |
97f11894 | 95 | %patch0 -p1 |
f242b148 | 96 | %if "%{_lib}" == "lib64" |
56ae3514 | 97 | %patch1 -p1 |
f242b148 | 98 | %endif |
56ae3514 | 99 | %patch2 -p1 |
97f11894 JR |
100 | |
101 | %build | |
becc1ca4 | 102 | cd helper-progs |
242a717d JB |
103 | %{__autoconf} |
104 | ./configure \ | |
105 | --with-sendmail=/usr/lib/sendmail \ | |
becc1ca4 | 106 | --with-runtime-dir=/var/spool/amavis/runtime \ |
5c3a2e42 | 107 | --with-sockname=/var/run/amavisd/amavisd.sock |
becc1ca4 | 108 | %{__make} |
3f7dd2df | 109 | |
97f11894 JR |
110 | %install |
111 | rm -rf $RPM_BUILD_ROOT | |
497858ff | 112 | install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}} |
97f11894 | 113 | |
d327bf95 | 114 | install amavisd $RPM_BUILD_ROOT%{_sbindir} |
e8ac386a | 115 | install amavisd-agent $RPM_BUILD_ROOT%{_sbindir} |
116 | install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir} | |
3d8e2ba9 | 117 | install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf |
dc528807 JB |
118 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd |
119 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter | |
becc1ca4 | 120 | install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir} |
121 | install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir} | |
497858ff | 122 | install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf |
97f11894 | 123 | |
97f11894 JR |
124 | %clean |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
e46e72f9 | 127 | %pre |
7f59124a ER |
128 | %groupadd -g 116 -r -f amavis |
129 | %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis | |
e46e72f9 | 130 | |
131 | %postun | |
132 | if [ "$1" = "0" ]; then | |
31694df9 | 133 | %userremove amavis |
134 | %groupremove amavis | |
e46e72f9 | 135 | fi |
136 | ||
97f11894 JR |
137 | %post |
138 | /sbin/chkconfig --add amavisd | |
8d1778df | 139 | %service amavisd restart "Amavisd daemon" |
97f11894 JR |
140 | |
141 | %preun | |
5c3a2e42 | 142 | if [ "$1" = "0" ]; then |
8d1778df | 143 | %service amavisd stop |
97f11894 JR |
144 | /sbin/chkconfig --del amavisd |
145 | fi | |
146 | ||
02ce1e50 | 147 | %post sendmail |
148 | /sbin/chkconfig --add amavis-milter | |
8d1778df | 149 | %service amavis-milter restart "Amavis-milter daemon" |
02ce1e50 | 150 | |
02ce1e50 | 151 | %preun sendmail |
152 | if [ "$1" = "0" ];then | |
8d1778df | 153 | %service amavis-milter stop |
02ce1e50 | 154 | /sbin/chkconfig --del amavis-milter |
155 | fi | |
156 | ||
97f11894 JR |
157 | %files |
158 | %defattr(644,root,root,755) | |
20dd82e7 | 159 | %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages |
df75f8e3 | 160 | %attr(755,root,root) %{_sbindir}/amavisd* |
8e70c0b2 | 161 | %attr(754,root,root) /etc/rc.d/init.d/amavisd |
dc528807 | 162 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf |
497858ff | 163 | %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf |
7383166c | 164 | %attr(750,amavis,amavis) %{_var}/spool/amavis |
5c3a2e42 | 165 | %attr(750,amavis,amavis) %{_var}/run/amavisd |
97f11894 | 166 | |
becc1ca4 | 167 | %files sendmail |
398599b8 | 168 | %defattr(644,root,root,755) |
dc528807 | 169 | %attr(754,root,root) /etc/rc.d/init.d/amavis-milter |
becc1ca4 | 170 | %attr(755,root,root) %{_sbindir}/amavis |
171 | %attr(755,root,root) %{_sbindir}/amavis-milter |