]> git.pld-linux.org Git - packages/sendmail.git/blobdiff - sendmail.spec
- update todo
[packages/sendmail.git] / sendmail.spec
index 481826dfd1d61cc9e13fe1d6bb4a1deb4c19bf56..2a6b7dee165711d1040ae18ced6304e688ba6c7d 100644 (file)
@@ -1,13 +1,14 @@
-#
 # TODO:
 # - make sid-milter support:
 #   http://sourceforge.net/projects/sid-milter/
 #   http://www.sendmail.net/
+# - http://blue-labs.org/clue/bluelabs.patch-8.12.3 has been updated upstream
+# - move compilation from install to build section, fix re-entrancy of install
+# - add tests bcond and/or disable tests tha fail on (AC-)builders
 #
 # Conditional build:
 %bcond_without ldap    # without LDAP support
 %bcond_without tls     # without TLS (SSL) support
-%bcond_with    db3     # use db3 instead of db package
 %bcond_with    pgsql   # with PostgreSQL support (bluelabs)
 #
 Summary:       A widely used Mail Transport Agent (MTA)
@@ -21,12 +22,12 @@ Summary(ru):        
 Summary(tr):   Elektronik posta hizmetleri sunucusu
 Summary(uk):   ðÏÛÔÏ×ÉÊ ÔÒÁÎÓÐÏÒÔÎÉÊ ÁÇÅÎÔ sendmail
 Name:          sendmail
-Version:       8.13.3
-Release:       5
+Version:       8.13.8
+Release:       2
 License:       BSD
 Group:         Networking/Daemons
 Source0:       ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
-# Source0-md5: 2809fbf9c8b067947b650d0128928d05
+# Source0-md5: 5f29c94b42e0bb74d546b2ae84203a1e
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
 Source3:       %{name}.aliases
@@ -51,18 +52,18 @@ Patch4:             %{name}-m4path.patch
 Patch5:                %{name}-redirect.patch
 Patch6:                %{name}-hprescan-dos.patch
 Patch7:                http://blue-labs.org/clue/bluelabs.patch-8.12.3
-%{!?with_db3:BuildRequires:    db-devel >= 4.1.25}
-%{!?with_db3:Requires: db >= 4.1.25}
+URL:           http://www.sendmail.org/
 BuildRequires: cyrus-sasl-devel
-%{?with_db3:BuildRequires:     db3-devel}
+BuildRequires: db-devel >= 4.1.25
 BuildRequires: man
 %{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 %{?with_tls:BuildRequires:     openssl-devel >= 0.9.7d}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.310
+BuildRequires: sed >= 4.0
 Requires(post):        awk
 Requires(post):        textutils
-Requires(post,preun):/sbin/chkconfig
+Requires(post,preun):  /sbin/chkconfig
 Requires(post,preun):  rc-scripts >= 0.4.0.20
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
@@ -70,6 +71,7 @@ Requires(pre):        /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
+Requires:      db >= 4.1.25
 Requires:      m4
 Requires:      pam >= 0.79.0
 Requires:      procmail
@@ -92,6 +94,7 @@ Obsoletes:    zmailer
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/mail
+%define                specflags       -fPIC
 
 %description
 The Sendmail program is a very widely used Mail Transport Agent (MTA).
@@ -119,7 +122,7 @@ recibir mensajes a trav
 Sendmail est un agent de transport de courrier, qui est le programme
 transférent le courrier d'une machine à l'autre. Sendmail implémente
 une facilité générale de routage de courrier entre les réseaux, permet
-l'\"aliasing\" et le \"forwarding\", un routage automatique sur les
+l'"aliasing" et le "forwarding", un routage automatique sur les
 passerelles du réseau, et une configuration flexible.
 
 %description -l ko
@@ -189,15 +192,15 @@ sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/pld.mc
 install %{SOURCE7} config.m4
 
 # Ac-specific hack - ac-i386 builder has not fully operational shm
-%ifarch i386 amd64
-%{__perl} -pi -e 's/^(smtest.*t-shm)/dnl $1/' libsm/Makefile.m4
+%ifarch i386 i586 i686 amd64
+%{__sed} -i -e 's/^\(smtest.*t-shm\)/dnl \1/' libsm/Makefile.m4
 %endif
 
 %build
 echo "define(\`confCC', \`%{__cc}')" >> config.m4
 echo "define(\`confOPTIMIZE', \`%{rpmcflags} -DUSE_VENDOR_CF_PATH=1 -DNETINET6')" >> config.m4
 echo "APPENDDEF(\`confINCDIRS', \`-I/usr/include/sasl')" >> config.m4
-echo "define(\`confLIBSEARCHPATH', \`/%{_lib} /usr/%{_lib}')" >> config.m4
+echo "define(\`confLIBSEARCHPATH', \`/%{_lib} %{_prefix}/%{_lib}')" >> config.m4
 echo "define(\`confLIBSEARCH', \`db resolv')" >> config.m4
 %if 0%{!?debug:1}
 echo "define(\`confLDOPTS', \`-s')" >> config.m4
@@ -270,7 +273,7 @@ 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%{_datadir}/sendmail-cf
+cp -a * $RPM_BUILD_ROOT%{_datadir}/sendmail-cf
 cd -
 
 # sendmail.{cf,mc}
@@ -289,14 +292,14 @@ 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%{_prefix}/lib/sendmail
+ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_prefix}/lib/sendmail
 
 # dangling symlinks
-for f in hoststat mailq newaliases purgestat ; do
-       ln -sf /usr/sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
+for f in hoststat mailq newaliases purgestat; do
+       ln -sf %{_sbindir}/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
 done
 
-for map in virtusertable access domaintable mailertable ; do
+for map in virtusertable access domaintable mailertable; do
        touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
        $RPM_BUILD_ROOT%{_sbindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
                $RPM_BUILD_ROOT%{_sysconfdir}/${map}.db < $RPM_BUILD_ROOT%{_sysconfdir}/${map}
@@ -321,9 +324,12 @@ mv -f smrsh/README README.smrsh
 mv -f cf/README README.cf
 mv -f doc/op/op.me .
 
-
 bzip2 -dc %{SOURCE4} | tar xf -
 
+# for perl-Sendmail-Milter
+install $OBJDIR/libsm/libsm.a $OBJDIR/libsmutil/libsmutil.a \
+       $RPM_BUILD_ROOT%{_libdir}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -373,17 +379,11 @@ fi
 } > /dev/null 2>&1
 
 /sbin/chkconfig --add sendmail
-if [ -f /var/lock/subsys/sendmail ]; then
-       /etc/rc.d/init.d/sendmail restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/sendmail start\" to start sendmail daemon." >&2
-fi
+%service sendmail restart "sendmail daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/sendmail ]; then
-               /etc/rc.d/init.d/sendmail stop >&2
-       fi
+       %service sendmail stop
        /sbin/chkconfig --del sendmail
 fi
 
@@ -469,4 +469,6 @@ fi
 %files devel
 %defattr(644,root,root,755)
 %{_libdir}/libmilter.a
+%{_libdir}/libsm.a
+%{_libdir}/libsmutil.a
 %{_includedir}/libmilter
This page took 0.035038 seconds and 4 git commands to generate.