]> git.pld-linux.org Git - packages/sendmail.git/blobdiff - sendmail.spec
- added conditional (def:off) support for pgsql maps (http://blue-labc.org/clue/sendm...
[packages/sendmail.git] / sendmail.spec
index 1a82e4538e5888b724b4e99f2befc645354742cd..a3be28bb2a0339bd1e2843a3ef05e33130ecdc3d 100644 (file)
@@ -2,6 +2,7 @@
 # Conditional build:
 # _without_ldap                without LDAP support
 # _without_tls         without TLS (SSL) support
+# _with_pgsql          without pgsql support (bluelabs)
 
 Summary:       A widely used Mail Transport Agent (MTA)
 Summary(de):   sendmail-Mail-Übertragungsagent
@@ -12,18 +13,24 @@ Summary(tr):        Elektronik posta hizmetleri sunucusu
 Summary(uk):   ðÏÛÔÏ×ÉÊ ÔÒÁÎÓÐÏÒÔÎÉÊ ÁÇÅÎÔ sendmail
 Name:          sendmail
 Version:       8.12.3
-Release:       2
+Release:       4
 License:       BSD
 Group:         Networking/Daemons
 Source0:       ftp://ftp.sendmail.org/pub/sendmail/%{name}.%{version}.tar.gz
 Source1:       %{name}.init
-Source2:       http://www.informatik.uni-kiel.de/~ca/email/rules/check.tar
-Source3:       aliases
-Source4:       %{name}.sysconfig
+Source2:       %{name}.sysconfig
+Source3:       %{name}.aliases
+# From http://doc.phpauction.org/sendmail/examples/
+Source4:       %{name}-examples.tar.bz2
 Source5:       %{name}-etc-mail-Makefile
 Source6:       %{name}.mc
 Source7:       %{name}-config.m4
 Source8:       %{name}.sasl
+Source9:       %{name}.access
+Source10:      %{name}.mailertable
+Source11:      %{name}.virtusertable
+Source12:      %{name}.domaintable
+Source13:      %{name}-smtp.pamd
 Patch0:                %{name}-makemapman.patch
 Patch1:                %{name}-smrsh-paths.patch
 Patch2:                %{name}-rmail.patch
@@ -31,10 +38,12 @@ Patch3:             %{name}-os-paths.patch
 Patch4:                %{name}-m4path.patch
 Patch5:                %{name}-redirect.patch
 Patch6:                %{name}-hprescan-dos.patch
+Patch7:                http://blue-labs.org/clue/bluelabs.patch-%{version}
 BuildRequires: cyrus-sasl-devel
 BuildRequires: db3-devel
 %{!?_without_ldap:BuildRequires:       openldap-devel}
 %{!?_without_tls:BuildRequires:        openssl-devel}
+%{?_with_pgsql:BuildRequires: postgresql-devel}
 Requires:      m4
 Requires:      procmail
 PreReq:                /sbin/chkconfig
@@ -117,9 +126,9 @@ Sendmail - 
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
-
-# seems to be obsoleted...
-#tar xf %{SOURCE2} -C cf
+%if %{?_with_pgsql:1}%{!?_with_pgsql:0}
+%patch7 -p1
+%endif
 
 sed -e 's|@@PATH@@|\.\.|' < %{SOURCE6} > cf/cf/pld.mc
 
@@ -135,6 +144,12 @@ echo "define(\`confLDOPTS', \`-s')" >> config.m4
 echo "APPENDDEF(\`confMAPDEF', \`-DLDAPMAP')" >> config.m4
 echo "APPENDDEF(\`confLIBS', \`-lldap -llber')" >> config.m4
 %endif
+%if %{?_with_pgsql:1}%{!?_with_pgsql:0}
+echo "APPENDDEF(\`confENVDEF', \`-DSASL')" >> config.m4
+echo "APPENDDEF(\`confMAPDEF', \`-DPGSQLMAP')" >> config.m4
+echo "APPENDDEF(\`confLIBS', \`-lpq -lresolv')" >> config.m4
+echo "APPENDDEF(\`confLIBS', \`-lsasl -lcrypto')" >> config.m4
+%endif
 %if %{?_without_tls:0}%{!?_without_tls:1}
 echo "APPENDDEF(\`confENVDEF', \`-DSTARTTLS')" >> config.m4
 echo "APPENDDEF(\`confLIBS', \`-lssl -lcrypto')" >> config.m4
@@ -156,6 +171,7 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{rc.d/init.d,sysconfig,sasl,smrsh
        $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 \
 
 OBJDIR=obj.$(uname -s).$(uname -r).$(arch)
 
@@ -184,6 +200,10 @@ install cf/cf/pld.cf $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf
 sed -e 's|@@PATH@@|%{_libdir}/sendmail-cf|' < %{SOURCE6} \
        > $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.mc
 
+%if %{?_with_pgsql:1}%{!?_with_pgsql:0}
+install bluelabs.mc $RPM_BUILD_ROOT%{_sysconfdir}/bluelabs.mc
+%endif
+
 # submit.mc (submit.cf is installed automatically)
 install cf/cf/submit.mc $RPM_BUILD_ROOT%{_sysconfdir}
 
@@ -197,17 +217,6 @@ for f in hoststat mailq newaliases purgestat ; do
        ln -sf ../sbin/sendmail $RPM_BUILD_ROOT%{_bindir}/${f}
 done
 
-cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/access
-# Check the %{_prefix}/doc/sendmail-%{version}/README.cf file for a description
-# of the format of this file. (search for access_db in that file)
-# The %{_prefix}/doc/sendmail-%{version}/README.cf is part of the sendmail-doc
-# package.
-#
-# by default we allow relaying from localhost...
-localhost.localdomain          RELAY
-localhost                      RELAY
-127.0.0.1                      RELAY
-EOF
 
 for map in virtusertable access domaintable mailertable ; do
        touch $RPM_BUILD_ROOT%{_sysconfdir}/${map}
@@ -219,15 +228,22 @@ install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/aliases
 $RPM_BUILD_ROOT%{_bindir}/makemap -C $RPM_BUILD_ROOT%{_sysconfdir}/sendmail.cf hash \
        $RPM_BUILD_ROOT%{_sysconfdir}/aliases.db < %{SOURCE3}
 
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sendmail
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sendmail
 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/Makefile
 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sasl/Sendmail.conf
+install %{SOURCE13} $RPM_BUILD_ROOT/etc/pam.d/smtp
+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
 
 mv -f smrsh/README README.smrsh
 mv -f cf/README README.cf
 mv -f doc/op/op.me .
 
+bzip2 -dc %{SOURCE4} | tar xf -
+
 gzip -9nf FAQ KNOWNBUGS README* op.me RELEASE_NOTES
 
 %clean
@@ -318,7 +334,7 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc *.gz
+%doc *.gz examples/
 %attr(755,root,root) %{_sbindir}/mailstats
 %attr(755,root,root) %{_sbindir}/praliases
 %attr(755,root,root) %{_bindir}/hoststat
@@ -350,9 +366,11 @@ fi
 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/submit.mc
 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/local-host-names
 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/aliases
-%attr(0644,root,mail) %ghost %{_sysconfdir}/aliases.db
-%attr(0770,root,smmsp) %dir /var/spool/clientmqueue
-%attr(0750,root,mail) %dir /var/spool/mqueue
+%{?_with_pgsql:%attr(644,root,root) /etc/mail/bluelabs.mc}
+%attr(644,root,mail) %ghost %{_sysconfdir}/aliases.db
+%attr(770,root,smmsp) %dir /var/spool/clientmqueue
+%attr(750,root,mail) %dir /var/spool/mqueue
+%attr(755,root,root) %dir /etc/pam.d
 
 %config %{_sysconfdir}/Makefile
 %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/access
@@ -368,6 +386,7 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/sendmail
 %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
This page took 0.066578 seconds and 4 git commands to generate.