X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=sendmail.spec;h=57b336fe60b1089d13770ad714f516ac5bdeb882;hb=c7a045e3c3d2202cb6e2c5ccc7118c26d1829a64;hp=59430988e998f09d82a1bf9c13792fb994117f5d;hpb=19aabebb606399705637d5193c22df6b4b6e9ad2;p=packages%2Fsendmail.git diff --git a/sendmail.spec b/sendmail.spec index 5943098..57b336f 100644 --- a/sendmail.spec +++ b/sendmail.spec @@ -1,3 +1,8 @@ +# +# TODO: +# - make sid-milter support: +# http://sourceforge.net/projects/sid-milter/ +# http://www.sendmail.net/ # # Conditional build: %bcond_without ldap # without LDAP support @@ -16,12 +21,12 @@ Summary(ru): Summary(tr): Elektronik posta hizmetleri sunucusu Summary(uk): ðÏÛÔÏ×ÉÊ ÔÒÁÎÓÐÏÒÔÎÉÊ ÁÇÅÎÔ sendmail Name: sendmail -Version: 8.12.11 -Release: 4 +Version: 8.13.3 +Release: 2 License: BSD Group: Networking/Daemons Source0: ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz -# Source0-md5: fafda7f8043f0c34b9aa295618aa598c +# Source0-md5: 2809fbf9c8b067947b650d0128928d05 Source1: %{name}.init Source2: %{name}.sysconfig Source3: %{name}.aliases @@ -37,6 +42,7 @@ Source10: %{name}.mailertable Source11: %{name}.virtusertable Source12: %{name}.domaintable Source13: %{name}-smtp.pamd +Source14: %{name}.monitrc Patch0: %{name}-makemapman.patch Patch1: %{name}-smrsh-paths.patch Patch2: %{name}-rmail.patch @@ -52,6 +58,7 @@ BuildRequires: man %{?with_ldap:BuildRequires: openldap-devel} %{?with_tls:BuildRequires: openssl-devel >= 0.9.7d} %{?with_pgsql:BuildRequires: postgresql-devel} +BuildRequires: rpmbuild(macros) >= 1.202 Requires(pre): /bin/id Requires(pre): /usr/bin/getgid Requires(pre): /usr/sbin/groupadd @@ -64,9 +71,10 @@ Requires(postun): /usr/sbin/userdel %{!?with_db3:Requires: db >= 4.1.25} Requires: m4 Requires: procmail -Requires: pam >= 0.77.3 +Requires: pam >= 0.79.0 +Provides: group(smmsp) Provides: smtpdaemon -BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +Provides: user(smmsp) Obsoletes: courier Obsoletes: exim Obsoletes: masqmail @@ -80,6 +88,7 @@ Obsoletes: smail Obsoletes: smtpdaemon Obsoletes: ssmtp Obsoletes: zmailer +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/mail @@ -223,12 +232,12 @@ m4 pld.mc > pld.cf %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh}} \ - $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sbindir} $RPM_BUILD_ROOT%{_libdir} \ - $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \ - $RPM_BUILD_ROOT/var/log $RPM_BUILD_ROOT/var/spool/mqueue \ - $RPM_BUILD_ROOT%{_libdir}/sendmail-cf \ - $RPM_BUILD_ROOT/etc/pam.d $RPM_BUILD_ROOT%{_includedir}\ +install -d $RPM_BUILD_ROOT%{_mandir}/man{1,5,8} \ + $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,monit,sysconfig,sasl,smrsh} \ + $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_prefix}/lib} \ + $RPM_BUILD_ROOT{%{_datadir}/sendmail-cf,%{_libdir}} \ + $RPM_BUILD_ROOT/var/{log,spool/mqueue} \ + $RPM_BUILD_ROOT{%{_sysconfdir},%{_includedir}} OBJDIR=obj.$(uname -s).$(uname -r).$(arch) @@ -252,19 +261,20 @@ SMINSTOPT="DESTDIR=$RPM_BUILD_ROOT SBINOWN=$IDNU SBINGRP=$IDNG \ %{__make} -C $OBJDIR/smrsh install \ $SMINSTOPT %{__make} -C $OBJDIR/libmilter install \ - $SMINSTOPT + $SMINSTOPT \ + LIBDIR=%{_libdir} ln -sf %{_sbindir}/makemap $RPM_BUILD_ROOT%{_bindir}/makemap # install the cf files cd cf rm -f cf/{Build,Makefile} feature/*~ -cp -ar * $RPM_BUILD_ROOT%{_libdir}/sendmail-cf +cp -ar * $RPM_BUILD_ROOT%{_datadir}/sendmail-cf cd - # sendmail.{cf,mc} install cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf -sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \ +sed -e 's|@@PATH@@|%{_datadir}/sendmail-cf|' < %{SOURCE6} \ > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc %if %{with pgsql} @@ -276,8 +286,9 @@ install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir} echo "# local-host-names - include all aliases for your machine here." \ > $RPM_BUILD_ROOT%{_sysconfdir}/local-host-names +#"vim ruuls -ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_libdir}/sendmail +ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_prefix}/lib/sendmail # dangling symlinks for f in hoststat mailq newaliases purgestat ; do @@ -303,6 +314,7 @@ install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/access install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/mailertable install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/virtusertable install %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/domaintable +install %{SOURCE14} $RPM_BUILD_ROOT/etc/monit/ mv -f smrsh/README README.smrsh mv -f cf/README README.cf @@ -315,22 +327,8 @@ bzip2 -dc %{SOURCE4} | tar xf - rm -rf $RPM_BUILD_ROOT %pre -if [ -n "`/usr/bin/getgid smmsp`" ]; then - if [ "`/usr/bin/getgid smmsp`" != "25" ]; then - echo "Error: group smmsp doesn't have gid=25. Correct this before installing sendmail." 1>&2 - exit 1 - fi -else - /usr/sbin/groupadd -g 25 -r -f smmsp -fi -if [ -n "`/bin/id -u smmsp 2>/dev/null`" ]; then - if [ "`/bin/id -u smmsp`" != "25" ]; then - echo "Error: user smmsp doesn't have uid=25. Correct this before installing sendmail." 1>&2 - exit 1 - fi -else - /usr/sbin/useradd -u 25 -r -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp 1>&2 -fi +%groupadd -g 25 smmsp +%useradd -u 25 -d /var/spool/clientqueue -s /bin/false -c "Sendmail Message Submission Program" -g smmsp smmsp %post umask 022 @@ -390,8 +388,8 @@ fi %postun if [ "$1" = "0" ]; then - /usr/sbin/userdel smmsp 2>/dev/null - /usr/sbin/groupdel smmsp 2>/dev/null + %userremove smmsp + %groupremove smmsp fi # removal of compatibility links @@ -412,7 +410,7 @@ fi %attr(755,root,root) %{_bindir}/newaliases %attr(755,root,root) %{_bindir}/mailq %attr(755,root,root) %{_sbindir}/smrsh -%{_libdir}/sendmail +%{_prefix}/lib/sendmail %{_mandir}/man1/mailq.1* %{_mandir}/man1/newaliases.1* @@ -453,18 +451,19 @@ fi %config(noreplace) %verify(not md5 size mtime) /etc/sysconfig/sendmail %config(noreplace) %verify(not md5 size mtime) /etc/sasl/Sendmail.conf %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/smtp - -%dir %{_libdir}/sendmail-cf -%dir %{_libdir}/sendmail-cf/cf -%{_libdir}/sendmail-cf/cf/pld.mc -%{_libdir}/sendmail-cf/feature -%{_libdir}/sendmail-cf/m4 -%{_libdir}/sendmail-cf/mailer -%dir %{_libdir}/sendmail-cf/ostype -%{_libdir}/sendmail-cf/ostype/linux.m4 -%dir %{_libdir}/sendmail-cf/sh -%{_libdir}/sendmail-cf/sh/makeinfo.sh -%{_libdir}/sendmail-cf/siteconfig +%attr(750,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/monit/*.monitrc + +%dir %{_datadir}/sendmail-cf +%dir %{_datadir}/sendmail-cf/cf +%{_datadir}/sendmail-cf/cf/pld.mc +%{_datadir}/sendmail-cf/feature +%{_datadir}/sendmail-cf/m4 +%{_datadir}/sendmail-cf/mailer +%dir %{_datadir}/sendmail-cf/ostype +%{_datadir}/sendmail-cf/ostype/linux.m4 +%dir %{_datadir}/sendmail-cf/sh +%{_datadir}/sendmail-cf/sh/makeinfo.sh +%{_datadir}/sendmail-cf/siteconfig %files devel %defattr(644,root,root,755)