]> git.pld-linux.org Git - packages/amavisd-new.git/blobdiff - amavisd-new.spec
- BR: rpm-perlprov
[packages/amavisd-new.git] / amavisd-new.spec
index 486c6a7afdf827796e99ffd2a0f0444336e89277..c5367ed2a84c8be91ff21659fb0d0aa7e37a0386 100644 (file)
+# TODO:
+# - Add polish info mail templates
 %include       /usr/lib/rpm/macros.perl
-Summary:       A Mail Virus Scanner with SpamAssasin support - Daemon.
-Summary(pl):   Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - Demon
+Summary:       A Mail Virus Scanner with SpamAssassin support - daemon
+Summary(pl):   Antywirusowy skaner poczty elektronicznej z obs³ug± SpamAssasina - demon
 Name:          amavisd-new
-Version:       20020517
-Release:       1
+Version:       2.2.1
+Release:       3
+Epoch:         1
 License:       GPL
 Group:         Applications/Mail
 Source0:       http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.gz
+# Source0-md5: 567b6df37a2f049fe23c176e6fd1472f
 Source1:       %{name}.init
-Patch0:                %{name}-notest-mta.patch
-Patch1:                %{name}-nomilter.patch
-Patch2:                %{name}-qmail.patch
-Patch4:                %{name}-clamav.patch
-URL:           http://www.amavis.org/
-BuildRequires: arc
+Source2:       %{name}-milter.init
+Patch0:                %{name}-config.patch
+Patch1:                %{name}-dirperms.patch
+Patch2:                %{name}-lib64.patch
+Patch3:                %{name}-tools-dbdir.patch
+URL:           http://www.ijs.si/software/amavisd/
 BuildRequires: autoconf
-BuildRequires:  automake
-BuildRequires: bzip2
-BuildRequires: file
-BuildRequires: lha
-BuildRequires: ncompress
-BuildRequires: perl-Archive-Tar
-BuildRequires: perl-Archive-Zip
-BuildRequires: perl-Compress-Zlib
-BuildRequires: perl-MIME-tools
-BuildRequires: perl-Unix-Syslog
-BuildRequires: perl-Convert-UUlib
-BuildRequires: perl-Convert-TNEF
-BuildRequires: perl-libnet
-BuildRequires: perl-Mail-SpamAssassin
-BuildRequires: perl-Vipuls-Razor-V1
-BuildRequires: sh-utils
-BuildRequires: unarj
-BuildRequires: unrar
-BuildRequires: zoo
+BuildRequires: rpm-perlprov
+BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: sendmail-devel
+Requires(pre): /usr/bin/getgid
 Requires(pre): /bin/id
+Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/userdel
-Requires:      /usr/lib/sendmail
-Requires:      arc
-Requires:      bzip2
-Requires:      file
-Requires:      lha
-Requires:      ncompress
-Requires:      sh-utils
-Requires:      unarj
-Requires:      unrar
-Requires:      zoo
+Requires(postun):      /usr/sbin/groupdel
+Requires(post,preun):  /sbin/chkconfig
+Requires:      perl-Archive-Tar
+Requires:      perl-Archive-Zip
+Requires:      perl-Compress-Zlib
+Requires:      perl-Convert-TNEF
+Requires:      perl-Convert-UUlib
+Requires:      perl-libnet
 Requires:      perl-Mail-SpamAssassin
-Requires:      perl-Vipuls-Razor-V1
-Requires:      amavisd-daemon
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Requires:      perl-MIME-tools
+Requires:      perl-Net-Server
+Requires:      perl-Unix-Syslog
+Requires:      sh-utils
+Requires:      /usr/lib/sendmail
+Provides:      group(amavis)
+Provides:      user(amavis)
 Obsoletes:     AMaViS
 Obsoletes:     amavis
-
-%description
-AMaViS is a script that interfaces a mail transport agent (MTA) with
-one or more virus scanners and SpamAssasin.
-This is daemonized version of amavis.
-
-%description -l pl
-AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
-a jednym lub wiêcej programów antywirusowych i SpamAssasinem.
-Wersja zdemonizowana.
-
-%package postfix
-Summary:       A Mail Virus Scanner with SpamAssasin support - postfix back-end.
-Summary(pl):   Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
-Group:         Applications/Mail
-Provides:      amavisd-daemon
-Obsoletes:     amavisd-daemon
-Obsoletes:     amavisd-exim
-Obsoletes:     amavisd-qmail
-Obsoletes:     amavisd-sendmail
-Requires:      postfix
-
-%description postfix
-AMaViS is a script that interfaces a mail transport agent (MTA) with
-one or more virus scanners. This is daemonized version of amavis.
-
-This package contains backend for postfix.
-
-%description postfix -l pl
-AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
-a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
-
-Pakiet ten zawiera back-end dla postfiks.
-
-%package exim
-Summary:       A Mail Virus Scanner with SpamAssasin support - exim backend.
-Summary(pl):   Antywirusowy skaner poczty elektronicznej - backend dla exima
-Group:         Applications/Mail
-Provides:      amavisd-daemon
+Obsoletes:     amavisd
 Obsoletes:     amavisd-daemon
 Obsoletes:     amavisd-postfix
