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