]>
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 |
a7e13892 | 7 | Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej z obsługą SpamAssasina - demon |
97f11894 | 8 | Name: amavisd-new |
9e2c9e47 ER |
9 | Version: 2.7.0 |
10 | Release: 0.1 | |
7292b331 | 11 | Epoch: 1 |
97f11894 JR |
12 | License: GPL |
13 | Group: Applications/Mail | |
9e2c9e47 ER |
14 | Source0: http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.xz |
15 | # Source0-md5: 54e13e9804358982a05624900c9d0d6e | |
97f11894 | 16 | Source1: %{name}.init |
497858ff | 17 | Source3: %{name}.tmpwatch |
df75f8e3 | 18 | Patch0: %{name}-config.patch |
6b0b41f1 | 19 | Patch1: %{name}-tools-dbdir.patch |
847d6b1c | 20 | URL: http://www.ijs.si/software/amavisd/ |
0b64b70e | 21 | BuildRequires: rpm-perlprov |
a8d7833f | 22 | BuildRequires: rpmbuild(macros) >= 1.304 |
9e2c9e47 | 23 | BuildRequires: tar >= 1:1.22 |
8d1778df ER |
24 | Requires(post,preun): /sbin/chkconfig |
25 | Requires(postun): /usr/sbin/groupdel | |
26 | Requires(postun): /usr/sbin/userdel | |
adeb4420 | 27 | Requires(pre): /bin/id |
8d1778df | 28 | Requires(pre): /usr/bin/getgid |
adeb4420 JB |
29 | Requires(pre): /usr/sbin/groupadd |
30 | Requires(pre): /usr/sbin/useradd | |
8d1778df | 31 | Requires: /usr/lib/sendmail |
f64399ed | 32 | Requires: perl-Archive-Tar |
4df93795 | 33 | Requires: perl-Archive-Zip >= 1.14 |
7369ad13 | 34 | Requires: perl-Convert-BinHex |
f64399ed | 35 | Requires: perl-Convert-TNEF |
bc735747 | 36 | Requires: perl-Convert-UUlib >= 1.05 |
05e18fa2 | 37 | Requires: perl-IO-Compress |
f64399ed | 38 | Requires: perl-MIME-tools |
6db09628 | 39 | Requires: perl-Net-Server >= 0.93 |
49563eba | 40 | Requires: perl-Time-HiRes >= 1.49 |
f64399ed | 41 | Requires: perl-Unix-Syslog |
8d1778df | 42 | Requires: perl-libnet |
b107fe7e | 43 | Requires: rc-scripts >= 0.4.1.23 |
f64399ed | 44 | Requires: sh-utils |
9e2c9e47 | 45 | Suggests: amavisd-milter >= 1.5.0 |
520c014c | 46 | #Suggests: arc |
520c014c | 47 | #Suggests: arj |
520c014c TP |
48 | Suggests: binutils |
49 | Suggests: bzip2 | |
50 | Suggests: cabextract | |
51 | Suggests: clamav | |
52 | Suggests: cpio | |
53 | Suggests: dspam | |
54 | Suggests: freeze | |
520c014c TP |
55 | Suggests: gzip |
56 | Suggests: lha | |
57 | Suggests: lzop | |
05e18fa2 | 58 | #Suggests: melt |
520c014c | 59 | Suggests: ncompress |
05e18fa2 | 60 | Suggests: nomarch |
520c014c TP |
61 | Suggests: pax |
62 | Suggests: perl-Authen-SASL | |
05e18fa2 | 63 | Suggests: unarj |
64 | #Suggests: unfreeze | |
520c014c TP |
65 | # required already by perl-Mail-SpamAssassin |
66 | #Suggests: perl-DB_File | |
67 | #Suggests: perl-IO-Socket-INET6 | |
68 | # required when doing SQL lookups | |
05e18fa2 | 69 | Suggests: p0f |
520c014c TP |
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 | |
520c014c | 77 | #Suggests: rar |
520c014c TP |
78 | #Suggests: ripole |
79 | Suggests: rpm-utils | |
80 | Suggests: tnef | |
05e18fa2 | 81 | Suggests: unrar |
520c014c TP |
82 | Suggests: unzoo |
83 | #Suggests: zoo | |
31694df9 | 84 | Provides: group(amavis) |
85 | Provides: user(amavis) | |
97f11894 JR |
86 | Obsoletes: AMaViS |
87 | Obsoletes: amavis | |
540cd986 | 88 | Obsoletes: amavisd |
20dd82e7 | 89 | Obsoletes: amavisd-daemon |
20dd82e7 | 90 | Obsoletes: amavisd-exim |
20dd82e7 | 91 | Obsoletes: amavisd-new-exim |
8d1778df | 92 | Obsoletes: amavisd-new-postfix |
20dd82e7 | 93 | Obsoletes: amavisd-new-qmail |
8d1778df ER |
94 | Obsoletes: amavisd-postfix |
95 | Obsoletes: amavisd-qmail | |
7c245890 | 96 | Conflicts: amavis-stats <= 0.1.12 |
b2d76cba | 97 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
97f11894 | 98 | |
497858ff | 99 | %define _tmpwatchdir /etc/tmpwatch |
86a87001 | 100 | %define schemadir /usr/share/openldap/schema |
497858ff | 101 | |
97f11894 JR |
102 | %description |
103 | AMaViS is a script that interfaces a mail transport agent (MTA) with | |
c7fcd0ab | 104 | one or more virus scanners and SpamAssasin. This is daemonized version |
105 | of amavis. | |
97f11894 | 106 | |
af178a5e JR |
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 | |
c7fcd0ab | 110 | zdemonizowana. |
97f11894 | 111 | |
86a87001 | 112 | %package -n openldap-schema-amavisd-new |
113 | Summary: Amavisd-new LDAP schema | |
114 | Summary(pl.UTF-8): Schemat LDAP dla amavisd-new | |
115 | Group: Networking/Daemons | |
116 | Requires: openldap-servers | |
117 | ||
118 | %description -n openldap-schema-amavisd-new | |
119 | This package contains LDAP schema for use with amavisd-new. | |
120 | ||
121 | %description -n openldap-schema-amavisd-new -l pl.UTF-8 | |
122 | Ten pakiet zawiera schemat LDAP do używania z amavisd-new. | |
123 | ||
97f11894 | 124 | %prep |
7292b331 | 125 | %setup -q |
97f11894 | 126 | %patch0 -p1 |
56ae3514 | 127 | %patch1 -p1 |
97f11894 | 128 | |
97f11894 JR |
129 | %install |
130 | rm -rf $RPM_BUILD_ROOT | |
497858ff | 131 | install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}} |
9e2c9e47 ER |
132 | install -p amavisd $RPM_BUILD_ROOT%{_sbindir} |
133 | install -p amavisd-agent $RPM_BUILD_ROOT%{_sbindir} | |
134 | install -p amavisd-nanny $RPM_BUILD_ROOT%{_sbindir} | |
135 | install -p amavisd-release $RPM_BUILD_ROOT%{_sbindir} | |
c550adb9 | 136 | install -p amavisd-submit $RPM_BUILD_ROOT%{_sbindir} |
9e2c9e47 ER |
137 | cp -p amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf |
138 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd | |
139 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf | |
140 | install -Dp LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema | |
97f11894 | 141 | |
97f11894 JR |
142 | %clean |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
e46e72f9 | 145 | %pre |
7f59124a ER |
146 | %groupadd -g 116 -r -f amavis |
147 | %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis | |
e46e72f9 | 148 | |
149 | %postun | |
150 | if [ "$1" = "0" ]; then | |
31694df9 | 151 | %userremove amavis |
152 | %groupremove amavis | |
e46e72f9 | 153 | fi |
154 | ||
97f11894 JR |
155 | %post |
156 | /sbin/chkconfig --add amavisd | |
8d1778df | 157 | %service amavisd restart "Amavisd daemon" |
97f11894 JR |
158 | |
159 | %preun | |
5c3a2e42 | 160 | if [ "$1" = "0" ]; then |
8d1778df | 161 | %service amavisd stop |
97f11894 JR |
162 | /sbin/chkconfig --del amavisd |
163 | fi | |
164 | ||
a8d7833f | 165 | %post -n openldap-schema-amavisd-new |
166 | %openldap_schema_register %{schemadir}/amavisd-new.schema | |
167 | %service -q ldap restart | |
168 | ||
169 | %postun -n openldap-schema-amavisd-new | |
170 | if [ "$1" = "0" ]; then | |
171 | %openldap_schema_unregister %{schemadir}/amavisd-new.schema | |
172 | %service -q ldap restart | |
173 | fi | |
174 | ||
97f11894 JR |
175 | %files |
176 | %defattr(644,root,root,755) | |
20dd82e7 | 177 | %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages |
c550adb9 ER |
178 | %attr(755,root,root) %{_sbindir}/amavisd |
179 | %attr(755,root,root) %{_sbindir}/amavisd-agent | |
180 | %attr(755,root,root) %{_sbindir}/amavisd-nanny | |
181 | %attr(755,root,root) %{_sbindir}/amavisd-release | |
182 | %attr(755,root,root) %{_sbindir}/amavisd-submit | |
8e70c0b2 | 183 | %attr(754,root,root) /etc/rc.d/init.d/amavisd |
dc528807 | 184 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf |
497858ff | 185 | %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf |
7383166c | 186 | %attr(750,amavis,amavis) %{_var}/spool/amavis |
5c3a2e42 | 187 | %attr(750,amavis,amavis) %{_var}/run/amavisd |
97f11894 | 188 | |
86a87001 | 189 | %files -n openldap-schema-amavisd-new |
190 | %defattr(644,root,root,755) | |
191 | %{schemadir}/*.schema |