summaryrefslogtreecommitdiff
path: root/debian/build
diff options
context:
space:
mode:
Diffstat (limited to 'debian/build')
-rw-r--r--debian/build/Build23
-rw-r--r--debian/build/autoconf.mk.in98
-rw-r--r--debian/build/autoconf.pl.in39
-rw-r--r--debian/build/autoconf.sh.in31
-rw-r--r--debian/build/changelog.sh.in59
-rw-r--r--debian/build/control.m4.in142
-rw-r--r--debian/build/install-sh251
-rw-r--r--debian/build/rules.in1189
-rw-r--r--debian/build/site.config.m4.in235
-rw-r--r--debian/build/update_chaos.in202
-rw-r--r--debian/build/version.c1
11 files changed, 2270 insertions, 0 deletions
diff --git a/debian/build/Build b/debian/build/Build
new file mode 100644
index 0000000..bf94717
--- /dev/null
+++ b/debian/build/Build
@@ -0,0 +1,23 @@
+#!/bin/sh
+#-----------------------------------------------------------------------------
+# $Sendmail: build/Build,v 8.12.0 2001/03/21 11:41:31 cowboy Exp $
+#
+# Copyright (c) 2001-2001 Richard Nelson. All Rights Reserved.
+#
+# Debian script to rationalize builds for Sendmail prior to 8.9.0
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+# If ./Makefiles is a directory, we need to use makesendmail
+if [ -d Makefiles ]; then
+ sh makesendmail;
+
+# If ./Makefile.dist exists, use it
+elif [ -f Makefile.dist ]; then
+ (cd obj* && make;);
+
+# Otherwise, well, there's not much we can do
+else
+ :;
+ fi;
diff --git a/debian/build/autoconf.mk.in b/debian/build/autoconf.mk.in
new file mode 100644
index 0000000..c531e82
--- /dev/null
+++ b/debian/build/autoconf.mk.in
@@ -0,0 +1,98 @@
+#!/usr/bin/make -f
+#------------------------------------------------------------------------------
+# vim: syntax=make
+#
+# $Sendmail: autoconf.mk,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Rules file for Sendmail @sm_version@@sm_revision@(@sm_version_math@)
+# on @sm_dist_name@ @sm_dist_vers@
+# via Debhelper V@DEBIAN_DH@
+#
+# Note: the .in file supports Sendmail @SM_MINVERS@ - @SM_MAXVERS@
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# Richard Nelson <cowboy@debian.org> @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#SHELL := /bin/sh -x
+
+# Variables for, and by, Autoconf (Don't touch these! edit config step)
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = ${DESTDIR}@bindir@
+sbindir = ${DESTDIR}@sbindir@
+libexecdir = ${DESTDIR}@libexecdir@
+datadir = ${DESTDIR}@datadir@
+sysconfdir = ${DESTDIR}@sysconfdir@
+sharedstatedir = ${DESTDIR}@sharedstatedir@
+localstatedir = ${DESTDIR}@localstatedir@
+libdir = ${DESTDIR}@libdir@
+includedir = ${DESTDIR}@includedir@
+infodir = ${DESTDIR}@infodir@
+mandir = ${DESTDIR}@mandir@
+srcdir = @srcdir@
+abs_srcdir = @abs_srcdir@
+top_srcdir = @top_srcdir@
+abs_top_srcdir = @abs_top_srcdir@
+builddir = @builddir@
+abs_builddir = @abs_builddir@
+top_builddir = @top_builddir@
+abs_top_builddir = @abs_top_builddir@
+VPATH = @srcdir@
+
+docdir = ${DESTDIR}@docdir@
+buildtree = @buildtree@
+
+# I like to preserve timestamps...
+INSTALL := @INSTALL@ -p
+INSTALL_PROGRAM := @INSTALL_PROGRAM@
+# We'll let the dh_strip program take care of this for us...
+#ifeq (,$(findstring nostrip,${DEB_BUILD_OPTIONS}))
+# override INSTALL_PROGRAM += -s
+# endif
+INSTALL_DATA := @INSTALL_DATA@
+# Scripts need to be executable also
+INSTALL_SCRIPT := @INSTALL_SCRIPT@ -m 0755
+
+# AutoConfig generated
+AC_CC := @CC@
+AC_CFLAGS := @CFLAGS@
+AC_DEFS := @CPPFLAGS@ @DEFS@
+AC_LDFLAGS := @LDFLAGS@
+AC_LIBS := @LIBS@
+
+# Define standard compile/install flags (skip if not yet configured)
+DUMMY_CC := $(shell echo '-CC-' | tr '-' '@')
+ifeq ("cc", "${AC_CC}")
+ ifeq ("y", "$(shell test -x /usr/bin/gcc-3.2 && echo 'y' || echo 'n')")
+ AC_CC := gcc-3.2
+ else
+ ifeq ("y", "$(shell test -x /usr/bin/gcc-3.1 && echo 'y' || echo 'n')")
+ AC_CC := gcc-3.1
+ endif
+ endif
+ endif
+ifneq ("${DUMMY_CC}", "${AC_CC}")
+ CC := ${AC_CC}
+ #DEFS := ${AC_DEFS} ${DEFINES}
+ DEFS := ${DEFINES}
+ LDFLAGS := ${AC_LDFLAGS}
+ LIBS := ${AC_LIBS}
+ endif
+ifeq (,${CFLAGS})
+ CFLAGS := -O2 -g -Wall ${DEFS}
+ endif
+# No longer needed, left as an example:
+# Force no optimization for arm - buggy compiler...
+ifeq ("arm", "${DEB_HOST_ARCH}")
+ override CFLAGS := -O0 -Wall
+ endif
+ifneq (,$(findstring noopt,${DEB_BUILD_OPTIONS}))
+ override CFLAGS += -O0
+ endif
diff --git a/debian/build/autoconf.pl.in b/debian/build/autoconf.pl.in
new file mode 100644
index 0000000..96ad3af
--- /dev/null
+++ b/debian/build/autoconf.pl.in
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------
+# Autoconf variables - in a form suitable for sh, perl
+# @configure_input@
+#------------------------------------------------------------------------------
+# Variables for, and by, Autoconf (Don't touch these! edit config step)
+my ($PACKAGE_NAME, $PACKAGE_VERSION, $prefix, $exec_prefix, $bindir,
+ $sbindir, $libexecdir, $datadir, $sysconfdir, $sharedstatedir,
+ $localstatedir, $libdir, $includedir, $infodir, $mandir, $docdir,
+ $srcdir, $abs_srcdir, $top_srcdir, $abs_top_srcdir,
+ $builddir, $abs_builddir, $top_builddir, $abs_top_builddir,
+ $VPATH);
+BEGIN {
+ $PACKAGE_NAME = "@PACKAGE_NAME@";
+ $PACKAGE_VERSION = "@PACKAGE_VERSION@";
+ $prefix = "@prefix@";
+ $exec_prefix = "@exec_prefix@";
+ $bindir = "@bindir@";
+ $sbindir = "@sbindir@";
+ $libexecdir = "@libexecdir@";
+ $datadir = "@datadir@";
+ $sysconfdir = "@sysconfdir@";
+ $sharedstatedir = "@sharedstatedir@";
+ $localstatedir = "@localstatedir@";
+ $libdir = "@libdir@";
+ $includedir = "@includedir@";
+ $infodir = "@infodir@";
+ $mandir = "@mandir@";
+ $docdir = "@docdir@";
+ $srcdir = "@srcdir@";
+ $abs_srcdir = "@abs_srcdir@";
+ $top_srcdir = "@top_srcdir@";
+ $abs_top_srcdir = "@abs_top_srcdir@";
+ $builddir = "@builddir@";
+ $abs_builddir = "@abs_builddir@";
+ $top_builddir = "@top_builddir@";
+ $abs_top_builddir = "@abs_top_builddir@";
+ $VPATH = "@srcdir@";
+ };
+
diff --git a/debian/build/autoconf.sh.in b/debian/build/autoconf.sh.in
new file mode 100644
index 0000000..cac3d18
--- /dev/null
+++ b/debian/build/autoconf.sh.in
@@ -0,0 +1,31 @@
+#------------------------------------------------------------------------------
+# Autoconf variables - in a form suitable for sh, perl
+# @configure_input@
+#------------------------------------------------------------------------------
+# Variables for, and by, Autoconf (Don't touch these! edit config step)
+PACKAGE_NAME="@PACKAGE_NAME@";
+PACKAGE_VERSION="@PACKAGE_VERSION@";
+prefix="@prefix@";
+exec_prefix="@exec_prefix@";
+bindir="@bindir@";
+sbindir="@sbindir@";
+libexecdir="@libexecdir@";
+datadir="@datadir@";
+sysconfdir="@sysconfdir@";
+sharedstatedir="@sharedstatedir@";
+localstatedir="@localstatedir@";
+libdir="@libdir@";
+includedir="@includedir@";
+infodir="@infodir@";
+mandir="@mandir@";
+docdir="@docdir@";
+srcdir="@srcdir@";
+abs_srcdir="@abs_srcdir@"
+top_srcdir="@top_srcdir@"
+abs_top_srcdir="@abs_top_srcdir@"
+builddir="@builddir@"
+abs_builddir="@abs_builddir@"
+top_builddir="@top_builddir@"
+abs_top_builddir="@abs_top_builddir@"
+VPATH="@srcdir@"
+
diff --git a/debian/build/changelog.sh.in b/debian/build/changelog.sh.in
new file mode 100644
index 0000000..b05cc16
--- /dev/null
+++ b/debian/build/changelog.sh.in
@@ -0,0 +1,59 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+# $Sendmail: changelog.sh,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Debian script to generate changelogs for sendmail @sm_version@@sm_revision@
+#
+# Note: this file supports @SM_MINVERS@ - @SM_MAXVERS@
+#
+#-----------------------------------------------------------------------------
+set -e;
+#
+# Initialization
+PACKAGE='sendmail';
+
+# Create a combined changelog *IFF* we have the pieces/parts...
+if [ -d private/changelogs ]; then
+ echo "Building @PACKAGE_NAME@ @sm_version@@sm_revision@(@sm_version_math@) changelog.";
+ #
+ # Remove old combined changelog
+ rm -f changelog;
+ #
+ # Beta changelogs
+ if [ -f private/changelogs/@sm_version@ ]; then
+ cat private/changelogs/@sm_version@ \
+ >> changelog;
+ #
+ # 8.12 changelogs
+ elif [ @sm_version_math@ -ge 527360 ]; then
+ cat private/changelogs/8.12 >> changelog;
+ #
+ # 8.11 changelogs
+ elif [ @sm_version_math@ -ge 527104 ]; then
+ cat private/changelogs/8.11 >> changelog;
+ #
+ # 8.10 changelogs
+ elif [ @sm_version_math@ -ge 526848 ]; then
+ cat private/changelogs/8.10 >> changelog;
+ #
+ # 8.9 changelogs
+ elif [ @sm_version_math@ -ge 526592 ]; then
+ cat private/changelogs/8.9 >> changelog;
+ #
+ # 8.8 changelogs
+ elif [ @sm_version_math@ -ge 526336 ]; then
+ cat private/changelogs/8.8 >> changelog;
+ #
+ # 8.7 changelogs
+ elif [ @sm_version_math@ -ge 526080 ]; then
+ cat private/changelogs/8.7 >> changelog;
+ fi;
+ #
+ # Variable definitions
+ cat private/changelogs/vars >> changelog;
+ fi;
+
diff --git a/debian/build/control.m4.in b/debian/build/control.m4.in
new file mode 100644
index 0000000..054494a
--- /dev/null
+++ b/debian/build/control.m4.in
@@ -0,0 +1,142 @@
+dnl #--------------------------------------------------------------------------
+dnl # $Sendmail: control.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+dnl #
+dnl # Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+dnl #
+dnl # @configure_input@
+dnl #
+dnl # Debian control.m4 for sendmail @sm_version@@sm_revision@(@sm_version_math@)
+dnl #
+dnl # Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+dnl # file is customized to the version noted above.
+dnl #
+dnl # Note: Exercise care in the feeding of this file, especially wrt quoting!
+dnl #
+dnl #--------------------------------------------------------------------------
+changequote([[, ]])dnl
+dnl #
+dnl # The source description
+dnl # Always built
+dnl #
+[[Source: sendmail
+Priority: extra
+Section: mail
+Maintainer: Richard A Nelson (Rick) <cowboy@debian.org>
+Standards-Version: 3.5.7.0
+Build-Depends-Indep: groff, bsdmainutils
+Build-Depends: m4, patch, debhelper (>= 1.1.17), @sm_badepends@]]
+dnl #
+dnl # The first arch=any package description
+dnl # Always built
+dnl #
+[[
+Package: sendmail
+Architecture: any
+Section: mail
+Replaces: mail-transport-agent, sendmail-tls
+Provides: mail-transport-agent
+Conflicts: mail-transport-agent
+Depends: adduser, m4, ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, @sm_depends@
+Recommends: @sm_recommends@
+Suggests: sendmail-doc (>= ${Source-Version}), mail-reader, procmail | mailagent | maildrop | deliver, make, logcheck, @sm_suggests@
+Description: A powerful, efficient, and scalable Mail Transport Agent
+ Sendmail is an alternative Mail Transport Agent (MTA) for Debian.
+ It is suitable for handling sophisticated mail configurations,
+ although this means that its configuration can also be complex.
+ Fortunately, easy thing can be done easily, and complex things
+ are possible, even if not easily understood ;) Sendmail is the *ONLY*
+ MTA with a Turing complete language to control *ALL* aspects of delivery!
+ .
+ Sendmail provides Security and SPAM/UCE/UBE protection via several means:]]dnl
+ifelse([[@sm_enable_tls@]], [[yes]], [[
+ - STARTTLS(SSL) RFC2487 encryption for mail reception/delivery.
+ - STARTTLS(SSL) authentication (certificate based) for access/relay control.]])dnl
+ifelse([[@sm_enable_auth@]], [[yes]], [[
+ - SMTP AUTH (SASL/PAM) authentication for access/relay control.]])[[
+ - ACCESS database (by IP/host) for access/relay control.
+ - Use of varied Realtime Blackhole Lists (RBL) to prevent access.
+ - Integration of LOGCHECK rules to fine-tune logging.
+ - Inboard POSIX Regular Expression processing of *all* headers.]]dnl
+ifelse([[@sm_enable_milter@]], [[yes]], [[
+ - Ability (via MILTER) to scan/change headers *and* body of *ALL* mail
+ A site may utilize zero, one, or more MILTERs.]])[[
+ - Reduced SUID exposures by running SGID smmsp/mail where possible.
+ .
+ Sendmail provides Performance and Scalability by:
+ - Allowing multiple queues, with the ability to tune both interval and
+ queue runners on a queue by queue basis.
+ - Providing (a Debian exclusive) an easy to configure means of queue-aging
+ to improve throughput by not continually retrying failed deliveries.]]dnl
+ifelse([[@sm_enable_ldap@]], [[yes]], [[
+ - Allowing most all maps/databases to be obtained via LDAP; reducing the
+ number of used databases and simplifying the maintenance of Sendmail.]])[[
+ - Reducing the file I/O where possible by buffering files in memory.
+ .
+ Sendmail provides site enhanced site configuration/customization by:
+ - Allowing the listener (usually port 25) to run as a daemon or via INETD.
+ - Allowing the queue runner (mail delivery) to run as a daemon or via CRON.
+ - Automagically updating configuration and databases on upgrades.
+ - Providing a Turing complete language for site customization of mail
+ handling.]]dnl
+ifelse([[@sm_enable_milter@]], [[yes]],[[
+ - Providing a means (MILTER) for a site to scan/change all email - both
+ incoming and outgoing. A site can write their own MILTER, or may use
+ any of those found on internet. To write your own MILTER, you'll need
+ to install the optional milter-dev package.]])[[
+ - Providing extensive documentation via the sendmail-doc (optional) package.
+ - Providing an inboard Mail Delivery Agent (MDA) (mail.local), but supporting
+ procmail, mailagent, maildrop, or deliver automatically if installed.
+ Sendmail will also deliver to anythings else (cyrus, etc) if asked to.
+ .
+ Sendmail includes *no* Mail User Agents (MUA), you'll have to
+ pick from the plethora of available MUAs (pine, mutt, vm, etc.)
+ .
+ This package supports @sm_databases@ maps,
+ and has enabled @sm_features@.]]dnl
+dnl #
+dnl # The second arch=any package (libmilter-dev)
+dnl # Only built if MILTER is enabled
+dnl #
+ifelse([[@sm_enable_dev@]], [[yes]], dnl
+ifelse([[@sm_enable_milter@]], [[yes]], [[
+
+Package: libmilter-dev
+Architecture: any
+Section: devel
+Suggests: sendmail-doc (>= ${Source-Version})
+Description: Sendmail Mail Filter API (Milter)
+ The Sendmail Mail Filter API (Milter) is designed to allow third-party
+ programs access to mail messages as they are being processed in order
+ to filter meta-information(headers) and content.
+ .
+ The Debian Sendmail package is built to support libmilter.
+ .
+ This is the libmilter static library and include files for development.
+ .
+ The documentation on building a Milter is in the sendmail-doc package.]]))dnl
+dnl #
+dnl # The first (and only) arch=all (sendmail-doc)
+dnl #
+ifelse([[@sm_enable_doc@]], [[yes]], [[
+
+Package: sendmail-doc
+Architecture: all
+Section: doc
+Description: A powerful, efficient, and scalable Mail Transport Agent
+ Sendmail is an alternative Mail Transport Agent (MTA) for
+ Debian. It is suitable for handling sophisticated mail
+ configurations, although this means that its configuration
+ can also be complex.
+ .
+ Because of the complexity, you may find yourself wanting to peruse
+ the documentation files included herein. The main files are:
+ 1) cf.README.gz -- A reference for all things in sendmail.{mc,cf}
+ 2) op.{ps,txt}.gz -- The care and feeding of Sendmail.
+ 3) faq.txt.gz -- Sendmail FAQ, current as of the package date.
+ .
+ Other files include the references for smrsh and libmilter.]])dnl
+dnl #
+dnl # Provide the requisite trailing newline
+dnl #
+
+
diff --git a/debian/build/install-sh b/debian/build/install-sh
new file mode 100644
index 0000000..b41a245
--- /dev/null
+++ b/debian/build/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+ '
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/debian/build/rules.in b/debian/build/rules.in
new file mode 100644
index 0000000..8ee3f6a
--- /dev/null
+++ b/debian/build/rules.in
@@ -0,0 +1,1189 @@
+#!/usr/bin/make -f
+#------------------------------------------------------------------------------
+# vim: syntax=make
+#
+# $Sendmail: rules,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Rules file for Sendmail @sm_version@@sm_revision@(@sm_version_math@)
+# on @sm_dist_name@ @sm_dist_vers@
+# via Debhelper V@DEBIAN_DH@
+#
+# Note: the .in file supports Sendmail @SM_MINVERS@ - @SM_MAXVERS@
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# The only thing to watch for is to make sure the changelog correctly
+# reflects the appropriate version and distribution!
+#
+# To support private builds:
+# 1) use the environment variables (defaults shown first):
+# CC=gcc|gcc-3.0..........-- choose compiler
+# CFLAGS='-O2 -Wall [-g]'.-- choose compile options
+# DEFINES=''..............-- additional -Dxxx
+# SM_CONF_OPT=''..........-- additional configure options
+# SM_BUILD_OPT=''.........-- additional build options
+# 2) Build the package using your normal setup:
+# A) [fakeroot] debian/rules binary
+# B) debuild -rfakeroot
+# C) dpkg-buildpackage -rfakeroot -uc -us
+#
+# DEB_BUILD_OPTIONS (global Debian package build options)
+# Debian specific, and common across package options
+# noopt - Do *NOT* compile with optimization (force -O0)
+# nostrip - Do *NOT* strip binaries (for debugging)
+#
+#
+# SM_CONF_OPT
+# Additional configure options and/or overrides may be specified thusly:
+# 1) export SM_CONF_OPT='--enable-shm=no'
+# dpkg-buildpackage -rfakeroot -uc -us
+# 2) SM_CONF_OPT='--enable-shm=no' dpkg-buildpackage
+# 3) debuild -e SM_CONF_OPT='--enable-shm=no'
+# etc...
+#
+# SM_BUILD_OPT
+# 1) export SM_BUILD_OPT='notls'
+# dpkg-buildpackage -rfakeroot -uc -us
+# 2) SM_BUILD_OPT='notls' dpkg-buildpackage -rfakeroot -uc -us
+# 3) debuild -e SM_BUILD_OPT='notls' -e CLFAGS='-O3 Wall'
+# etc...
+#
+# Supported options values for SM_BUILD_OPT:
+# notls Disable STARTTLS (OpenSSL) support
+# noauth Disable SMTP AUTH (sasl) support
+# nodev Disable generation of libmilter-dev package
+# nodoc Disable generation of sendmail-doc package
+#
+# This make file uses scripts from the DBS (0.8) package!
+#
+# Richard Nelson <cowboy@debian.org> @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#SHELL := /bin/sh -x
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use. (we'll set it later)
+#export DH_COMPAT=4
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+# Support separate debian directory
+ifeq (yes, $(shell test -d debian && echo 'yes'))
+ debian_dir := debian
+ pwd_dir := ${PWD}
+else
+ debian_dir := .
+ pwd_dir := ${PWD}/..
+ endif
+
+# Determine build,host architectures (via dpkg-architecture)
+ifeq (, ${DEB_BUILD_ARCH})
+ ifeq (yes, $(shell test -x /usr/bin/dpkg-architecture && echo 'yes'))
+ include ${debian_dir}/scripts/dpkg-arch.mk
+ endif
+ endif
+
+# Check for cross-compilation
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ ifneq (, $(DEB_BUILD_GNU_TYPE))
+ endif
+ endif
+
+# will want path info for some things... Like patches/changelogs...
+pwd_string := $(shell expr "${pwd_dir}" : '.*-\([0-9.].*\)')
+ifeq (, $(findstring +,${pwd_string}))
+ pwd_version := ${pwd_string}
+else
+ pwd_version := $(shell expr "${pwd_string}" : '.*+\([0-9.].*\)')
+ endif
+pwd_major := $(shell expr "${pwd_version}" : '\([0-9]*\.[0-9]*\)')
+
+# get package/version information from the changelog
+package := $(shell (cd ${debian_dir}/.. && \
+ dpkg-parsechangelog 2>/dev/null) | awk '/^Source:/ {print $$2}')
+version_string := $(shell (cd ${debian_dir}/.. && \
+ dpkg-parsechangelog 2>/dev/null) | awk '/^Version:/ {print $$2}')
+version_full := $(shell expr "${version_string}" : '\([^-]*\)')
+version_debian := $(shell expr "${version_string}" : '[^-]*\(-.*\)')
+version := ${version_full}
+version_major := $(shell expr "${version_full}" : '\([0-9]*\.[0-9]*\)')
+version_minor := $(shell expr "${version_full}" : '[0-9]*\.[0-9]*\.\(.*\)')
+ifneq (, $(findstring +,${version_minor}))
+ beta_version := $(shell expr "${version_full}" : '.*+\([0-9.].*\)')
+ beta_major := $(shell expr "${beta_version}" : '\([0-9]*\.[0-9]*\)')
+ beta_minor := $(shell expr "${beta_version}" : '[0-9]*\.[0-9]*\.\(.*\)')
+ ifneq (, $(beta_version))
+ version := ${beta_version}
+ version_major := ${beta_major}
+ version_minor := ${beta_minor}
+ endif
+ endif
+
+# Many things depend upon which release (slink, potato, woody, etc.)
+PKG_DIR := ${debian_dir}/${package}
+DATA_DIR := /usr/share
+ifeq (v4, $(shell (cd ${debian_dir}/.. && dh_testversion 4.0.0 2>/dev/null && echo 'v4')))
+ DH_COMPAT := 4
+else
+ ifeq (v3, $(shell (cd ${debian_dir}/.. && dh_testversion 3.0.0 2>/dev/null && echo 'v3')))
+ DH_COMPAT := 3
+ else
+ ifeq (v2, $(shell (cd ${debian_dir}/.. && dh_testversion 2.0.40 2>/dev/null && echo 'v2')))
+ DH_COMPAT := 2
+ else
+ DH_COMPAT := 1
+ PKG_DIR := ${debian_dir}/tmp
+ DATA_DIR := /usr
+ endif
+ endif
+ endif
+export DH_COMPAT
+
+# the dbs rules
+TAR_DIR := ${package}-${version}
+# Handle the case where the changelog is newer that what we're building
+ifneq (yes, $(shell test -e ${debian_dir}/../${TAR_DIR}.tar.gz && echo 'yes'))
+ TAR_DIR := ${package}-${pwd_version}
+ endif
+SOURCE_DIR := build-tree
+BUILD_TREE := ${SOURCE_DIR}/${TAR_DIR}
+PATCH_DIR := ${debian_dir}/patches/${version_major}/${version}
+SCRIPT_DIR := ${debian_dir}/scripts
+STAMP_DIR := ${debian_dir}/build/stampdir
+
+# Include Debian Autoconf settings
+ifeq (yes, $(shell test -e ${debian_dir}/build/autoconf.mk && echo 'yes'))
+ include ${debian_dir}/build/autoconf.mk
+else
+ include ${debian_dir}/build/autoconf.mk.in
+ endif
+
+# these are strictly for my own consuption
+PKG_DOC := ${debian_dir}/${package}-doc${docdir}/${package}-doc
+MAKE_SUBDIRS := examples local sensible_mda
+PACKAGES := sendmail sendmail-doc libmilter-dev
+SM_SUBDIRS := editmap libmilter mail.local mailstats \
+ makemap praliases rmail sendmail smrsh vacation
+#
+# We want delayed interpretation of the options !
+ifeq (yes, $(shell test -x /usr/bin/debuild && echo 'yes'))
+ DEB_BUILD = \
+ SM_CONF_OPT="${SM_CONF_OPT}" \
+ SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ debuild -e SM_CONF_OPT -e SM_BUILD_OPT
+else
+ DEB_BUILD = \
+ SM_CONF_OPT="${SM_CONF_OPT}" \
+ SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ dpkg-buildpackage
+ endif
+
+# Process build-time options:
+# 1) options from SM_BUILD_OPT (Prior to configure)
+# 2) defaults (Prior to configure)
+ENABLE_INDEP := yes
+ENABLE_ARCH := yes
+ENABLE_LIB := no
+ENABLE_BIN := yes
+ifneq (, $(findstring notls,${SM_BUILD_OPT}))
+ ENABLE_TLS := no
+else
+ ENABLE_TLS := yes
+ endif
+ifneq (, $(findstring noauth,${SM_BUILD_OPT}))
+ ENABLE_AUTH := no
+else
+ ENABLE_AUTH := yes
+ endif
+ifneq (, $(findstring nodev,${SM_BUILD_OPT}))
+ ENABLE_DEV := no
+else
+ ENABLE_DEV := yes
+ endif
+ifneq (, $(findstring nodoc,${SM_BUILD_OPT}))
+ ENABLE_DOC := no
+else
+ ENABLE_DOC := yes
+ endif
+#
+# Summarize above options into -INDEP and -ARCH for this Makefile
+ENABLE_INDEP := ${ENABLE_DOC}
+ifeq (no, ${ENABLE_BIN})
+ ifeq (no, ${ENABLE_LIB})
+ ifeq (no, ${ENABLE_DEV})
+ ENABLE_ARCH := no
+ endif
+ endif
+ endif
+
+all:
+ @echo 'Please specify a real target in the future...';
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ binary;
+
+
+#------------------------------------------------------------------------------
+# Rules to maintain the external Debian directory
+#------------------------------------------------------------------------------
+#-------------
+refresh-dbs:
+ @echo 'updating debian/scripts directory...';
+ cp -af /usr/share/dbs/* ${SCRIPT_DIR}/;
+ chmod a-w ${SCRIPT_DIR}/*;
+
+#-------------
+refresh-debian:
+ @dh_testdir;
+ @echo 'updating debian directory ...';
+ sudo $(RM) -r debian;
+ cp -a ../debian ./;
+ sudo $(RM) -r ${SOURCE_DIR} ${STAMP_DIR};
+ rm -f ${debian_dir}/config.status;
+ touch ${debian_dir}/rules;
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ debian-setup;
+
+debian-setup:
+ # Force a configure here, using $${PWD} so the changelog, etc.
+ # wind up with the right version numbers
+ rm -f ${debian_dir}/configure ${debian_dir}/config.status;
+ rm -f ${debian_dir}/build/autoconf.mk;
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ configure;
+ $(MAKE) -f ${debian_dir}/rules clean-debian;
+
+ # Remove pieces not needed for further building
+ find ${debian_dir}/patches -type d -a ! -name 'patches' \
+ -a ! -name 'contrib' \
+ -a ! -name "${pwd_major}" \
+ -a ! -name "${pwd_version}" \
+ | xargs -r $(RM) -r;
+ $(RM) -r ${debian_dir}/bugs ${debian_dir}/private ${debian_dir}/watch;
+ $(RM) ${debian_dir}/build/acinclude.m4 \
+ ${debian_dir}/build/aclocal.m4 \
+ ${debian_dir}/build/sendmail.m4 \
+ ${debian_dir}/build/ndbm.m4 \
+ ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status \
+ ${debian_dir}/build/config.guess ${debian_dir}/build/config.sub;
+ $(RM) -r ${debian_dir}/autom4te.cache;
+ # Fakeout Make to look like current
+ $(RM) ${debian_dir}/configure.ac;
+ echo `date` > ${debian_dir}/configure.ac;
+ touch ${debian_dir}/configure;
+ touch ${debian_dir}/rules;
+
+
+#-------------
+clean-debian:
+ @echo 'cleaning debian directory...';
+ find ${debian_dir} -name '*~' -o -name '\.*\.swp' \
+ | xargs -r rm;
+ $(RM) ${debian_dir}/*.sav;
+ $(RM) ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status \
+ ${debian_dir}/build/config.guess.sav \
+ ${debian_dir}/build/config.sub.sav;
+ $(RM) -r ${debian_dir}/autom4te.cache;
+ # can't touch control/changelog/configure -- needed by debuild, etc
+ for file in $$(find ${debian_dir} -type f -name '*\.in' \
+ -a ! -name 'configure.in'); do \
+ $(RM) $$(echo "$$file" | sed -e 's/\.in$$//'); \
+ done;
+ $(RM) ${STAMP_DIR}/autotools ${STAMP_DIR}/configure;
+
+#-------------
+refresh-faq:
+ @echo 'Refreshing FAQ'
+ @chmod u+w ${debian_dir}/faq.txt;
+ (cd ${debian_dir} && wget --passive-ftp --timestamping \
+ --cache=off http://www.sendmail.org/faq/faq.txt;);
+ @chmod a-w ${debian_dir}/faq.txt;
+ @echo 'Refreshing Misc'
+ @chmod u+w ${debian_dir}/cf/feature/rhsbl.m4;
+ (cd ${debian_dir}/cf/feature && wget --passive-ftp --timestamping \
+ --cache=off http://www.rfc-ignorant.org/rhsbl.m4;);
+ @chmod u-w ${debian_dir}/cf/feature/rhsbl.m4;
+
+
+#-------------
+world:
+ # Debian build daemons don't (for the nonce) support build-indep,
+ # so this rule allows *me* to build both arch and indep portions
+ # of sendmail in one go (so I don't forget).
+ @dh_testdir;
+ $(MAKE) -f ${debian_dir}/rules info;
+ time ${DEB_BUILD} -rfakeroot
+
+test:
+ @dh_testdir;
+ $(MAKE) -f ${debian_dir}/rules clean-debian;
+ fakeroot $(MAKE) -f ${debian_dir}/rules clean;
+ $(MAKE) -f ${debian_dir}/rules \
+ ENABLE_TLS=yes ENABLE_DEV=no ENABLE_DOC=no \
+ CFLAGS='-O2 -Wall' DEB_BUILD_OPTIONS='nostrip' configure;
+ #time ${DEB_BUILD} -rfakeroot -d -us -uc;
+ time $(MAKE) -f ${debian_dir}/rules build-arch;
+
+print:
+ @dh_testdir;
+ -(cd ${BUILD_TREE}/.. && \
+ for file in `find . -name 'README'`; do \
+ lpr $$file; \
+ done; );
+ -(cd ${BUILD_TREE}/.. && \
+ lpr */KNOWNBUGS; \
+ lpr */RELEASE_NOTES; \
+ lpr */sendmail/SECURITY; \
+ lpr */sendmail/TUNING; \
+ lpr */sendmail/TRACEFLAGS; \
+ lpr */doc/op/op.ps; \
+ lpr */cf/feature/nullclient.m4; \
+ lpr */cf/feature/msp.m4; \
+ );
+ -(cd ${debian_dir} && \
+ lpr ../../${debian_dir}/configure.ac; \
+ lpr ../../${debian_dir}/build/rules.in; \
+ lpr build/site.config.m4.in; \
+ lpr cf/hack/msp_nullclient.m4; \
+ );
+
+
+#------------------------------------------------------------------------------
+# Misc rules
+#------------------------------------------------------------------------------
+#-------------
+${STAMP_DIR}:
+ mkdir -p ${STAMP_DIR};
+
+
+#------------------------------------------------------------------------------
+# Autoconf rules
+#------------------------------------------------------------------------------
+#-------------
+${debian_dir}/rules: ${debian_dir}/build/rules.in ${debian_dir}/config.status
+ # *** *** *** configure changed ?!? *** *** ***
+ if [ -e ${debian_dir}/config.status ]; then \
+ chmod ug+x ${debian_dir}/config.status; \
+ (cd ${debian_dir} && ./config.status;); \
+ fi;
+
+#-------------
+${debian_dir}/config.status: ${debian_dir}/configure
+ # *** *** *** configure changed ?!? *** *** ***
+ if [ -e ${debian_dir}/config.status ]; then \
+ chmod ug+x ${debian_dir}/config.status; \
+ (cd ${debian_dir} && ./config.status --recheck;) \
+ fi;
+
+#-------------
+${debian_dir}/configure: ${debian_dir}/configure.ac
+ # *** *** *** configure.ac changed ?!? *** *** ***
+ cp -af ${debian_dir}/configure.ac \
+ ${debian_dir}/configure.in;
+ (cd ${debian_dir} && autoconf;);
+ $(RM) ${debian_dir}/configure.in;
+ chmod ug+x ${debian_dir}/configure;
+
+#-------------
+autotools: ${STAMP_DIR} ${STAMP_DIR}/autotools
+${STAMP_DIR}/autotools:
+
+ #Add here commands to setup the autotools environment
+
+ # Make sure we have the latest available config.{guess,sub}
+ # Allow the package to override either by faking the date...
+ if [ -e /usr/share/misc/config.guess -a \
+ -e ${debian_dir}/build/config.guess ]; then \
+ OLDDATEGUESS=`${debian_dir}/build/config.guess -t | tr -d - `; \
+ NEWDATEGUESS=`/usr/share/misc/config.guess -t | tr -d - `; \
+ if [ "$$OLDDATEGUESS" -lt "$$NEWDATEGUESS" ]; then \
+ if [ ! -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf ${debian_dir}/build/config.guess \
+ ${debian_dir}/build/config.guess.sav;\
+ fi; \
+ if [ -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf /usr/share/misc/config.guess \
+ ${debian_dir}/build/config.guess; \
+ fi; \
+ fi; \
+ fi;
+ if [ -e /usr/share/misc/config.sub -a \
+ -e ${debian_dir}/build/config.sub ]; then \
+ OLDDATESUB=`${debian_dir}/build/config.sub -t | tr -d - `; \
+ NEWDATESUB=`/usr/share/misc/config.sub -t | tr -d - `; \
+ if [ "$$OLDDATESUB" -lt "$$NEWDATESUB" ]; then \
+ if [ ! -e ${debian_dir}/build/config.sub.sav ]; then \
+ cp -pf ${debian_dir}/build/config.sub \
+ ${debian_dir}/build/config.sub.sav; \
+ fi; \
+ if [ -e ${debian_dir}/build/config.sub.sav ]; then \
+ cp -pf /usr/share/misc/config.sub \
+ ${debian_dir}/build/config.sub; \
+ fi; \
+ fi; \
+ fi;
+
+ touch ${STAMP_DIR}/autotools;
+
+
+
+#------------------------------------------------------------------------------
+# Build/Package check rules
+#------------------------------------------------------------------------------
+#-------------
+info:
+
+ #--------------------------------------------------------------------
+ # The following information will be used for this run:
+ # Source = ${package} ${pwd_string}
+ # Package = ${package} ${version_string}
+ # Version = ${version_major}.${version_minor}${version_debian}
+ # Arch = ${DEB_BUILD_ARCH} on ${DEB_HOST_ARCH}
+ # Options
+ # config opt = ${SM_CONF_OPT}
+ # build opt = ${SM_BUILD_OPT}
+ # ENABLE_TLS = ${ENABLE_TLS}
+ # ENABLUE_AUTH= ${ENABLE_AUTH}
+ # ENABLE_DEV = ${ENABLE_DEV}
+ # ENABLE_DOC = ${ENABLE_DOC}
+ # compile opt = ${CC} ${CFLAGS} ${DEFINES}
+ # DEB_BUILD_OPTIONS = ${DEB_BUILD_OPTIONS}
+ # DH_VERBOSE = ${DH_VERBOSE}
+ # DH_OPTIONS = ${DH_OPTIONS}
+ # DH_COMPAT = ${DH_COMPAT}
+ #--------------------------------------------------------------------
+
+#-------------
+buildinfo:
+ @echo '';
+ @dpkg -l \
+ debhelper \
+ dpkg-dev \
+ gcc \
+ 'libc6*' \
+ binutils \
+ ldso \
+ make \
+ m4 \
+ libdb3 libdb3-dev \
+ libdb2 libdb2-dev \
+ libwrap0 libwrap0-dev \
+ libldap2 libldap2-dev \
+ libopenldap1 libopenldap-dev \
+ umich-libldap umich-libldap-dev \
+ libsasl7 libsasl-dev \
+ openssl libssl-dev 'libssl0*' \
+ ${BUILD_INFO} \
+ 2> /dev/null \
+ | awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \
+ | tee ${debian_dir}/${package}.buildinfo.Debian;
+ @echo '';
+ @chmod 644 ${debian_dir}/${package}.buildinfo.Debian;
+
+#-------------
+pristine:
+ @dh_testdir;
+ #$(MAKE) -f ${debian_dir}/rules info;
+ #
+ # Fail if there are any modifications to the original
+ # tarball, other than the debian directory
+ if [ -f ../${package}_${version_string}.diff.gz ]; then \
+ zgrep -e "^\+\+\+ " ../${package}_${version_string}.diff.gz \
+ | sed -e "/^\+\+\+ ${package}-${version}\/debian\/.*$$/d" - \
+ | sed -e "/^+\+\+ ${package}-${version}\/upstream\/patches\/.*$$/d" - \
+ | [ ! -z - ]; \
+ fi;
+
+ # Check for presence of TLS (crypto) enablement and bitch if found
+ @if (grep -qEe '^#TLS:[[:space:]]*yes' \
+ ${debian_dir}/build/site.config.m4); then \
+ echo '** ** --------------------------------------------------- ** **';\
+ echo '** ** This package contains crypto support ! Be careful ! ** **';\
+ echo '** ** --------------------------------------------------- ** **';\
+ fi;
+
+#-------------
+verify:
+ @dh_testdir;
+ # Verifying the md5 summs and signed files
+ @for file in $$(find . -maxdepth 1 -name '*.md5'); do \
+ echo "Checking MD5 source: $$file."; \
+ cat $$file; \
+ md5sum -c $$file; \
+ done;
+ @for file in $$(find . -maxdepth 1 -name '*.sig'); do \
+ echo "Checking signature file $$file."; \
+ part=$$(echo "$$file" | sed -e 's/\.sig$$//'); \
+ if [ -f $$part ]; then \
+ gpg --verify $$part.sig $$part || true; \
+ elif [ -f $$part.gz ]; then \
+ gunzip -c $$part.gz > $$part; \
+ gpg --verify $$part.sig $$part || true; \
+ rm $$part; \
+ fi; \
+ done;
+
+
+#------------------------------------------------------------------------------
+# User callable rules
+#------------------------------------------------------------------------------
+#-------------
+clean:
+ dh_testdir;
+ dh_testroot;
+
+ # Add here commands to clean up after the build process.
+ #-$(MAKE) clean;
+ #-$(MAKE) distclean;
+
+ # First, remove any patches, and source directories
+ #$(MAKE) -f ${debian_dir}/sys-build.mk source.clean;
+
+ # Debian stuff
+ $(RM) -r ${SOURCE_DIR} ${STAMP_DIR};
+ $(RM) ${debian_dir}/*.buildinfo.Debian;
+ for file in tmp ${PACKAGES};do \
+ $(RM) -r ${debian_dir}/$$file; \
+ done;
+
+ # Local stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) -f Makefile.in clean;); \
+ done;
+
+ifeq (3, $(shell test ${DH_COMPAT} -ge 3 && echo '3'))
+ # Debhelper V3 conffile handling - prevent duplicates
+ for file in $$(find ${debian_dir} -maxdepth 1 -type f \
+ -name '*\.conffiles\.sav'); do \
+ mv $$file $$(echo "$$file" | sed -e 's?\.sav$$??'); \
+ done;
+endif
+
+ # can't touch control/changelog/configure -- needed by debuild, etc
+ $(RM) ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status;
+ $(RM) -r ${debian_dir}/autom4te.cache
+ for file in $$(find ${debian_dir} -type f -name '*\.in' \
+ -a ! -name 'configure.in'); do \
+ $(RM) $$(echo "$$file" | sed -e 's/\.in$$//'); \
+ done;
+
+ # Restore pre-existing config.{guess,sub}
+ -if [ -e ${debian_dir}/buil/config.sub.sav ]; then \
+ cp -pf ${debian_dir}/build/config.sub.sav \
+ ${debian_dir}/build/config.sub \
+ && $(RM) ${debian_dir}/build/config.sub.sav; \
+ fi;
+ -if [ -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf ${debian_dir}/build/config.guess.sav \
+ ${debian_dir}/build/config.guess \
+ && $(RM) ${debian_dir}/build/config.guess.sav; \
+ fi;
+
+ # Cleanup after build (for pristine source, smaller diffs)
+ #find .. -name ${package}*.asc -size 0 -maxdepth 1 -exec rm {} ';';
+ dh_clean;
+
+
+#-------------
+setup: ${STAMP_DIR}/setup
+${STAMP_DIR}/setup:
+
+# Support separate debian directory
+ifeq (yes, $(shell test -d debian && echo 'yes'))
+ dh_testdir;
+
+ # unpack and patch source
+ $(MAKE) -f ${SCRIPT_DIR}/dbs-build.mk \
+ BUILD_TREE="${BUILD_TREE}" TAR_DIR="${TAR_DIR}" \
+ STAMP_DIR="${STAMP_DIR}" PATCH_DIR="${PATCH_DIR}" \
+ SCRIPT_DIR="${SCRIPT_DIR}" \
+ ${STAMP_DIR}/unpack ${STAMP_DIR}/patch;
+
+ touch ${STAMP_DIR}/setup;
+endif
+
+
+#-------------
+configure: ${STAMP_DIR}/configure
+${STAMP_DIR}/configure: ${STAMP_DIR}/setup ${STAMP_DIR}/autotools
+
+ $(MAKE) -f ${debian_dir}/rules info;
+
+ #Add here commands to configure the package.
+ #./configure --prefix=/usr
+
+ # Use autoconf to handle varying degrees of library support
+ # NOTE: options values are Yes/No/Auto, but auto isn't always
+ # used herein, as it can cause problems to be ignored
+ # so it is only used on items of lesser importance
+ chmod ug+x ${debian_dir}/configure;
+ (cd ${debian_dir} && \
+ ./configure \
+ --build=${DEB_BUILD_GNU_TYPE} \
+ --host=${DEB_HOST_GNU_TYPE} \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/sm.bin \
+ --datadir=${DATA_DIR} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=${DATA_DIR}/info \
+ --mandir=${DATA_DIR}/man \
+ --srcdir=${pwd_dir}/debian \
+ --with-buildtree=${BUILD_TREE} \
+ --with-docdir=${DATA_DIR}/doc \
+ --with-revision=${version_debian} \
+ --enable-regex=auto \
+ --enable-ndbm=no \
+ --enable-newdb=yes \
+ --enable-nis=auto \
+ --enable-nisplus=auto \
+ --enable-ldap=yes \
+ --enable-hesiod=no \
+ --enable-tcpd=auto \
+ --enable-bind=no \
+ --enable-ipv6=auto \
+ --enable-maillock=yes \
+ --enable-auth=${ENABLE_AUTH} \
+ --enable-tls=${ENABLE_TLS} \
+ --enable-shm=auto \
+ --enable-doc=${ENABLE_DOC} \
+ --enable-dev=${ENABLE_DEV} \
+ ${SM_CONF_OPT} \
+ ;);
+ # CC="${CC}" CFLAGS="${CFLAGS}
+
+ifeq (3, $(shell test ${DH_COMPAT} -ge 3 && echo '3'))
+ # Debhelper V3 conffile handling - prevent duplicates
+ for file in $$(find ${debian_dir} -maxdepth 1 -type f \
+ -name '*.conffiles'); do \
+ mv $$file $$file.sav; \
+ done;
+endif
+
+ touch ${STAMP_DIR}/configure;
+
+
+#-------------
+build-indep: ${STAMP_DIR}/build-indep
+${STAMP_DIR}/build-indep: ${STAMP_DIR}/configure
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ dh_testdir;
+
+ # Document what we're building against
+ $(MAKE) -f ${debian_dir}/rules buildinfo;
+
+ # Add here commands to build/compile the documentation/package.
+ #$(MAKE) doc;
+
+ # Only valid on newer (8.11+) Sendmails
+ #(cd ${BUILD_TREE}/doc/op/ && make op.txt);
+ # So we'll do it by hand...
+ $(RM) ${BUILD_TREE}/doc/op/op.txt;
+ pic -C ${BUILD_TREE}/doc/op/op.me | eqn -C -Tascii \
+ | GROFF_NO_SGR=1 groff -Tascii -me | ul -t dumb > ${BUILD_TREE}/doc/op/op.txt;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) build-indep;); \
+ done;
+endif
+
+ touch ${STAMP_DIR}/build-indep;
+
+
+#-------------
+build-arch: ${STAMP_DIR}/build-arch
+${STAMP_DIR}/build-arch: ${STAMP_DIR}/configure
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ dh_testdir;
+
+ # Document what we're building against
+ $(MAKE) -f ${debian_dir}/rules buildinfo;
+
+ # Add here commands to compile the package.
+ #$(MAKE);
+
+ # Place our m4 configuration files for the sendmail build to use
+ if [ -d ${BUILD_TREE}/devtools/Site ]; then \
+ cp -f ${debian_dir}/build/site.config.m4 ${BUILD_TREE}/devtools/Site/; \
+ fi;
+
+ # Correct some paths in upstream man pages
+ sed -e "s?/usr/adm/sm.bin?${sysconfdir}/mail/smrsh?g" \
+ -e "s?sm.bin?${sysconfdir}/mail/smrsh?g" \
+ ${BUILD_TREE}/smrsh/smrsh.8 \
+ > ${BUILD_TREE}/smrsh/smrsh.8.new;
+ mv ${BUILD_TREE}/smrsh/smrsh.8.new ${BUILD_TREE}/smrsh/smrsh.8;
+ sed -e "s?/etc/mail/statistics?${localstatedir}/lib/sendmail/sendmail.st?g"\
+ ${BUILD_TREE}/sendmail/sendmail.8 \
+ > ${BUILD_TREE}/sendmail/sendmail.8.new;
+ mv ${BUILD_TREE}/sendmail/sendmail.8.new \
+ ${BUILD_TREE}/sendmail/sendmail.8;
+
+ # Finally, build the whole enchilada (we'll let sendmail figure
+ # which, if any of the dependant libraries each component needs)
+ for subdir in ${SM_SUBDIRS}; do \
+ if [ -d ${BUILD_TREE}/$${subdir} ]; then \
+ (cd ${BUILD_TREE}/$${subdir} && ./Build -S;); \
+ fi; \
+ done;
+
+ # Remove our config m4 files
+ $(RM) ${BUILD_TREE}/devtools/Site/site.config.m4;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) build-arch;); \
+ done;
+endif
+
+ touch ${STAMP_DIR}/build-arch;
+
+
+#-------------
+install-indep: ${STAMP_DIR}/install-indep
+${STAMP_DIR}/install-indep: DH_OPTIONS=-i
+${STAMP_DIR}/install-indep: ${STAMP_DIR}/build-indep
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ dh_testdir;
+ dh_testroot;
+ dh_clean -k;
+ dh_installdirs;
+ if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+
+ # Add here commands to install the documentation/package.
+ #$(MAKE) prefix=`pwd`/${PKG_DIR}/usr install;
+
+ # sendmail operations guide and other documentation
+ $(INSTALL_DATA) ${BUILD_TREE}/doc/op/op.ps ${PKG_DOC}/op;
+ $(INSTALL_DATA) ${BUILD_TREE}/doc/op/op.txt ${PKG_DOC}/op;
+ $(INSTALL_DATA) ${BUILD_TREE}/README ${PKG_DOC}/;
+ $(INSTALL_DATA) ${BUILD_TREE}/KNOWNBUGS ${PKG_DOC}/;
+ $(INSTALL_DATA) ${BUILD_TREE}/cf/README ${PKG_DOC}/cf.README;
+ $(INSTALL_DATA) debian/README.Debian.sendmail \
+ ${PKG_DOC}/sendmail/README.Debian;
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/README \
+ ${PKG_DOC}/sendmail/;
+ if [ -f ${BUILD_TREE}/sendmail/SECURITY ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/SECURITY \
+ ${PKG_DOC}/sendmail/SECURITY; \
+ fi;
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/TRACEFLAGS \
+ ${PKG_DOC}/sendmail/TRACEFLAGS;
+ if [ -f ${BUILD_TREE}/sendmail/TUNING ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/TUNING \
+ ${PKG_DOC}/sendmail/TUNING; \
+ fi;
+ sed -e "s?/usr/libexec?${libexecdir}?g" \
+ -e "s?/usr/ucb/vacation?${libexecdir}/vacation.sendmail?g" \
+ -e "s?/usr/adm/sm.bin?/etc/mail/smrsh?g" \
+ ${BUILD_TREE}/smrsh/README \
+ > ${PKG_DOC}/smrsh.README;
+ $(INSTALL_DATA) debian/faq.txt ${PKG_DOC}/;
+
+ # libmilter-dev package
+ if [ -d ${BUILD_TREE}/libmilter ]; then \
+ $(INSTALL_DATA) debian/README.Debian.libmilter-dev \
+ ${PKG_DOC}/libmilter/README.Debian; \
+ $(INSTALL_DATA) ${BUILD_TREE}/libmilter/README \
+ ${PKG_DOC}/libmilter/README; \
+ if [ -d ${BUILD_TREE}/libmilter/docs ]; then \
+ cp -a ${BUILD_TREE}/libmilter/docs/* \
+ ${PKG_DOC}/libmilter/html; \
+ fi; \
+ fi;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && \
+ $(MAKE) install-indep \
+ DESTDIR="../../${PKG_DOC}";); \
+ done;
+
+ # Multiple package fixup
+ #dh_movefiles -i --sourcedir debian/${package};
+
+ # Actions from binary-common
+ #
+ dh_fixperms;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+endif
+
+ touch ${STAMP_DIR}/install-indep;
+
+
+#-------------
+install-arch: ${STAMP_DIR}/install-arch
+${STAMP_DIR}/install-arch: DH_OPTIONS=-a
+${STAMP_DIR}/install-arch: ${STAMP_DIR}/build-arch
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ dh_testdir;
+ dh_testroot;
+ dh_clean -k;
+ dh_installdirs;
+ if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+
+ # Add here commands to install the package into ${PKG_DIR}.
+ #$(MAKE) prefix=`pwd`/${PKG_DIR}/usr install;
+
+ # sendmail install proper... with a little help ;-}
+ #$(MAKE) install DESTDIR="$${pwd}/${PKG_DIR}";
+
+ # Finally, install the whole enchilada
+ for subdir in ${SM_SUBDIRS}; do \
+ if [ -d ${BUILD_TREE}/$${subdir} ]; then \
+ if [ "$${subdir}" = 'libmilter' ]; then \
+ :; \
+ elif [ "$${subdir}" = 'mail.local' -o \
+ "$${subdir}" = 'rmail' ]; then \
+ (cd ${BUILD_TREE}/obj*/$${subdir} && \
+ $(MAKE) force-install \
+ DESTDIR="../../../../${PKG_DIR}";); \
+ else \
+ (cd ${BUILD_TREE}/obj*/$${subdir} && \
+ $(MAKE) install \
+ DESTDIR="../../../../${PKG_DIR}";); \
+ fi; \
+ fi; \
+ done;
+ # Support older Sendmail (below 8.10.0)
+ if [ -f ${PKG_DIR}${sysconfdir}/mail/sendmail.hf ]; then \
+ mv -f ${PKG_DIR}${sysconfdir}/mail/sendmail.hf \
+ ${PKG_DIR}${sysconfdir}/mail/helpfile; \
+ $(RM) ${PKG_DIR}${localstatedir}/lib/sendmail/sendmail.st; \
+ fi;
+
+ # FHS says that rmail belongs in ${sbindir}
+ mv ${PKG_DIR}${bindir}/rmail ${PKG_DIR}${sbindir}/rmail;
+
+ # Sendmail alias handling...
+ # NOTE: whilst smptd is a valid alias for sendmail, we don't create
+ # one so that we can co-exists with smtpd (a firewall frontend)
+ # NOTE: newscache package also contains ${sbindir}/hoststat
+ # NOTE: newalias, purgestat, etc. aren't for the general user..
+ # yeah, yeah, I know... these can be done with -b<flag>!
+ (cd ${PKG_DIR}${bindir} && \
+ $(RM) hoststat mailq newaliases purgestat smtpd;)
+ ln -sf ../sbin/sendmail ${PKG_DIR}${libdir}/sendmail;
+ (cd ${PKG_DIR}${sbindir} && for file in \
+ newaliases hoststat purgestat \
+ ; do \
+ ln -sf sendmail $$file; \
+ done;);
+ # Handle man pages for these aliases
+ (cd ${PKG_DIR}${mandir}/man8 && for file in \
+ hoststat.8.gz purgestat.8.gz \
+ ; do \
+ ln -sf sendmail.8.gz $$file; \
+ done;);
+ # Place those removed aliases in ${libexecdir} (mostly for me)
+ (cd ${PKG_DIR}${libexecdir} && for file in \
+ hoststat mailq newaliases purgestat smtpd; do \
+ ln -sf ../../sbin/sendmail $$file; \
+ done;);
+ # NOTE: with the MSP/MTA split, we'll provide our own mailstats (keep orig)
+ mv ${PKG_DIR}${sbindir}/mailstats \
+ ${PKG_DIR}${libexecdir}/mailstats;
+ # Special handling of vacation - Debian has a seperate package
+ # with a different version (sigh) keep our copy just in case...
+ if [ -d ${BUILD_TREE}/vacation ]; then \
+ mv ${PKG_DIR}${bindir}/vacation \
+ ${PKG_DIR}${libexecdir}/vacation.sendmail; \
+ mv ${PKG_DIR}${mandir}/man1/vacation.1 \
+ ${PKG_DIR}${mandir}/man1/vacation.sendmail.1; \
+ fi;
+ # m4 configuration directories
+ cp -a ${BUILD_TREE}/cf/* ${PKG_DIR}${datadir}/sendmail/cf;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/README;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/sendmail.schema;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/Build;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/Makefile;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/*.cf;
+
+ # contributed stuff - scripts
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ -e "s?/etc/sendmail.cf?${sysconfdir}/mail/sendmail.cf?g" \
+ ${BUILD_TREE}/contrib/etrn.pl \
+ > ${PKG_DIR}${sbindir}/etrn;
+ chmod 0755 ${PKG_DIR}${sbindir}/etrn;
+ if [ -f ${BUILD_TREE}/contrib/etrn.0 ]; then \
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/etrn.0 \
+ > ${PKG_DIR}${mandir}/man8/etrn.8; \
+ else \
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/etrn.pl \
+ > ${PKG_DIR}${mandir}/man8/etrn.8; \
+ fi;
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/expn.pl \
+ > ${PKG_DIR}${bindir}/expn;
+ chmod 0755 ${PKG_DIR}${bindir}/expn;
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/expn.pl \
+ > ${PKG_DIR}${mandir}/man8/expn.8;
+ sed -e "s?/etc/sendmail.cf?${sysconfdir}/mail/sendmail.cf?g" \
+ debian/checksendmail/checksendmail.perl \
+ > ${PKG_DIR}${sbindir}/checksendmail;
+ chmod 0755 ${PKG_DIR}${sbindir}/checksendmail;
+ $(INSTALL_DATA) debian/checksendmail/checksendmail.8 \
+ ${PKG_DIR}${mandir}/man8/;
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ -e 's?/usr/sbin/sendmail -q30m -bd?/etc/init.d/sendmail start?g' \
+ ${BUILD_TREE}/contrib/smcontrol.pl \
+ > ${PKG_DIR}${datadir}/sendmail/smcontrol.pl;
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/smcontrol.pl;
+ $(INSTALL_SCRIPT) ${BUILD_TREE}/contrib/doublebounce.pl \
+ ${PKG_DIR}${datadir}/sendmail;
+ if [ -f ${BUILD_TREE}/contrib/qtool.pl ]; then \
+ sed -e 's?/usr/bin/env perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/qtool.pl \
+ > ${PKG_DIR}${datadir}/sendmail/qtool.pl; \
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/qtool.pl; \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/qtool.8 \
+ ${PKG_DIR}${mandir}/man8/; \
+ fi;
+ if [ -f ${BUILD_TREE}/contrib/buildvirtuser ]; then \
+ $(INSTALL_SCRIPT) ${BUILD_TREE}/contrib/buildvirtuser \
+ ${PKG_DIR}${datadir}/sendmail/; \
+ fi;
+
+ # contributed stuff - examples
+ sed 's?/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/passwd-to-alias.pl \
+ > ${PKG_DIR}${datadir}/sendmail/examples/passwd-to-alias;
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/examples/passwd-to-alias;
+
+ # contributed stuff - m4 scripts
+ if [ -f ${BUILD_TREE}/contrib/domainmap.m4 ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/domainmap.m4 \
+ ${PKG_DIR}${datadir}/sendmail/cf/feature; \
+ fi;
+ if [ -f ${BUILD_TREE}/contrib/dnsblaccess.m4 ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/dnsblaccess.m4 \
+ ${PKG_DIR}${datadir}/sendmail/cf/hack; \
+ fi;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && \
+ $(MAKE) install-arch \
+ DESTDIR="../../${PKG_DIR}";); \
+ done;
+ # Debian stuff - m4 scripts
+ (cd debian && \
+ for file in $$(find cf -type f -name '*.m4' -o -name '*.mc'); do \
+ $(INSTALL_DATA) $$file \
+ ../${PKG_DIR}${datadir}/sendmail/$$file; \
+ done;);
+ # Debian stuff - examples
+ $(INSTALL_DATA) debian/checksendmail/address.resolve \
+ ${PKG_DIR}${datadir}/sendmail/examples/;
+
+ # libmilter-dev package
+ifeq (yes, ${ENABLE_DEV})
+ if [ -d ${BUILD_TREE}/libmilter ]; then \
+ (cd ${BUILD_TREE}/obj*/libmilter && \
+ $(MAKE) install \
+ DESTDIR="../../../../debian/libmilter-dev";); \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libmilter/libmilter.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ $(INSTALL_DATA) ${BUILD_TREE}/include/libmilter/mfapi.h \
+ debian/libmilter-dev${includedir}/libmilter/; \
+ if [ -f ${BUILD_TREE}/include/libmilter/mfdef.h ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/include/libmilter/mfdef.h \
+ debian/libmilter-dev${includedir}/libmilter/; \
+ fi; \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libsmutil/libsmutil.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ if [ -d ${BUILD_TREE}/libsm ]; then \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libsm/libsm.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ fi; \
+ fi;
+endif
+
+ # Multiple package fixup
+ #dh_movefiles -a --sourcedir debian/${package};
+
+ # Actions from binary-common
+ #dh_installcron;
+ $(INSTALL_SCRIPT) debian/${package}.cron.daily \
+ ${PKG_DIR}${sysconfdir}/cron.daily/sendmail;
+ #dh_installlogrotate;
+ #$(INSTALL_DATA) debian/${package}.logrotate \
+ # ${PKG_DIR}${sysconfdir}/logrotate.d/sendmail;
+ #
+ dh_fixperms;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+ chmod a+x ${PKG_DIR}${datadir}/sendmail/cf/sh/makeinfo.sh;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/helpfile;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/peers/provider;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/service.switch*;
+ #
+ # You may want to make some executables suid here.
+ chown root:mail ${PKG_DIR}${sbindir}/sendmail;
+ chmod 04755 ${PKG_DIR}${sbindir}/sendmail;
+ chown root:mail ${PKG_DIR}${libexecdir}/mailstats;
+ chmod 02755 ${PKG_DIR}${libexecdir}/mailstats;
+ chown root:mail ${PKG_DIR}${libexecdir}/mail.local;
+ chmod 0755 ${PKG_DIR}${libexecdir}/mail.local;
+ chown root:mail ${PKG_DIR}${libexecdir}/smrsh;
+ chmod 0755 ${PKG_DIR}${libexecdir}/smrsh;
+ chown root:mail ${PKG_DIR}${libexecdir}/sensible-mda;
+ chmod 0755 ${PKG_DIR}${libexecdir}/sensible-mda;
+
+ # Special case Perl for Debian Slink (2.1), debhelper v1
+ if [ ! -x /usr/bin/dh_perl ]; then \
+ echo 'perl:Depends=perl5|perl' >> debian/substvars; fi;
+
+ # Install Lintian overrides
+ $(INSTALL_DATA) -d -g root -m 755 ${PKG_DIR}${datadir}/lintian/overrides
+ $(INSTALL_DATA) -g root -m 644 debian/${package}.lintian-overrides \
+ ${PKG_DIR}${datadir}/lintian/overrides/${package}
+endif
+
+ touch ${STAMP_DIR}/install-arch;
+
+
+#-------------
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+#
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep in another 'make' thread.
+binary-common:
+ # Need this version of debhelper for DH_OPTIONS to work.
+ dh_testversion 1.1.17;
+ dh_testdir;
+ dh_testroot;
+ # Done in install-xxx, but still need to get rid of *.debhelper !!!
+ #dh_clean -k;
+ $(RM) debian/*.debhelper;
+
+ dh_installchangelogs -k ${BUILD_TREE}/RELEASE_NOTES;
+ #-------- needs script name ala installinit ----
+ # Done in install-xxx
+ #dh_installcron;
+ if [ -x /usr/bin/dh_installdebconf ]; then dh_installdebconf; fi;
+ dh_installdocs;
+ #dh_installemacsen;
+ #dh_installexamples;
+ #if [ -x /usr/bin/dh_installinfo ]; then dh_installinfo; fi;
+ dh_installinit --init-script=sendmail;
+ #-------- needs script name ala installinit ----
+ # Done in install-xxx
+ #if [ -x /usr/bin/dh_installlogrotate ]; then dh_installlogrotate; fi;
+ if [ -x /usr/bin/dh_installman ]; then dh_installman; fi;
+ #dh_installmenu;
+ #dh_installmime;
+ #dh_undocumented;
+ if [ -x /usr/bin/dh_installpam ]; then dh_installpam; fi;
+ # Done in install-xxx
+ #if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+ifeq (, $(findstring nostrip,${DEB_BUILD_OPTIONS}))
+ dh_strip;
+else
+ #dh_strip;
+endif
+ dh_compress;
+ # Done in install-xxx
+ #dh_fixperms;
+ # Need to special case this now that we're using dynamic uid/gid
+ #if [ -x /usr/sbin/suidregister -a -s /etc/suid.conf ]; then
+ # dh_suidregister; fi;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+ # Done in install-xxx
+ #
+ # You may want to make some executables suid here.
+ # Done in install-xxx
+ #
+ #dh_makeshlibs;
+ dh_installdeb;
+ dh_shlibdeps;
+ if [ -x /usr/bin/dh_perl ]; then dh_perl; fi
+ dh_gencontrol;
+ dh_md5sums;
+ dh_builddeb;
+
+ $(MAKE) -f ${debian_dir}/rules pristine;
+
+
+#-------------
+# Build architecture independant packages using the common target.
+# (Uncomment this next line if you have such packages.)
+binary-indep: ${STAMP_DIR}/build-indep ${STAMP_DIR}/install-indep
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ $(MAKE) -f ${debian_dir}/rules DH_OPTIONS=-i binary-common;
+endif
+
+
+#-------------
+# Build architecture dependant packages using the common target.
+binary-arch: ${STAMP_DIR}/build-arch ${STAMP_DIR}/install-arch
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ $(MAKE) -f ${debian_dir}/rules DH_OPTIONS=-a binary-common;
+endif
+
+
+#-------------
+# Any other binary targets build just one binary package at a time.
+binary-%:
+ $(MAKE) -f ${debian_dir}/rules binary-common DH_OPTIONS=-p$*;
+
+
+#-------------
+# Below here is fairly generic really
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+# Due to buildd not (for the nonce) supporting build-arch, kluge next rule
+build: build-arch
+install: install-indep install-arch
+binary: binary-indep binary-arch
+.PHONY: refresh-dbs refresh-debian update-debian refresh-faq
+.PHONY: pristine
+.PHONY: info buildinfo
+.PHONY: setup autotools configure
+.PHONY: clean build build-indep build-arch
+.PHONY: install install-indep install-arch
+.PHONY: binary binary-indep binary-arch
+.SUFFIXES:
+.PRECIOUS: ${debian_dir}/rules
diff --git a/debian/build/site.config.m4.in b/debian/build/site.config.m4.in
new file mode 100644
index 0000000..e07df3b
--- /dev/null
+++ b/debian/build/site.config.m4.in
@@ -0,0 +1,235 @@
+#-----------------------------------------------------------------------------
+# $Sendmail: site.config.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Debian site.config.m4 for sendmail @sm_version@@sm_revision@(@sm_version_math@)
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+#
+#------------------------------------------------------------------
+# Sendmail @sm_version@@sm_revision@(@sm_version_math@) on @sm_date@ at @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------
+#
+#------------------------------------------------------------------
+# The following sendmail features are included
+#------------------------------------------------------------------
+#REGEX: @sm_enable_regex@
+#NDBM: @sm_enable_ndbm@
+#NEWDB: @sm_enable_newdb@ @sm_newdb_lib@
+#NIS: @sm_enable_nis@
+#NISPLUS: @sm_enable_nisplus@
+#LDAP: @sm_enable_ldap@ @sm_ldap_lib@
+#HESIOD: @sm_enable_hesiod@ @sm_hesiod_parms@
+#TCPD: @sm_enable_tcpd@
+#BIND: @sm_enable_bind@
+#IPv6: @sm_enable_ipv6@
+#Maillock: @sm_enable_maillock@
+#MILTER: @sm_enable_milter@
+#SFIO: @sm_enable_sfio@
+#AUTH: @sm_enable_auth@ @sm_auth_lib@
+#TLS: @sm_enable_tls@
+#SHM: @sm_enable_shm@
+#FFRs: @sm_ffr@
+#M4_FFRs: @sm_m4_ffr@
+#
+#------------------------------------------------------------------
+# Packages and build dependancies (Debian packages)
+#------------------------------------------------------------------
+#Sendmail: sendmail
+#Sendmail-doc: @sm_enable_doc@
+#Libmilter-dev: @sm_enable_dev@
+#Build-Depends: @sm_badepends@
+#Depends: @sm_depends@
+#Recommends: @sm_recommends@
+#Suggests: @sm_suggests@
+#
+#------------------------------------------------------------------
+# Build Architecture (Debian)
+#------------------------------------------------------------------
+#DEB_BUILD_ARCH: @DEB_BUILD_ARCH@
+#DEB_BUILD_GNU_CPU: @DEB_BUILD_GNU_CPU@
+#DEB_BUILD_GNU_SYSTEM: @DEB_BUILD_GNU_SYSTEM@
+#DEB_BUILD_GNU_TYPE: @DEB_BUILD_GNU_TYPE@
+#DEB_HOST_ARCH: @DEB_HOST_ARCH@
+#DEB_HOST_GNU_CPU: @DEB_HOST_GNU_CPU@
+#DEB_HOST_GNU_SYSTEM: @DEB_HOST_GNU_SYSTEM@
+#DEB_HOST_GNU_TYPE: @DEB_HOST_GNU_TYPE@
+#
+#------------------------------------------------------------------
+# Autoconf variable settings defaults
+#------------------------------------------------------------------
+#prefix: @prefix@ /usr/local
+#exec_prefix: @exec_prefix@ ${prefix}
+#bindir: @bindir@ ${exec_prefix}/bin
+#sbindir: @sbindir@ ${exec_prefix}/sbin
+#libexecdir: @libexecdir@ ${exec_prefix}/libexec
+#datadir: @datadir@ ${prefix}/share
+#sysconfdir: @sysconfdir@ ${prefix}/etc
+#sharedstatedir: @sharedstatedir@ ${prefix}/com
+#localstatedir: @localstatedir@ ${prefix}/var
+#libdir: @libdir@ ${exec_prefix}/var
+#includedir: @includedir@ ${prefix}/include
+#oldincludedir: @oldincludedir@ /usr/include
+#infodir: @infodir@ ${prefix}/info
+#mandir: @mandir@ ${prefix}/man
+#docdir: @docdir@ ${prefix}/doc
+#srcdir: @srcdir@ configure or ..
+#
+#------------------------------------------------------------------
+# Build options for the various pieces parts of sendmail
+#------------------------------------------------------------------
+#
+# Make sure defaults are sound...
+define(`confLIBS', `')dnl # was -ldl
+#
+# global
+APPENDDEF(`confINCDIRS', `@sm_incdirs@')
+APPENDDEF(`confMAPDEF', `@sm_mapdef@')
+APPENDDEF(`confENVDEF', `@sm_envdef@')
+APPENDDEF(`confLIBS', `@sm_libs@')
+#
+# editmap
+APPENDDEF(`conf_editmap_ENVDEF', `@sm_editmap_envdef@')
+APPENDDEF(`conf_editmap_LIBS', `@sm_editmap_libs@')
+#
+# libmilter
+APPENDDEF(`conf_libmilter_ENVDEF', `@sm_libmilter_envdef@')
+APPENDDEF(`conf_libmilter_LIBS', `@sm_libmilter_libs@')
+#
+# libsm
+APPENDDEF(`conf_libsm_ENVDEF', `@sm_libsm_envdef@')
+APPENDDEF(`conf_libsm_LIBS', `@sm_libsm_libs@')
+#
+# libsmdb
+APPENDDEF(`conf_libsmdb_ENVDEF', `@sm_libsmdb_envdef@')
+APPENDDEF(`conf_libsmdb_LIBS', `@sm_libsmdb_libs@')
+#
+# libsmutil
+APPENDDEF(`conf_libsmutil_ENVDEF', `@sm_libsmutil_envdef@')
+APPENDDEF(`conf_libsmutil_LIBS', `@sm_libsmutil_libs@')
+#
+# mail.local
+APPENDDEF(`conf_mail_local_ENVDEF', `@sm_mail_local_envdef@')
+APPENDDEF(`conf_mail_local_LIBS', `@sm_mail_local_libs@')
+#
+# mailstats
+APPENDDEF(`conf_mailstats_ENVDEF', `@sm_mailstats_envdef@')
+APPENDDEF(`conf_mailstats_LIBS', `@sm_mailstats_libs@')
+#
+# makemap
+APPENDDEF(`conf_makemap_ENVDEF', `@sm_makemap_envdef@')
+APPENDDEF(`conf_makemap_LIBS', `@sm_makemap_libs@')
+#
+# praliases
+APPENDDEF(`conf_praliases_ENVDEF', `@sm_praliases_envdef@')
+APPENDDEF(`conf_praliases_LIBS', `@sm_praliases_libs@')
+#
+# rmail
+APPENDDEF(`conf_rmail_ENVDEF', `@sm_rmail_envdef@')
+APPENDDEF(`conf_rmail_LIBS', `@sm_rmail_libs@')
+#
+# sendmail
+APPENDDEF(`conf_sendmail_ENVDEF', `@sm_sendmail_envdef@')
+APPENDDEF(`conf_sendmail_LIBS', `@sm_sendmail_libs@')
+#
+# smrsh
+APPENDDEF(`conf_smrsh_ENVDEF', `@sm_smrsh_envdef@')
+APPENDDEF(`conf_smrsh_LIBS', `@sm_smrsh_libs@')
+#
+# vacation
+APPENDDEF(`conf_vacation_ENVDEF', `@sm_vacation_envdef@')
+APPENDDEF(`conf_vacation_LIBS', `@sm_vacation_libs@')
+#
+#------------------------------------------------------------------
+# Build-time selection not handled by autoconf above
+#------------------------------------------------------------------
+# none, for the nonce...
+#
+#------------------------------------------------------------------
+# Global Build time configuration
+#------------------------------------------------------------------
+# compilation/link
+define(`confCC', `@CC@')dnl #Compiler
+define(`confCCOPTS', `')dnl #CC options
+define(`confCCOPTS_SO' `-fPIC')dnl #Shared libraries
+define(`confLD', confCC)dnl #Linker
+define(`confLDOPTS', `')dnl #Linker opts
+define(`confLDOPTS_SO', `-shared -Wl')dnl #linker shared lib
+define(`confLIBDIRS', `')dnl #-L linker flags
+define(`confMTCCOPTS', `')dnl #Multi-thread cc opts
+define(`confMTLDOPTS', `')dnl #Multi-thread ld opts
+define(`confOPTIMIZE', `@CFLAGS@')dnl #Optimization
+#
+# paths, owners, and modes
+# Note: can't use smmsp here, it is dynamically created
+# Note: EBINDIR deserves a better home, suggestions?
+define(`confEBINDIR', `@libexecdir@')dnl #mail.local,smrsh,etc.
+define(`confGBINGRP', `mail')dnl #sgid binary group smmsp
+define(`confGBINMODE', `02755')dnl #sgid binary mode
+define(`confGBINOWN', `root')dnl #sgid binary owner
+define(`confHFDIR', `@sysconfdir@/mail')dnl #helpfile dir
+define(`confHFFILE', `helpfile')dnl #helpfile name
+define(`confINCGRP', `root')dnl #include group
+define(`confINCMODE', `0744')dnl #include mode
+define(`confINCOWN', `root')dnl #include owner
+ifelse(eval(@sm_version_math@ >= 527363), `1',dnl
+`define(`confINCLUDEDIR',`@includedir@')dnl #include target',
+`define(`confINCLUDEDIR',`@includedir@/libmilter')dnl #include target'
+)dnl
+define(`confINST_DEP', `')dnl #submit.cf clientmqueue
+define(`confLIBDIR', `@libdir@/libmilter')dnl #library dir
+define(`confLIBGRP', `root')dnl #library group
+define(`confLIBMODE', `0744')dnl #library mode
+define(`confLIBOWN', `root')dnl #library owner
+define(`confMANROOT', `@mandir@/man')dnl #man root
+define(`confMANROOTMAN',`@mandir@/man')dnl #man root
+define(`confMANGRP', `root')dnl #man group
+define(`confMANMODE', `0744')dnl #man mode
+define(`confMANOWN', `root')dnl #man owner
+define(`confMBINDIR', `@sbindir@')dnl #MTA bindir
+define(`confMBINGRP', `root')dnl #MTA bin grp
+define(`confMBINMODE', `0755')dnl #MTA bin mode
+define(`confMBINOWN', `root')dnl #MTA bin owner
+define(`confMSPQOWN', `mail')dnl #MSP queue owner smmsp
+define(`confMSP_QUEUE_DIR', `/var/spool/mqueue-client')dnl
+define(`confSBINDIR', `@sbindir@')dnl #suid bin dir
+define(`confSBINGRP', `root')dnl #suid bin grp
+define(`confSBINMODE', `04755')dnl #suid bin mode
+define(`confSBINOWN', `root')dnl #suid bin owner
+# Note, STDIR in /var/lib/sendmail... default is /var/spool/mqueue
+define(`confSTDIR', `@localstatedir@/lib/sendmail')dnl #Statistics dir
+define(`confSTFILE', `statistics')dnl #statistics name
+define(`confMSP_STFILE',`sm-client.st')dnl #MSP statistics name
+define(`confSTMODE', `0660')dnl #statistics mode
+define(`confUBINDIR', `@bindir@')dnl #usr bin dir
+define(`confUBINGRP', `mail')dnl #usr bin grp smmsp
+define(`confUBINMODE', `0755')dnl #usr bin mode
+define(`confUBINOWN', `root')dnl #usr bin owner
+#
+# don't provide links, I'll do them myself later
+# sigh... must have something in there or $(make install) croaks -- temp file
+define(`confLINKS', `sendmail-bin')dnl
+define(`confMTA_LINKS')dnl
+#
+# Force rmail installation
+define(`confFORCE_RMAIL')dnl
+#
+# don't install formatted man pages or sendmail.st
+dnl define(`confNO_MAN_INSTALL')dnl
+dnl define(`confNO_MAN_BUILD')dnl
+define(`confINSTALL_RAWMAN')dnl
+define(`confDONT_INSTALL_CATMAN', `')dnl # for 8.12
+define(`confMANDOC', `')dnl # for 8.9.3
+define(`confNROFF', `cat')dnl # for 8.9.3
+define(`confNO_STATISTICS_INSTALL')dnl
+#
+# flags
+#
+# Tests (should be temporary)
+#
diff --git a/debian/build/update_chaos.in b/debian/build/update_chaos.in
new file mode 100644
index 0000000..96e323c
--- /dev/null
+++ b/debian/build/update_chaos.in
@@ -0,0 +1,202 @@
+#!/bin/sh
+#-----------------------------------------------------------------------------
+# $Sendmail: update_chaos,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Debian script to rationalize builds for Sendmail @sm_version@@sm_revision@(@sm_math@)
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+#------------------------------------------------------------------
+# Exit, stage left, even... if not needed (private dir, or >= 8.10.0)
+#------------------------------------------------------------------
+BUILD_TREE='@srcdir@/../../build-tree/sendmail-@sm_version@';
+if [ ! -d ${BUILD_TREE} ]; then
+ exit 0;
+ fi;
+if [ -d ${BUILD_TREE}/devtools/bin ]; then
+ exit 0;
+ fi;
+
+echo "Rationalizing Sendmail-@sm_version@ setup...";
+
+#------------------------------------------------------------------
+# List of subdirectories to work on
+#------------------------------------------------------------------
+SUBDIRS="editmap libmilter mail.local mailstats
+ makemap praliases rmail sendmail smrsh vacation";
+
+#------------------------------------------------------------------
+# Match Sendmail's build directory conventions
+#------------------------------------------------------------------
+os=`uname -s | sed -e 's/\//-/g' -e 's/ //g'`;
+rel=`uname -r | sed -e 's/(/-/g' -e 's/)//g'`;
+arch=`uname -m | sed -e 's/ //g'`;
+OBJ_DIR="obj.${os}.${rel}.${arch}";
+
+#------------------------------------------------------------------
+# Function to escape quotes (to survive subsequent sed)
+#------------------------------------------------------------------
+esq () {
+ result=$(echo "${1}" | sed -e 's?\"?\\\\\\\"?g');
+ };
+
+#------------------------------------------------------------------
+# Prior to 8.10.0, sendmail source was in the src directory
+# Prior to 8.10.0, devtools was called BuildTools
+# Create compatibility links (to look like 8.10.0+)
+#------------------------------------------------------------------
+if [ ! -d ${BUILD_TREE}/sendmail ]; then
+ echo "...Creating \${BUILD_TREE}/sendmail compatibility symlink";
+ ln -sf src ${BUILD_TREE}/sendmail;
+ if [ ! -d ${BUILD_TREE}/devtools ]; then
+ echo "...Creating \${BUILD_TREE}/devtools compatibility symlink";
+ ln -sf BuildTools ${BUILD_TREE}/devtools;
+ fi;
+ fi;
+
+#------------------------------------------------------------------
+# Prior to 8.10.0, objects were in the source directories, not separate
+# Create compatibility links (to look like 8.10.0+)
+#------------------------------------------------------------------
+echo "...Creating ${OBJ_DIR}/<dir> directories";
+mkdir -p ${BUILD_TREE}/${OBJ_DIR};
+for subdir in $SUBDIRS; do
+ if [ -d ${BUILD_TREE}/${subdir} ]; then
+ ln -sf "../${subdir}/${OBJ_DIR}" \
+ ${BUILD_TREE}/${OBJ_DIR}/${subdir};
+ fi;
+ done;
+
+#------------------------------------------------------------------
+# If 8.9.0+, we're done, get the flock outa here...
+#------------------------------------------------------------------
+if [ -e ${BUILD_TREE}/sendmail/Build ]; then
+ echo '...Done.';
+ exit 0;
+ fi;
+
+#------------------------------------------------------------------
+# Prior to 8.9.0, READ_ME was seen in a few places
+# Create compatibility links
+#------------------------------------------------------------------
+echo '...Creating READ_ME compatility symlinks';
+for file in $(find ${BUILD_TREE} -name 'READ_ME'); do
+ ln -sf READ_ME $(echo "${file}" | sed -e 's/READ_ME/README/');
+ done;
+
+#------------------------------------------------------------------
+# Prior to 8.9.0, MAKE was used instead of Build
+# We'll install a small wrapper for the earlier releases
+# Prior to 8.9.0, Only src directory had an obj.* subdirectory
+# Create compatibility links (to look like 8.9.0+)
+#------------------------------------------------------------------
+echo "...Creating <dir>/${OBJ_DIR}";
+for subdir in $SUBDIRS; do
+ if [ -d ${BUILD_TREE}/${subdir} ]; then
+ if [ ! -d ${BUILD_TREE}/${subdir}/Makefiles ]; then
+ mkdir -p ${BUILD_TREE}/${subdir}/${OBJ_DIR};
+ for file in `find ${BUILD_TREE}/${subdir} -type f`; do
+ cp -a $file ${BUILD_TREE}/${subdir}/${OBJ_DIR};
+ done;
+ fi;
+ cp -a debian/build/Build ${BUILD_TREE}/${subdir}/;
+ fi;
+ done;
+#
+#------------------------------------------------------------------
+# Kluge the Makefiles to comply with our file locations.
+#------------------------------------------------------------------
+echo '...Kluging Makefiles';
+for file in mailstats/Makefile.dist \
+ mail.local/Makefile.dist \
+ makemap/Makefile.dist \
+ praliases/Makefile.dist \
+ smrsh/Makefile.dist \
+ src/Makefiles/Makefile.Linux \
+ ; do
+ cp -a ${BUILD_TREE}/${file} ${BUILD_TREE}/${file}.save;
+ #
+ # Set local variables to allow for quoting...
+ esq "@sm_incdirs@";
+ sm_incdirs=$result;
+ esq "@sm_mapdef@";
+ sm_mapdef=$result;
+ esq "@sm_envdef@";
+ sm_envdef=$result;
+ esq "@sm_libs@";
+ sm_libs=$result;
+ #
+ # global
+ sed \
+ -e 's?-I/usr/sww/include??' \
+ -e 's?-I/usr/local/include??' \
+ -e 's?-L/usr/sww/lib??' \
+ -e 's?../src?../../src?g' \
+ -e "s?^INCDIRS=\(.*\)\$?INCDIRS=\1 $sm_incdirs?" \
+ -e "s?^DBMDEF=.*?DBMDEF=$sm_mapdef?" \
+ -e "s?^ENVDEF=\(.*\)\$?ENVDEF=\1 $sm_envdef?" \
+ -e "s?^LIBS=.*?LIBS=$sm_libs?" \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+ #
+ # compilation/link
+ sed \
+ -e 's?^O=.*?O=@CFLAGS@?' \
+ -e 's?^LIBDIRS=.*?LIBDIRS=?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+
+ #
+ # paths, owners, and modes
+ # Note: EBINDIR deserves a better home, suggestions?
+ sed \
+ -e 's?^BINDIR=.*?BINDIR=${DESTDIR}@sbindir@?' \
+ -e 's?^BINMODE=.*?BINMODE=04755?' \
+ -e 's?^BINGRP=.*?BINGRP=mail?' \
+ -e 's?^BINOWN=.*?BINOWN=root?' \
+ -e 's?^HFDIR=.*?HFDIR=${DESTDIR}@sysconfdir@/mail?' \
+ -e 's?^STDIR=.*?STDIR=${DESTDIR}@localstatedir@/lib/sendmail?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+
+ if [ "${file}" = 'mail.local/Makefile.dist' \
+ -o "${file}" = 'smrsh/Makefile.dist' \
+ ]; then
+ sed \
+ -e 's?^BINDIR=.*?BINDIR=${DESTDIR}@libexecdir@?' \
+ -e 's?^BINMODE=.*?BINMODE=04755?' \
+ -e 's?^BINGRP=.*?BINGRP=mail?' \
+ -e 's?^BINOWN=.*?BINOWN=root?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ echo 'force-install: install' >> ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+
+ elif [ "${file}" = 'mailstats/Makefile.dist' \
+ -o "${file}" = 'makemap/Makefile.dist' \
+ -o "${file}" = 'praliases/Makefile.dist' \
+ ]; then
+ sed \
+ -e 's?^BINDIR=.*?BINDIR=${DESTDIR}@sbindir@?' \
+ -e 's?^BINMODE=.*?BINMODE=0755?' \
+ -e 's?^BINGRP=.*?BINGRP=mail?' \
+ -e 's?^BINOWN=.*?BINOWN=root?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+ fi;
+
+ # For most directories, replace Makefile with our updated Makefile.dist
+ if [ "${file}" != 'src/Makefiles/Makefile.Linux' ]; then
+ cp ${BUILD_TREE}/${file} \
+ $(dirname "${BUILD_TREE}/${file}")/${OBJ_DIR}/Makefile;
+ fi;
+ done;
+
+echo '...Done.';
diff --git a/debian/build/version.c b/debian/build/version.c
new file mode 100644
index 0000000..c54b2b6
--- /dev/null
+++ b/debian/build/version.c
@@ -0,0 +1 @@
+char Version[] = "8.12.7";