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