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