]> git.pld-linux.org Git - packages/amavisd-new.git/blob - amavisd-new.spec
- Updated to 20030616-p5. Removed not used patches (config-mks, bin).
[packages/amavisd-new.git] / amavisd-new.spec
1 # TODO:
2 # - fix mks interface 
3 # - fix clamavis interface
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:        20030616
10 Release:        2.1
11 License:        GPL
12 Group:          Applications/Mail
13 Source0:        http://www.ijs.si/software/amavisd/%{name}-%{version}-p5.tar.gz
14 # Source0-md5:  13c76432e957ccd302856f64526483a2
15 Source1:        %{name}.init
16 Patch0:         %{name}-config.patch
17 # Patch1:               %{name}-bin.patch
18 # Patch2:               %{name}-config-mks.patch
19 Patch3:         %{name}-cpio-reads-tar.patch
20 URL:            http://www.amavis.org/
21 BuildRequires:  arc
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  bzip2
25 BuildRequires:  file
26 BuildRequires:  lha
27 BuildRequires:  ncompress
28 BuildRequires:  perl-Archive-Tar
29 BuildRequires:  perl-Archive-Zip
30 BuildRequires:  perl-Compress-Zlib
31 BuildRequires:  perl-MIME-tools
32 BuildRequires:  perl-Unix-Syslog
33 BuildRequires:  perl-Convert-UUlib
34 BuildRequires:  perl-Convert-TNEF
35 BuildRequires:  perl-libnet
36 BuildRequires:  perl-Mail-SpamAssassin
37 BuildRequires:  perl-Net-Server
38 BuildRequires:  sh-utils
39 BuildRequires:  unarj
40 BuildRequires:  unrar
41 BuildRequires:  zoo
42 Requires(pre):  /usr/bin/getgid
43 Requires(pre):  /bin/id
44 Requires(pre):  /usr/sbin/groupadd
45 Requires(pre):  /usr/sbin/useradd
46 Requires(postun):       /usr/sbin/userdel
47 Requires(postun):       /usr/sbin/groupdel
48 Requires(post,preun):   /sbin/chkconfig
49 Requires:       /usr/lib/sendmail
50 Requires:       arc
51 Requires:       bzip2
52 Requires:       file
53 Requires:       lha
54 Requires:       ncompress
55 Requires:       sh-utils
56 Requires:       unarj
57 Requires:       unrar
58 Requires:       zoo
59 Requires:       perl-Mail-SpamAssassin
60 #Requires:      perl-SAVI
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Obsoletes:      AMaViS
63 Obsoletes:      amavis
64 Obsoletes:      amavisd-daemon
65 Obsoletes:      amavisd-postfix
66 Obsoletes:      amavisd-exim
67 Obsoletes:      amavisd-qmail
68 Obsoletes:      amavisd-new-postfix
69 Obsoletes:      amavisd-new-exim
70 Obsoletes:      amavisd-new-qmail
71
72 %description
73 AMaViS is a script that interfaces a mail transport agent (MTA) with
74 one or more virus scanners and SpamAssasin. This is daemonized version
75 of amavis.
76
77 %description -l pl
78 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
79 a jednym lub wiêcej programów antywirusowych i SpamAssasinem. Wersja
80 zdemonizowana.
81
82 %package sendmail
83 Summary:        A Mail Virus Scanner with SpamAssasin support - sendmail backend
84 Summary(pl):    Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
85 Group:          Applications/Mail
86 Requires:       sendmail
87 Requires:       %{name}
88
89 %description sendmail
90 AMaViS is a script that interfaces a mail transport agent (MTA) with
91 one or more virus scanners. This is daemonized version of amavis.
92
93 This package contains backend for sendmail.
94
95 %description sendmail -l pl
96 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
97 a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
98
99 Pakiet ten zawiera back-end dla sendmaila.
100
101 %prep
102 %setup -q
103 %patch0 -p1
104 #%patch1 -p1
105 #%patch2 -p1
106 %patch3 -p1
107
108 %build
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails},%{_var}/run/amavisd,%{_sysconfdir}/rc.d/init.d,%{_sbindir}}
113
114 install amavisd $RPM_BUILD_ROOT%{_sbindir}
115 install amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}
116 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/amavisd
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %pre
122 if [ -n "`getgid amavis`" ]; then
123         if [ "`getgid amavis`" != "116" ]; then
124                 echo "Error: group amavis doesn't have gid=116. Correct this before installing amavisd-new." 1>&2
125                 exit 1
126         fi
127 else
128        echo "adding group amavis GID=116."
129         /usr/sbin/groupadd -g 116 -r -f amavis
130 fi
131
132 if [ -n "`id -u amavis 2>/dev/null`" ]; then
133        if [ "`id -u amavis`" != "97" ]; then
134                echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
135                exit 1
136        fi
137 else
138        /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
139 fi
140
141 %postun
142 if [ "$1" = "0" ]; then
143        /usr/sbin/userdel amavis
144        echo "Removing group amavis."
145        /usr/sbin/groupdel amavis
146
147 fi
148
149 %post
150 /sbin/chkconfig --add amavisd
151 if [ -f /var/lock/subsys/amavisd ]; then
152         /etc/rc.d/init.d/amavisd restart >&2
153 else
154         echo "Run \"/etc/rc.d/init.d/amavisd start\" to start Amavisd daemon."
155 fi
156
157 %preun
158 if [ "$1" = "0" ];then
159         if [ -f /var/lock/subsys/amavisd ]; then
160                 /etc/rc.d/init.d/amavisd stop >&2
161         fi
162         /sbin/chkconfig --del amavisd
163 fi
164
165 %files
166 %defattr(644,root,root,755)
167 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
168 %attr(755,root,root) %{_sbindir}/amavisd*
169 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
170 %config(noreplace) %{_sysconfdir}/amavisd.conf
171 %attr(750,amavis,amavis) %{_var}/spool/amavis
172 %attr(755,amavis,root) %{_var}/run/amavisd
173
174 #%files sendmail
175 #%attr(755,root,root) %{_sbindir}/amavis
176 #%attr(755,root,root) %{_sbindir}/amavis-milter
This page took 0.045908 seconds and 4 git commands to generate.