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