[BACK]Return to make_SMTPAUTH_sendmail CVS log [TXT][DIR] Up to [local] / openbsd / update_openbsd

File: [local] / openbsd / update_openbsd / make_SMTPAUTH_sendmail (download)

Revision 1.8, Fri May 6 21:33:30 2011 UTC (13 years ago) by andrew
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +3 -3 lines

put the sendmail binary into /usr/release where it is useful

#!/bin/sh
# $AFresh1: make_SMTPAUTH_sendmail,v 1.8 2011/05/06 21:33:30 andrew Exp $

pkg_info -e cyrus-sasl-* > /dev/null
if [ $? -ne 0 ]; then
	echo Installing cyrus-sasl
	$SUDO pkg_add -i cyrus-sasl
	if [ $? -ne 0 ]; then
		exit
	fi
fi

export MAKECONF

local _tempfile
local _oldmakeconf=$MAKECONF
if [ X"$MAKECONF" == X"" ]; then
	MAKECONF=/etc/mk.conf
fi

grep -q ^WANT_SMTPAUTH=[Yy][Ee][Ss] $MAKECONF
if [ $? -ne 0 ]; then
	_tempfile=`mktemp`
	cat $MAKECONF > $_tempfile
	echo WANT_SMTPAUTH=Yes >> $_tempfile

	MAKECONF=$_tempfile
fi

mv -f sendmail-smtp_auth.gz sendmail-smtp_auth.gz.old

cd /usr/src/gnu/usr.sbin/sendmail/
echo Making sendmail
make clean 
make obj
make depend
make

gzip -o /usr/release/sendmail-smtp_auth.gz sendmail/obj/sendmail
make clean

if [ X"$_tempfile" != X"" ]; then
	rm -f $_tempfile
fi
MAKECONF=$_oldmakeconf

echo sendmail with SMTPAUTH is now in /usr/release/sendmail-smtp_auth.gz