+Obsoletes:     amavisd-exim
 Obsoletes:     amavisd-qmail
-Obsoletes:     amavisd-sendmail
-Requires:      exim
+Obsoletes:     amavisd-new-postfix
+Obsoletes:     amavisd-new-exim
+Obsoletes:     amavisd-new-qmail
+Conflicts:     amavis-stats <= 0.1.12
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%description exim
+%description
 AMaViS is a script that interfaces a mail transport agent (MTA) with
-one or more virus scanners. This is daemonized version of amavis.
-
-This package contains backend for exim.
+one or more virus scanners and SpamAssasin. This is daemonized version
+of amavis.
 
-%description exim -l pl
+%description -l pl
 AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
-a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
-
-Pakiet ten zawiera back-end dla exima.
-
-# NFY
-#%package qmail
-#Summary:      A Mail Virus Scanner - qmail backend.
-#Summary(pl):  Antywirusowy skaner poczty elektronicznej - backend dla qmaila
-#Group:                Applications/Mail
-#Provides:     amavisd-daemon
-#Obsoletes:    amavisd-daemon
-#Obsoletes:    amavisd-postfix
-#Obsoletes:    amavisd-exim
-#Obsoletes:    amavisd-sendmail
-#Requires:     qmailmta
-#
-#%description qmail
-#AMaViS is a script that interfaces a mail transport agent (MTA) with
-#one or more virus scanners. This is daemonized version of amavis.
-#
-#This package contains backend for qmail.
-#
-#%description qmail -l pl
-#AMaViS to skrypt po¶rednicz±cy pomiêdzy agentem transferu poczty (MTA)
-#a jednym lub wiêcej programów antywirusowych. Wersja zdemonizowana.
-#
-#Pakiet ten zawiera back-end dla qmaila.
+a jednym lub wiêcej programów antywirusowych i SpamAssasinem. Wersja
+zdemonizowana.
 
 %package sendmail
-Summary:       A Mail Virus Scanner with SpamAssasin support - sendmail backend.
+Summary:       A Mail Virus Scanner with SpamAssasin support - sendmail backend
 Summary(pl):   Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
 Group:         Applications/Mail
-Provides:      amavisd-daemon
-Obsoletes:     amavisd-daemon
-Obsoletes:     amavisd-postfix
-Obsoletes:     amavisd-exim
-Obsoletes:     amavisd-qmail
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      sendmail
 
 %description sendmail
@@ -159,100 +86,47 @@ a jednym lub wi
 Pakiet ten zawiera back-end dla sendmaila.
 
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
 %patch0 -p1
-%patch1 -p1
+# %patch1 -p1
+%if "%{_lib}" == "lib64"
 %patch2 -p1
-%patch4 -p1
+%endif
+%patch3 -p1
 
 %build
-aclocal
+cd helper-progs
 %{__autoconf}
-%{__automake}
-%configure \
-       --enable-smtp \
-       --enable-postfix \
-       --enable-all \
-       --enable-syslog \
-       --with-runtime-dir=%{_var}/spool/amavis/runtime \
-       --with-virusdir=%{_var}/spool/amavis/virusmails \
-       --with-logdir=%{_var}/log \
-       --with-amavisuser=amavis \
-       --with-sockname=%{_var}/run/amavisd/amavisd.sock
-
-%{__make}
-mv amavis/amavisd amavis/amavisd.postfix
-
-%configure \
-       --disable-smtp \
-       --enable-exim \
-       --enable-all \
-       --enable-syslog \
-       --with-runtime-dir=%{_var}/spool/amavis/runtime \
-       --with-virusdir=%{_var}/spool/amavis/virusmails \
-       --with-logdir=%{_var}/log \
-       --with-amavisuser=amavis \
-       --with-sockname=%{_var}/run/amavisd/amavisd.sock
-
-%{__make}
-mv amavis/amavisd amavis/amavisd.exim
-
-# NFY
-#%%configure \
-#      --disable-smtp \
-#      --enable-qmail \
-#      --enable-all \
-#      --enable-syslog \
-#      --with-runtime-dir=%{_var}/spool/amavis/runtime \
-#      --with-virusdir=%{_var}/spool/amavis/virusmails \
-#      --with-logdir=%{_var}/log \
-#      --with-amavisuser=amavis \
-#      --with-sockname=%{_var}/run/amavisd/amavisd.sock
-#
-#%{__make}
-#mv amavis/amavisd amavis/amavisd.qmail
-
-%configure \
-       --disable-smtp \
-       --enable-sendmail \
-       --enable-all \
-       --enable-syslog \
-       --with-runtime-dir=%{_var}/spool/amavis/runtime \
-       --with-virusdir=%{_var}/spool/amavis/virusmails \
-       --with-logdir=%{_var}/log \
-       --with-amavisuser=amavis \
-       --with-sockname=%{_var}/run/amavisd/amavisd.sock
-
+./configure \
+       --with-sendmail=/usr/lib/sendmail \
+       --with-runtime-dir=/var/spool/amavis/runtime \
+       --with-sockname=/var/run/amavisd/amavisd.sock
 %{__make}
