%bcond_without sasl # without SMTP AUTH support
%bcond_without ssl # without SSL/TLS support
%bcond_without cdb # without cdb map support
+%bcond_without lmdb # lmdb map suppor
%bcond_without epoll # disable epoll for 2.4 kernels
Summary: Postfix Mail Transport Agent
Summary(pt_BR.UTF-8): Postfix - Um MTA (Mail Transport Agent) de alto desempenho
Summary(sk.UTF-8): Agent prenosu pošty Postfix
Name: postfix
-Version: 3.7.4
+Version: 3.8.0
Release: 1
Epoch: 2
License: distributable
Group: Networking/Daemons/SMTP
Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz
-# Source0-md5: 2442d1e53d58e61842d99fb5978fec4a
+# Source0-md5: 73cce85d78a6bf0d5a0c326c23361ed1
Source1: %{name}.aliases
Source2: %{name}.cron
Source3: %{name}.init
%description devel -l pl.UTF-8
Pliki nagłówkowe do tworzenia dodatkowych typów map dla Postfiksa.
+%package dict-cdb
+Summary: CDB map support for Postfix
+Summary(pl.UTF-8): Obsługa map CDB dla Postfiksa
+Group: Networking/Daemons/SMTP
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description dict-cdb
+This package provides support for CDB maps in Postfix.
+
+%description dict-cdb -l pl.UTF-8
+Ten pakiet dodaje obsługę map CDB do Postfiksa.
+
%package dict-ldap
Summary: LDAP map support for Postfix
Summary(pl.UTF-8): Obsługa map LDAP dla Postfiksa
%description dict-ldap -l pl.UTF-8
Ten pakiet dodaje obsługę map LDAP do Postfiksa.
+%package dict-lmdb
+Summary: LMDB map support for Postfix
+Summary(pl.UTF-8): Obsługa map LMDB dla Postfiksa
+Group: Networking/Daemons/SMTP
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description dict-lmdb
+This package provides support for LMDB maps in Postfix.
+
+%description dict-lmdb -l pl.UTF-8
+Ten pakiet dodaje obsługę map LMDB do Postfiksa.
+
%package dict-mysql
Summary: MySQL map support for Postfix
Summary(pl.UTF-8): Obsługa map MySQL dla Postfiksa
%patch5 -p1
%build
-%{__make} -f Makefile.init makefiles
-%{__make} tidy
-CC="%{__cc}"
-export CC
+# export, as the same variables must be passed both to 'make makefiles' and 'make'
+export CCARGS="%{!?with_epoll:-DNO_EPOLL} %{?with_ldap:-DHAS_LDAP} -DHAS_PCRE %{?with_sasl:-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl} %{?with_mysql:-DHAS_MYSQL -I/usr/include/mysql} %{?with_pgsql:-DHAS_PGSQL} %{?with_ssl:-DUSE_TLS} -DMAX_DYNAMIC_MAPS %{?with_cdb:-DHAS_CDB} %{?with_sqlite:-DHAS_SQLITE} %{?with_lmdb:-DHAS_LMDB} -LHAS_SDBM"
+export AUXLIBS="%{rpmldflags} -lsasl -lssl -lcrypto"
+export AUXLIBS_CDB="%{?with_cdb:-lcdb}"
+export AUXLIBS_LDAP="%{?with_ldap:-lldap -llber}"
+export AUXLIBS_LMDB="%{?with_lmdb:-llmdb}"
+export AUXLIBS_MYSQL="%{?with_mysql:-lmysqlclient}"
+export AUXLIBS_PCRE="-lpcre"
+export AUXLIBS_PGSQL="%{?with_pgsql:-lpq}"
+export AUXLIBS_SQLITE="%{?with_sqlite:-lsqlite3}"
+
+export CC="%{__cc}"
+%{__make} makefiles \
+ shared=yes \
+ dynamicmaps=yes \
+ daemon_directory="%{_libdir}/postfix/sbin" \
+ shlib_directory="%{_libdir}/postfix" \
+ manpage_directory="%{_mandir}"
+
%{__make} -j1 \
- dynamicmaps=yes \
- shared=yes \
- shlib_directory=%{_libdir}/postfix \
- DEBUG="" \
- OPT="%{rpmcflags} %{rpmcppflags} -D_FILE_OFFSET_BITS=64" \
- CCARGS="%{!?with_epoll:-DNO_EPOLL} %{?with_ldap:-DHAS_LDAP} -DHAS_PCRE %{?with_sasl:-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl} %{?with_mysql:-DHAS_MYSQL -I/usr/include/mysql} %{?with_pgsql:-DHAS_PGSQL} %{?with_ssl:-DUSE_TLS} %{?with_cdb:-DHAS_CDB} %{?with_sqlite:-DHAS_SQLITE}" \
- %{?with_cdb:AUXLIBS_CDB="-lcdb"} \
- %{?with_ldap:AUXLIBS_LDAP="-lldap -llber"} \
- %{?with_mysql:AUXLIBS_MYSQL="-lmysqlclient"} \
- AUXLIBS_PCRE="-lpcre" \
- %{?with_pgsql:AUXLIBS_PGSQL="-lpq"} \
- %{?with_sqlite:AUXLIBS_SQLITE="-lsqlite3 -lpthread"} \
- AUXLIBS="%{?with_sasl:-lsasl} %{?with_ssl:-lssl -lcrypto}"
+ DEBUG="" \
+ OPT="%{rpmcflags} %{rpmcppflags} -D_FILE_OFFSET_BITS=64"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc/{cron.daily,rc.d/init.d,sysconfig,pam.d,security,monit} \
$RPM_BUILD_ROOT%{_sysconfdir}/{postfix,sasl} \
- $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix,/usr/lib}\
+ $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}/postfix/sbin,/usr/lib}\
$RPM_BUILD_ROOT{%{_includedir}/postfix,%{_mandir}} \
$RPM_BUILD_ROOT%{_var}/spool/postfix/{active,corrupt,deferred,maildrop,private,saved,bounce,defer,incoming,pid,public} \
$RPM_BUILD_ROOT%{_var}/lib/postfix
-%{__rm} -f html/Makefile.in conf/{LICENSE,main.cf.default}
-
-install -p bin/* $RPM_BUILD_ROOT%{_sbindir}
-install -p libexec/* $RPM_BUILD_ROOT%{_libdir}/postfix
-ln $RPM_BUILD_ROOT%{_libdir}/postfix/smtp $RPM_BUILD_ROOT%{_libdir}/postfix/lmtp
-ln $RPM_BUILD_ROOT%{_libdir}/postfix/qmgr $RPM_BUILD_ROOT%{_libdir}/postfix/nqmgr
-cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir}/postfix
-sed -e's,^daemon_directory = .*,daemon_directory = %{_libdir}/postfix,' \
- conf/main.cf > $RPM_BUILD_ROOT%{_sysconfdir}/postfix/main.cf
+%{__make} non-interactive-package \
+ install_root=$RPM_BUILD_ROOT
-sed -e 's,${LIB_PREFIX},%{_libdir}/postfix/postfix-,g;s,${LIB_SUFFIX},.so,g' \
- conf/dynamicmaps.cf > $RPM_BUILD_ROOT%{_sysconfdir}/postfix/dynamicmaps.cf
-
-for f in dns global master util tls; do
- cp -a lib/libpostfix-${f}.so $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so.1
- ln -sf lib${f}.so.1 $RPM_BUILD_ROOT%{_libdir}/libpostfix-${f}.so
-done
-for f in cdb mysql ldap pcre pgsql sqlite; do
- install -p lib/postfix-${f}.so $RPM_BUILD_ROOT%{_libdir}/postfix
-done
cp -a include/*.h $RPM_BUILD_ROOT%{_includedir}/postfix
-cp -a man/man* $RPM_BUILD_ROOT%{_mandir}
-
cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/postfix/aliases
install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/postfix
install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/postfix
cp -a %{SOURCE9} $RPM_BUILD_ROOT/etc/monit/%{name}.monitrc
install -p auxiliary/rmail/rmail $RPM_BUILD_ROOT%{_bindir}/rmail
install -p auxiliary/qshape/qshape.pl $RPM_BUILD_ROOT%{_bindir}/qshape
+install -p man/man1/qshape.1 $RPM_BUILD_ROOT%{_mandir}/man1
ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_bindir}/mailq
ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_bindir}/newaliases
> $RPM_BUILD_ROOT/var/spool/postfix/.nofinger
-%{__rm} -rf $RPM_BUILD_ROOT%{_sysconfdir}/postfix/makedefs.out
-%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/postfix/TLS_LICENSE
-
-%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/postfix/{postfix-script,postfix-tls-script,postfix-wrapper,post-install,postmulti-script}
+%{__rm} -rf $RPM_BUILD_ROOT%{_sysconfdir}/postfix/{makedefs.out,main.cf.{default,proto},master.cf.proto}
+%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/postfix/{,TLS_}LICENSE
%clean
rm -rf $RPM_BUILD_ROOT
%groupremove postfix
fi
+%triggerun -- %{name} < 2:3.8.0-1
+if [ $1 -le 1 ]; then
+ exit 0
+fi
+[ -f "/etc/postfix/main.cf" ] && sed -i -e 's,^daemon_directory = .*,daemon_directory = %{_libdir}/postfix/sbin,' /etc/postfix/main.cf 2>/dev/null || :
+
%triggerun -- %{name} < 2:3.4.6-2
if [ $1 -le 1 ]; then
exit 0
done
[ -n "$(find /etc/mail -type d -empty 2>/dev/null)" ] && rmdir /etc/mail 2>/dev/null || :
+%triggerpostun -- %{name} < 2:3.8.0-1
+echo
+echo "Warning! Option daemon_directory in file /etc/postfix/main.cf was set to"
+echo "path %{_libdir}/postfix/sbin."
+echo
+
%triggerpostun -- %{name} < 2:3.4.6-2
echo
echo "Warning! Configuration has been migrated to /etc/postfix."
%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.smtp
%{?with_sasl:%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sasl/smtpd.conf}
-%attr(755,root,root) %{_libdir}/libpostfix-*.so.*
%attr(755,root,root) %{_bindir}/mailq
%attr(755,root,root) %{_bindir}/newaliases
%attr(755,root,root) %{_bindir}/rmail
-%attr(755,root,root) %{_sbindir}/s*
-%attr(755,root,root) %{_sbindir}/postfix
%attr(755,root,root) %{_sbindir}/postalias
+%attr(755,root,root) %{_sbindir}/postcat
+%attr(755,root,root) %{_sbindir}/postconf
%attr(2755,root,maildrop) %{_sbindir}/postdrop
+%attr(755,root,root) %{_sbindir}/postfix
%attr(755,root,root) %{_sbindir}/postkick
-%attr(755,root,root) %{_sbindir}/postl*
-%attr(755,root,root) %{_sbindir}/postc*
+%attr(755,root,root) %{_sbindir}/postlock
+%attr(755,root,root) %{_sbindir}/postlog
%attr(755,root,root) %{_sbindir}/postmap
%attr(755,root,root) %{_sbindir}/postmulti
%attr(2755,root,maildrop) %{_sbindir}/postqueue
%attr(755,root,root) %{_sbindir}/postsuper
-%attr(755,root,root) %{_sbindir}/posttls-finger
-%attr(755,root,root) %{_sbindir}/qmqp-sink
-%attr(755,root,root) %{_sbindir}/qmqp-source
+%attr(755,root,root) %{_sbindir}/sendmail
%attr(755,root,root) /usr/lib/sendmail
%dir %{_libdir}/postfix
-%attr(755,root,root) %{_libdir}/postfix/[!d]*
-%attr(755,root,root) %exclude %{_libdir}/postfix/postfix-ldap.so
-%attr(755,root,root) %exclude %{_libdir}/postfix/postfix-mysql.so
-%attr(755,root,root) %exclude %{_libdir}/postfix/postfix-pcre.so
-%attr(755,root,root) %exclude %{_libdir}/postfix/postfix-pgsql.so
-%attr(755,root,root) %exclude %{_libdir}/postfix/postfix-sqlite.so
-%attr(755,root,root) %{_libdir}/postfix/discard
-%attr(755,root,root) %{_libdir}/postfix/dnsblog
+%attr(755,root,root) %{_libdir}/postfix/libpostfix-dns.so
+%attr(755,root,root) %{_libdir}/postfix/libpostfix-global.so
+%attr(755,root,root) %{_libdir}/postfix/libpostfix-master.so
+%attr(755,root,root) %{_libdir}/postfix/libpostfix-tls.so
+%attr(755,root,root) %{_libdir}/postfix/libpostfix-util.so
+%dir %{_libdir}/postfix/sbin
+%attr(755,root,root) %{_libdir}/postfix/sbin/anvil
+%attr(755,root,root) %{_libdir}/postfix/sbin/bounce
+%attr(755,root,root) %{_libdir}/postfix/sbin/cleanup
+%attr(755,root,root) %{_libdir}/postfix/sbin/discard
+%attr(755,root,root) %{_libdir}/postfix/sbin/dnsblog
+%attr(755,root,root) %{_libdir}/postfix/sbin/error
+%attr(755,root,root) %{_libdir}/postfix/sbin/flush
+%attr(755,root,root) %{_libdir}/postfix/sbin/lmtp
+%attr(755,root,root) %{_libdir}/postfix/sbin/local
+%attr(755,root,root) %{_libdir}/postfix/sbin/master
+%attr(755,root,root) %{_libdir}/postfix/sbin/nqmgr
+%attr(755,root,root) %{_libdir}/postfix/sbin/oqmgr
+%attr(755,root,root) %{_libdir}/postfix/sbin/pickup
+%attr(755,root,root) %{_libdir}/postfix/sbin/pipe
+%attr(755,root,root) %{_libdir}/postfix/sbin/postfix-script
+%attr(755,root,root) %{_libdir}/postfix/sbin/postfix-tls-script
+%attr(755,root,root) %{_libdir}/postfix/sbin/postfix-wrapper
+%attr(755,root,root) %{_libdir}/postfix/sbin/post-install
+%attr(755,root,root) %{_libdir}/postfix/sbin/postlogd
+%attr(755,root,root) %{_libdir}/postfix/sbin/postmulti-script
+%attr(755,root,root) %{_libdir}/postfix/sbin/postscreen
+%attr(755,root,root) %{_libdir}/postfix/sbin/proxymap
+%attr(755,root,root) %{_libdir}/postfix/sbin/qmgr
+%attr(755,root,root) %{_libdir}/postfix/sbin/qmqpd
+%attr(755,root,root) %{_libdir}/postfix/sbin/scache
+%attr(755,root,root) %{_libdir}/postfix/sbin/showq
+%attr(755,root,root) %{_libdir}/postfix/sbin/smtp
+%attr(755,root,root) %{_libdir}/postfix/sbin/smtpd
+%attr(755,root,root) %{_libdir}/postfix/sbin/spawn
+%attr(755,root,root) %{_libdir}/postfix/sbin/tlsmgr
+%attr(755,root,root) %{_libdir}/postfix/sbin/tlsproxy
+%attr(755,root,root) %{_libdir}/postfix/sbin/trivial-rewrite
+%attr(755,root,root) %{_libdir}/postfix/sbin/verify
+%attr(755,root,root) %{_libdir}/postfix/sbin/virtual
%attr(755,root,root) %dir %{_var}/spool/postfix
%attr(700,postfix,root) %dir %{_var}/spool/postfix/active
%attr(700,postfix,root) %dir %{_var}/spool/postfix/bounce
%{_mandir}/man1/mailq.1*
%{_mandir}/man1/newaliases.1*
%{_mandir}/man1/post*.1*
-%{_mandir}/man1/qmqp-*.1*
%{_mandir}/man1/sendmail.1*
-%{_mandir}/man1/smtp-*.1*
%{_mandir}/man5/access.5*
%{_mandir}/man5/aliases.5*
%{_mandir}/man5/body_checks.5*
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpostfix-*.so
%{_includedir}/postfix
+%if %{with cdb}
+%files dict-cdb
+%attr(755,root,root) %{_libdir}/postfix/postfix-cdb.so
+%endif
+
%if %{with ldap}
%files dict-ldap
%defattr(644,root,root,755)
%{_mandir}/man5/ldap_table.5*
%endif
+%if %{with lmdb}
+%files dict-lmdb
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/postfix/postfix-lmdb.so
+%{_mandir}/man5/lmdb_table.5*
+%endif
+
%if %{with mysql}
%files dict-mysql
%defattr(644,root,root,755)