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