-mv amavis/amavisd amavis/amavisd.sendmail
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails},%{_var}/run/amavisd}
+install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir}}
 
-%{__make} install \
-       amavisuser=$(id -u) \
-       DESTDIR=$RPM_BUILD_ROOT
-install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
-
-install amavis/amavisd.{exim,postfix,sendmail} $RPM_BUILD_ROOT%{_sbindir}
+install amavisd $RPM_BUILD_ROOT%{_sbindir}
+install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
+install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
+install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
+install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
+install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`id -u amavis 2>/dev/null`" ]; then
-       if [ "`id -u amavis`" != "97" ]; then
-               echo "Error: user amavis doesn't have uid=97. Correct this before installing amavis." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody  amavis 1>&2
-fi
+%groupadd -g 116 -r -f amavis
+%useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
 
 %postun
 if [ "$1" = "0" ]; then
-       /usr/sbin/userdel amavis
+       %userremove amavis
+       %groupremove amavis
 fi
 
 %post
@@ -264,46 +138,40 @@ else
 fi
 
 %preun
-if [ "$1" = "0" ];then
+if [ "$1" = "0" ]; then
        if [ -f /var/lock/subsys/amavisd ]; then
                /etc/rc.d/init.d/amavisd stop >&2
        fi
        /sbin/chkconfig --del amavisd
 fi
 
-%post exim
-ln -sf amavisd.exim %{_sbindir}/amavisd
-
-%post postfix
-ln -sf amavisd.postfix %{_sbindir}/amavisd
-
-#%post qmail
-#ln -sf amavisd.qmail %{_sbindir}/amavisd
-
 %post sendmail
-ln -sf amavisd.sendmail %{_sbindir}/amavisd
+/sbin/chkconfig --add amavis-milter
+if [ -f /var/lock/subsys/amavis-milter ]; then
+       /etc/rc.d/init.d/amavis-milter restart >&2
+else
+       echo "Run \"/etc/rc.d/init.d/amavis-milter start\" to start Amavis-milter daemon."
+fi
+
+%preun sendmail
+if [ "$1" = "0" ];then
+       if [ -f /var/lock/subsys/amavis-milter ]; then
+               /etc/rc.d/init.d/amavis-milter stop >&2
+       fi
+       /sbin/chkconfig --del amavis-milter
+fi
 
 %files
 %defattr(644,root,root,755)
-%doc README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html doc/amavis.png
-%attr(755,root,root) %{_sbindir}/amavis
-%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/*
-%config(noreplace) %{_sysconfdir}/amavisd.conf
-%attr(750,amavis,root) %{_var}/spool/amavis
-%attr(755,amavis,root) %{_var}/run/amavisd
-
-%files exim
-%attr(755,root,root) %{_sbindir}/amavisd.exim
-%ghost %attr(777,root,root) %{_sbindir}/amavisd
-
-%files postfix
-%attr(755,root,root) %{_sbindir}/amavisd.postfix
-%ghost %attr(777,root,root) %{_sbindir}/amavisd
-
-#%files qmail
-#%attr(755,root,root) %{_sbindir}/amavisd.qmail
-#%ghost %attr(777,root,root) %{_sbindir}/amavisd
+%doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
+%attr(755,root,root) %{_sbindir}/amavisd*
+%attr(754,root,root) /etc/rc.d/init.d/amavisd
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
+%attr(750,amavis,amavis) %{_var}/spool/amavis
+%attr(750,amavis,amavis) %{_var}/run/amavisd
 
 %files sendmail
-%attr(755,root,root) %{_sbindir}/amavisd.sendmail
-%ghost %attr(777,root,root) %{_sbindir}/amavisd
+%defattr(644,root,root,755)
+%attr(754,root,root) /etc/rc.d/init.d/amavis-milter
+%attr(755,root,root) %{_sbindir}/amavis
+%attr(755,root,root) %{_sbindir}/amavis-milter
This page took 0.181678 seconds and 4 git commands to generate.