Search
j0ke.net Open Build Service
>
Projects
>
server:mail
>
amavisd-new27
> amavisd-new.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File amavisd-new.spec of Package amavisd-new27
# # spec file for package amavisd-new (Version 2.7.0) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # #!BuildIgnore: post-build-checks # norootforbuild %define qdir /var/qmail Name: amavisd-new BuildRequires: krb5 sendmail sendmail-devel License: GPL v2 or later Group: Productivity/Networking/Security Url: http://www.ijs.si/software/amavisd/ Obsoletes: amavisd-postfix amavis-postfix amavis-sendmail amavisd-sendmail Requires: gzip bzip2 lha unarj unrar zoo sharutils perl-Compress-Zlib perl-Convert-UUlib perl-IO-stringy perl-MIME-tools >= 5.420 perl-MailTools perl-Archive-Tar perl-Unix-Syslog perl-Convert-TNEF perl-Archive-Zip perl-Net-Server perl-spamassassin file perl-BerkeleyDB perl-Crypt-OpenSSL-RSA perl-Mail-DKIM perl-Digest-SHA1 PreReq: /usr/sbin/useradd /bin/hostname /bin/sed /bin/cp /bin/mv %if 0%{?suse_version} PreReq: %insserv_prereq %endif AutoReqProv: on Summary: High-Performance E-Mail Virus Scanner Version: 2.7.2 Release: 50.<CI_CNT>.<B_CNT> Source0: amavisd-new-%{version}.tar.bz2 Source1: sysconfig.amavis Source2: rc.amavis Source3: README.SuSE Source4: RELEASE_NOTES.%{version} Source5: %{name}-supervise.tar.bz2 Patch0: amavisd-new-suse.dif Patch1: amavisd-new-%{version}-conf-qmail.patch Patch2: amavisd-new-fixes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define avspool /var/spool/amavis %define avquarantine /var/spool/amavis/virusmails %define miltersockdir /var/run/amavis %define avuser vscan %define avgroup vscan %package supervise Group: System/Security Summary: Supervise scripts for amavisd-new qmail integration Conflicts: qmail-scanner Obsoletes: qmail-scanner BuildRequires: daemontools ucspi-tcp Requires: qmail >= 1.06-50 Requires: daemontools Requires: ucspi-tcp %description supervise This package includes supervise scripts for amavisd-new qmail integration # --------------------------------------------------------------------------- %prep %setup -n amavisd-new-%{version} %patch0 -p 1 %__patch -p0 < amavisd-new-qmqpqq.patch %patch1 %patch2 # --------------------------------------------------------------------------- %build # --------------------------------------------------------------------------- %install rm -rf $RPM_BUILD_ROOT # create the vscan user in the build system /usr/sbin/groupadd -r %{avgroup} 2> /dev/null || : /usr/sbin/useradd -r -o -g %{avgroup} -u 65 -s /bin/false -c "Vscan account" -d %{avspool} %{avuser} 2> /dev/null || : mkdir -p $RPM_BUILD_ROOT/%{avquarantine} mkdir -p $RPM_BUILD_ROOT/%{avspool}/tmp mkdir -p $RPM_BUILD_ROOT/%{avspool}/db mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/usr/sbin mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates mkdir -p $RPM_BUILD_ROOT/etc/openldap/schema install -m 644 $RPM_SOURCE_DIR/sysconfig.amavis $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 755 amavisd $RPM_BUILD_ROOT/usr/sbin/amavisd install -m 755 amavisd-agent $RPM_BUILD_ROOT/usr/sbin/amavisd-agent install -m 755 amavisd-nanny $RPM_BUILD_ROOT/usr/sbin/amavisd-nanny install -m 755 amavisd-release $RPM_BUILD_ROOT/usr/sbin/amavisd-release install -m 644 amavisd.conf $RPM_BUILD_ROOT/etc/amavisd.conf install -m 755 $RPM_SOURCE_DIR/rc.amavis $RPM_BUILD_ROOT/etc/init.d/amavis ln -s ../../etc/init.d/amavis $RPM_BUILD_ROOT/usr/sbin/rcamavis # copy README.SuSE install -m 644 %{S:3} . install -m 644 %{S:4} . mkdir -p $RPM_BUILD_ROOT/%{miltersockdir} install -m 644 LDAP.schema $RPM_BUILD_ROOT/etc/openldap/schema/amavisd-new.schema mkdir -p $RPM_BUILD_ROOT/%{perl_vendorlib} install -m 644 JpegTester.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/JpegTester.pm mkdir -p $RPM_BUILD_ROOT%{qdir} tar xfj %{S:5} -C $RPM_BUILD_ROOT%{qdir} # add qmqpservers to qmail environment mkdir -p $RPM_BUILD_ROOT%{qdir}/control echo "127.10.10.10" > $RPM_BUILD_ROOT%{qdir}/control/qmqpservers mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/tcprules.d echo '127.10.10.10:allow,RELAYCLIENT="",QMAILQUEUE="bin/qmail-queue"' > $RPM_BUILD_ROOT%{_sysconfdir}/tcprules.d/tcp.amavis echo ':deny' >> $RPM_BUILD_ROOT%{_sysconfdir}/tcprules.d/tcp.amavis %pre /usr/sbin/groupadd -r %{avgroup} 2> /dev/null || : /usr/sbin/useradd -r -o -g %{avgroup} -u 65 -s /bin/false -c "Vscan account" -d %{avspool} %{avuser} 2> /dev/null || : /usr/sbin/usermod %{avuser} -g %{avgroup} 2> /dev/null || : %preun %stop_on_removal amavis %post BAKSUFFIX=$(date +%Y-%m-%d) AVCF=/etc/amavisd.conf cp $AVCF $AVCF.NEW FQHN=$(hostname -f) if [ $1 -le 1 ]; then AVDOMAIN=$(echo $FQHN | sed 's/[^\.]*\.//') if [ -n "$AVDOMAIN" ]; then perl -pi -e "s/mydomain =.*;/mydomain = '$AVDOMAIN';/" $AVCF.NEW if ! cmp -s $AVCF $AVCF.NEW ; then echo "setting \$mydomain to $AVDOMAIN in $AVCF" fi fi fi if [ -n "$FQHN" ]; then if ! grep ^\$myhostname $AVCF > /dev/null; then sed -ie "s%^#*[[:space:]]*\$myhostname[[:space:]]\+=.*%\$myhostname = '$FQHN';%" $AVCF.NEW if ! cmp -s $AVCF $AVCF.NEW ; then echo "setting \$myhostname to $FQHN in $AVCF" fi fi fi if [ -f $AVCF.NEW ]; then if cmp -s $AVCF $AVCF.NEW ; then rm -f $AVCF.NEW else cp --remove-destination $AVCF $AVCF.$BAKSUFFIX mv $AVCF.NEW $AVCF fi fi %{fillup_and_insserv -n amavis amavis} %postun %restart_on_update amavis %{insserv_cleanup} %post supervise if [ "$1" == 1 ]; then if [ -f /usr/bin/tcprules -a -f %{_sysconfdir}/tcprules.d/tcp.amavis ] ; then /usr/bin/tcprules %{_sysconfdir}/tcprules.d/tcp.amavis.cdb %{_sysconfdir}/tcprules.d/tcp.amavis.tmp < %{_sysconfdir}/tcprules.d/tcp.amavis fi # Make start mkdir -p /service pushd /service ln -s %{qdir}/supervise/amavis popd fi %postun supervise if [ "$1" = 0 ]; then rm -f /service/amavis* fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %config /etc/init.d/amavis %config(noreplace) /etc/amavisd.conf %dir /etc/openldap %dir /etc/openldap/schema /etc/openldap/schema/amavisd-new.schema /var/adm/fillup-templates/sysconfig.amavis /usr/sbin/* %{perl_vendorlib}/JpegTester.pm %dir %attr(0700, %{avuser}, root) %{avspool} %dir %attr(0700, %{avuser}, root) %{avspool}/tmp %dir %attr(0700, %{avuser}, root) %{avspool}/db %dir %attr(0700, %{avuser}, root) %{avquarantine} %dir %attr(0700, %{avuser}, root) %{miltersockdir} %doc AAAREADME.first INSTALL LDAP.schema LICENSE MANIFEST RELEASE_NOTES TODO %doc amavisd.conf-* JpegTester.pm %doc README_FILES %doc test-messages %doc README.SuSE %doc RELEASE_NOTES.%{version} %files supervise %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/tcprules.d/tcp.amavis %attr(0644,root,qmail) %{qdir}/control/qmqpservers %attr(0644,qmaill,qmail) %{qdir}/supervise/qmail-smtpd/env/QMAILQUEUE %attr(1700,qmaill,qmail) %dir %{qdir}/supervise/amavis %attr(0700,qmaill,qmail) %dir %{qdir}/supervise/amavis/env %attr(0700,qmaill,qmail) %dir %{qdir}/supervise/amavis/log %attr(0700,qmaill,qmail) %dir %{qdir}/supervise/amavis/supervise %attr(0751,qmaill,qmail) %{qdir}/supervise/amavis/run %attr(0751,qmaill,qmail) %{qdir}/supervise/amavis/log/run %description Amavisd-new is a high-performance interface between mailer (MTA) and content checkers: virus scanners or SpamAssassin. It talks to the MTA via (E)SMTP, LMTP. It works with the following MTAs: - postfix - sendmail (sendmail-milter) - exim Authors: -------- Mark Martinec <mark.martinec@ijs.si> %changelog