]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
- up to 2.6.6
[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.UTF-8):      Antywirusowy skaner poczty elektronicznej z obsługą SpamAssasina - demon
8 Name:           amavisd-new
9 Version:        2.6.6
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:  6bddb725115c2682110b82d41494df73
16 Source1:        %{name}.init
17 Source2:        %{name}-milter.init
18 Source3:        %{name}.tmpwatch
19 Patch0:         %{name}-config.patch
20 Patch1:         %{name}-tools-dbdir.patch
21 URL:            http://www.ijs.si/software/amavisd/
22 BuildRequires:  libmilter-devel
23 BuildRequires:  rpm-perlprov
24 BuildRequires:  rpmbuild(macros) >= 1.304
25 Requires(post,preun):   /sbin/chkconfig
26 Requires(postun):       /usr/sbin/groupdel
27 Requires(postun):       /usr/sbin/userdel
28 Requires(pre):  /bin/id
29 Requires(pre):  /usr/bin/getgid
30 Requires(pre):  /usr/sbin/groupadd
31 Requires(pre):  /usr/sbin/useradd
32 Requires:       /usr/lib/sendmail
33 Requires:       perl-Archive-Tar
34 Requires:       perl-Archive-Zip >= 1.14
35 Requires:       perl-Convert-BinHex
36 Requires:       perl-Convert-TNEF
37 Requires:       perl-Convert-UUlib >= 1.05
38 Requires:       perl-IO-Compress
39 Requires:       perl-MIME-tools
40 Requires:       perl-Net-Server >= 0.93
41 Requires:       perl-Time-HiRes >= 1.49
42 Requires:       perl-Unix-Syslog
43 Requires:       perl-libnet
44 Requires:       rc-scripts >= 0.4.1.23
45 Requires:       sh-utils
46 #Suggests:      arc
47 #Suggests:      arj
48 Suggests:       binutils
49 Suggests:       bzip2
50 Suggests:       cabextract
51 Suggests:       clamav
52 Suggests:       cpio
53 Suggests:       dspam
54 Suggests:       freeze
55 Suggests:       gzip
56 Suggests:       lha
57 Suggests:       lzop
58 #Suggests:      melt
59 Suggests:       ncompress
60 Suggests:       nomarch
61 Suggests:       pax
62 Suggests:       perl-Authen-SASL
63 Suggests:       unarj
64 #Suggests:      unfreeze
65 # required already by perl-Mail-SpamAssassin
66 #Suggests:      perl-DB_File
67 #Suggests:      perl-IO-Socket-INET6
68 # required when doing SQL lookups
69 Suggests:       p0f
70 #Suggests:      perl-DBD-mysql
71 Suggests:       perl-Digest-MD5
72 Suggests:       perl-Mail-DKIM >= 0.31
73 Suggests:       perl-Mail-SpamAssassin
74 Suggests:       perl-Razor
75 Suggests:       perl-SAVI
76 Suggests:       perl-ldap
77 #Suggests:      rar
78 #Suggests:      ripole
79 Suggests:       rpm-utils
80 Suggests:       tnef
81 Suggests:       unrar
82 Suggests:       unzoo
83 #Suggests:      zoo
84 Provides:       group(amavis)
85 Provides:       user(amavis)
86 Obsoletes:      AMaViS
87 Obsoletes:      amavis
88 Obsoletes:      amavisd
89 Obsoletes:      amavisd-daemon
90 Obsoletes:      amavisd-exim
91 Obsoletes:      amavisd-new-exim
92 Obsoletes:      amavisd-new-postfix
93 Obsoletes:      amavisd-new-qmail
94 Obsoletes:      amavisd-postfix
95 Obsoletes:      amavisd-qmail
96 Conflicts:      amavis-stats <= 0.1.12
97 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
98
99 %define         _tmpwatchdir    /etc/tmpwatch
100 %define         schemadir       /usr/share/openldap/schema
101
102 %description
103 AMaViS is a script that interfaces a mail transport agent (MTA) with
104 one or more virus scanners and SpamAssasin. This is daemonized version
105 of amavis.
106
107 %description -l pl.UTF-8
108 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
109 a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja
110 zdemonizowana.
111
112 %package sendmail
113 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend
114 Summary(pl.UTF-8):      Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
115 Group:          Applications/Mail
116 Requires:       %{name} = %{epoch}:%{version}-%{release}
117 Requires:       sendmail
118
119 %description sendmail
120 AMaViS is a script that interfaces a mail transport agent (MTA) with
121 one or more virus scanners. This is daemonized version of amavis.
122
123 This package contains backend for sendmail.
124
125 %description sendmail -l pl.UTF-8
126 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
127 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
128
129 Pakiet ten zawiera back-end dla sendmaila.
130
131 %package -n openldap-schema-amavisd-new
132 Summary:        Amavisd-new LDAP schema
133 Summary(pl.UTF-8):      Schemat LDAP dla amavisd-new
134 Group:          Networking/Daemons
135 Requires:       openldap-servers
136
137 %description -n openldap-schema-amavisd-new
138 This package contains LDAP schema for use with amavisd-new.
139
140 %description -n openldap-schema-amavisd-new -l pl.UTF-8
141 Ten pakiet zawiera schemat LDAP do używania z amavisd-new.
142
143 %prep
144 %setup -q
145 %patch0 -p1
146 %patch1 -p1
147
148 %build
149 cd helper-progs
150 %configure \
151         --with-sendmail=/usr/lib/sendmail \
152         --with-runtime-dir=/var/spool/amavis/runtime \
153         --with-sockname=/var/run/amavisd/amavisd.sock \
154         --with-milterlib=%{_libdir}
155 %{__make}
156
157 %install
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}}
160
161 install amavisd $RPM_BUILD_ROOT%{_sbindir}
162 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
163 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
164 install amavisd-release $RPM_BUILD_ROOT%{_sbindir}
165 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
166 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
167 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
168 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
169 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
170 install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf
171 install -D LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema
172
173 %clean
174 rm -rf $RPM_BUILD_ROOT
175
176 %pre
177 %groupadd -g 116 -r -f amavis
178 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
179
180 %postun
181 if [ "$1" = "0" ]; then
182         %userremove amavis
183         %groupremove amavis
184 fi
185
186 %post
187 /sbin/chkconfig --add amavisd
188 %service amavisd restart "Amavisd daemon"
189
190 %preun
191 if [ "$1" = "0" ]; then
192         %service amavisd stop
193         /sbin/chkconfig --del amavisd
194 fi
195
196 %post sendmail
197 /sbin/chkconfig --add amavis-milter
198 %service amavis-milter restart "Amavis-milter daemon"
199
200 %preun sendmail
201 if [ "$1" = "0" ];then
202         %service amavis-milter stop
203         /sbin/chkconfig --del amavis-milter
204 fi
205
206 %post -n openldap-schema-amavisd-new
207 %openldap_schema_register %{schemadir}/amavisd-new.schema
208 %service -q ldap restart
209
210 %postun -n openldap-schema-amavisd-new
211 if [ "$1" = "0" ]; then
212         %openldap_schema_unregister %{schemadir}/amavisd-new.schema
213         %service -q ldap restart
214 fi
215
216 %files
217 %defattr(644,root,root,755)
218 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
219 %attr(755,root,root) %{_sbindir}/amavisd*
220 %attr(754,root,root) /etc/rc.d/init.d/amavisd
221 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
222 %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf
223 %attr(750,amavis,amavis) %{_var}/spool/amavis
224 %attr(750,amavis,amavis) %{_var}/run/amavisd
225
226 %files sendmail
227 %defattr(644,root,root,755)
228 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
229 %attr(755,root,root) %{_sbindir}/amavis
230 %attr(755,root,root) %{_sbindir}/amavis-milter
231
232 %files -n openldap-schema-amavisd-new
233 %defattr(644,root,root,755)
234 %{schemadir}/*.schema
This page took 0.065782 seconds and 3 git commands to generate.