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