[csw-devel] SF.net SVN: gar:[5753] csw/mgar/pkg/sendmail/trunk

valholla at users.sourceforge.net valholla at users.sourceforge.net
Thu Jul 30 21:24:21 CEST 2009


Revision: 5753
          http://gar.svn.sourceforge.net/gar/?rev=5753&view=rev
Author:   valholla
Date:     2009-07-30 19:24:21 +0000 (Thu, 30 Jul 2009)

Log Message:
-----------
updates

Modified Paths:
--------------
    csw/mgar/pkg/sendmail/trunk/Makefile
    csw/mgar/pkg/sendmail/trunk/checksums
    csw/mgar/pkg/sendmail/trunk/files/site.config.m4

Added Paths:
-----------
    csw/mgar/pkg/sendmail/trunk/files/cswsendmail
    csw/mgar/pkg/sendmail/trunk/files/patch-CC-M.m4

Modified: csw/mgar/pkg/sendmail/trunk/Makefile
===================================================================
--- csw/mgar/pkg/sendmail/trunk/Makefile	2009-07-30 19:21:18 UTC (rev 5752)
+++ csw/mgar/pkg/sendmail/trunk/Makefile	2009-07-30 19:24:21 UTC (rev 5753)
@@ -1,39 +1,106 @@
 GARNAME = sendmail
 GARVERSION = 8.14.3
-CATEGORIES = apps
+CATEGORIES = server
 
 DESCRIPTION = Sendmail MTA
 define BLURB
+  XXX anacronism ;-) need text here
 endef
 
 MASTER_SITES = ftp://ftp.sendmail.org/pub/sendmail/
 DISTFILES  = $(GARNAME).$(GARVERSION).tar.gz
 
-PACKAGES = CSWsendmail
-CATALOGNAME_CSWsendmail = sendmail
-SPKG_DESC_CSWsendmail = $(DESCRIPTION)
-SPKG_SOURCEURL = http://www.sendmail.org/
+# We define upstream file regex so we can be notifed of new upstream software release
+UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
 
-REQUIRED_PKGS_CSWsendmail  = CSWolddaprt CSWsasl CSWosslrt CSWbdb
+# If the url used to check for software update is different of MASTER_SITES, then 
+# uncomment the next line. Otherwise it is set by default to the value of MASTER_SITES
+# UPSTREAM_MASTER_SITES = 
 
-# We define upstream file regex so we can be notifed of 
-# new upstream software release
-UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2
+# we require
+REQUIRED_PKGS = CSWbdb CSWoldaprt CSWosslrt CSWsasl CSWtcpwrap
 
-STRIP_LIBTOOL = 1
+# patch away GNUism
+PATCHFILES = patch-CC-M.m4
 
-DISTFILES += site.config.m4
+CONFIGURE_SCRIPTS = custom
+BUILD_SCRIPTS     = custom
+TEST_SCRIPTS      = custom
+INSTALL_SCRIPTS   = custom
 
-CONFIGURE_SCRIPTS  = custom
-BUILD_SCRIPTS  = custom
+PRESERVECONF  = $(sysconfdir)/mail/aliases.CSW
+PRESERVECONF += $(sysconfdir)/mail/sendmail.cf.CSW
+PRESERVECONF += $(sysconfdir)/mail/submit.cf.CSW
+PRESERVECONF += $(sysconfdir)/mail/local-host-names.CSW
+PRESERVECONF += $(sysconfdir)/mail/trusted-users.CSW
+PRESERVECONF += $(sysconfdir)/mail/statistics.CSW
 
 include gar/category.mk
 
+OBJDIR    = $(WORKDIR)/$(DISTNAME)/obj.SunOS.`uname -r`.`uname -i`
+LIBFILES  = sendmail/sendmail mail.local/mail.local smrsh/smrsh rmail/rmail
+BINFILES  = vacation/vacation
+SBINFILES = makemap/makemap editmap/editmap praliases/praliases \
+            mailstats/mailstats
+MANFILES1 = sendmail/mailq.1 sendmail/newaliases.1 vacation/vacation.1
+MANFILES5 = sendmail/aliases.5
+MANFILES8 = sendmail/sendmail.8 mailstats/mailstats.8 makemap/makemap.8 \
+            praliases/praliases.8 smrsh/smrsh.8 mail.local/mail.local.8 \
+            rmail/rmail.8 editmap/editmap.8
+
 configure-custom:
-	@( cp $(DOWNLOADDIR)/site.config.m4 $(WORKSRC)/devtools/Site/ )
 	@$(MAKECOOKIE)
 
 build-custom:
-	@gmake -C $(WORKSRC) fresh
+	sed 's,%CFLAGS%,$(CFLAGS),;s,%OCSWCC%,$(CC),' $(FILEDIR)/site.config.m4 > \
+		$(WORKDIR)/$(DISTNAME)/devtools/Site/site.config.m4
+	cd $(WORKDIR)/$(DISTNAME) && ./Build
 	@$(MAKECOOKIE)
 
+test-custom:
+	@$(MAKECOOKIE)
+
+install-custom:
+	@# install the binaries
+	ginstall -d -m 755 $(DESTDIR)$(libdir)
+	( for file in $(LIBFILES) ; do \
+		ginstall -m 755 $(OBJDIR)/$$file $(DESTDIR)$(libdir) ; \
+		done )
+	ginstall -d -m 755 $(DESTDIR)$(bindir)
+	ginstall -m 755 $(OBJDIR)/$(BINFILES) $(DESTDIR)$(bindir)
+	ginstall -d -m 755 $(DESTDIR)$(sbindir)
+	ginstall -d -m 755 $(DESTDIR)$(mandir)
+	( for file in $(SBINFILES) ; do \
+		ginstall -m 755 $(OBJDIR)/$$file $(DESTDIR)$(sbindir) ; \
+		done )
+	@# install manpages
+	( for file in $(MANFILES1) ; do \
+		ginstall -d -m 755 $(DESTDIR)$(mandir)/1 ; \
+		ginstall -m 644 $(OBJDIR)/$$file $(DESTDIR)$(mandir)/1 ; \
+		done )
+	( for file in $(MANFILES5) ; do \
+		ginstall -d -m 755 $(DESTDIR)$(mandir)/5 ; \
+		ginstall -m 644 $(OBJDIR)/$$file $(DESTDIR)$(mandir)/5 ; \
+		done )
+	( for file in $(MANFILES8) ; do \
+		ginstall -d -m 755 $(DESTDIR)$(mandir)/8 ; \
+		ginstall -m 644 $(OBJDIR)/$$file $(DESTDIR)$(mandir)/8 ; \
+		done )
+	@# install m4/cf macros
+	ginstall -d -m 755 $(DESTDIR)$(sharedstatedir)/mail
+	find $(WORKDIR)/$(DISTNAME)/cf -type f -exec chmod 644 {} +
+	cp -r $(WORKDIR)/$(DISTNAME)/cf $(DESTDIR)$(sharedstatedir)/mail
+	@# install startup script
+	ginstall -d -m 0755 $(DESTDIR)/etc/opt/csw/init.d
+	cp -p $(FILEDIR)/cswsendmail $(DESTDIR)/etc/opt/csw/init.d
+	@# install configurations, XXX missing submit.cf/sendmail.cf
+	ginstall -d -m 0755 $(DESTDIR)$(etcdir)/mail
+	ginstall -m 644 $(WORKDIR)/$(DISTNAME)/sendmail/aliases \
+		$(DESTDIR)$(etcdir)/mail/aliases.CSW
+	ginstall -m 644 $(OBJDIR)/sendmail/statistics \
+		$(DESTDIR)$(etcdir)/mail/statistics.CSW
+	ginstall -m 644 $(OBJDIR)/sendmail/helpfile \
+		$(DESTDIR)$(etcdir)/mail/helpfile.CSW
+	touch $(DESTDIR)$(etcdir)/mail/trusted-users.CSW \
+		$(DESTDIR)$(etcdir)/mail/local-host-names.CSW
+	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/sendmail/trunk/checksums
===================================================================
--- csw/mgar/pkg/sendmail/trunk/checksums	2009-07-30 19:21:18 UTC (rev 5752)
+++ csw/mgar/pkg/sendmail/trunk/checksums	2009-07-30 19:24:21 UTC (rev 5753)
@@ -1,2 +1,2 @@
+95c787a371c63caebc5d76faddba08e4  download/patch-CC-M.m4
 a5ee5d26e1f546a2da5fb9a513bd6bce  download/sendmail.8.14.3.tar.gz
-008b0a8f2f3a94ee6e12fe3045a07583  download/site.config.m4

Added: csw/mgar/pkg/sendmail/trunk/files/cswsendmail
===================================================================
--- csw/mgar/pkg/sendmail/trunk/files/cswsendmail	                        (rev 0)
+++ csw/mgar/pkg/sendmail/trunk/files/cswsendmail	2009-07-30 19:24:21 UTC (rev 5753)
@@ -0,0 +1,111 @@
+#!/sbin/sh
+#
+# Copyright (c) 1992 - 2001 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#ident	"@(#)sendmail	1.19	01/12/05 SMI"
+# Modified for CSW by Alex Moore 01/01/2004
+
+ERRMSG1='WARNING: /var/mail is NFS-mounted without setting actimeo=0,'
+ERRMSG2='this can cause mailbox locking and access problems.'
+SERVER_PID_FILE="/var/run/sendmail.pid"
+CLIENT_PID_FILE="/opt/csw/var/spool/clientmqueue/sm-client.pid"
+DEFAULT_FILE="/opt/csw/etc/default/sendmail"
+ALIASES_FILE="/opt/csw/etc/mail/aliases"
+CSW_DIR="/opt/csw"
+
+check_queue_interval_syntax()
+{
+	default="15m"
+	if [ $# -lt 1 ]; then
+		answer=$default
+		return
+	fi
+	if echo $1 | egrep '^([0-9]*[1-9][0-9]*[smhdw])+$' >/dev/null 2>&1; then		answer=$1
+	else
+		answer=$default
+	fi
+}
+
+case "$1" in 
+'restart')
+	[ -f $SERVER_PID_FILE ] && kill -1 `head -1 $SERVER_PID_FILE`
+	[ -f $CLIENT_PID_FILE ] && kill -1 `head -1 $CLIENT_PID_FILE`
+	;;
+
+'start')
+	if [ -f $CSW_DIR/lib/sendmail -a -f $CSW_DIR/etc/mail/sendmail.cf ]; then
+		if [ ! -d $CSW_DIR/var/spool/mqueue ]; then
+			/usr/bin/mkdir -m 0750 $CSW_DIR/var/spool/mqueue
+			/usr/bin/chown root:bin $CSW_DIR/var/spool/mqueue
+		fi
+		if [ ! -f $ALIASES_FILE.db ] && [ ! -f $ALIASES_FILE.dir ] \
+		    && [ ! -f $ALIASES_FILE.pag ]; then
+			$CSW_DIR/bin/newaliases
+		fi
+		MODE="-bd"
+		[ -f $DEFAULT_FILE ] && . $DEFAULT_FILE
+		#
+		# * MODE should be "-bd" or null (MODE= or MODE="") or
+		#   left alone.  Anything else and you're on your own.
+		# * QUEUEOPTION should be "p" or null (as above).
+		# * [CLIENT]QUEUEINTERVAL should be set to some legal value;
+		#   sanity checks are done below.
+		# * [CLIENT]OPTIONS are catch-alls; set with care.
+		#
+		if [ -n "$QUEUEOPTION" -a "$QUEUEOPTION" != "p" ]; then
+			QUEUEOPTION=""
+		fi
+		if [ -z "$QUEUEOPTION" -o -n "$QUEUEINTERVAL" ]; then
+			check_queue_interval_syntax $QUEUEINTERVAL
+			QUEUEINTERVAL=$answer
+		fi
+		check_queue_interval_syntax $CLIENTQUEUEINTERVAL
+		CLIENTQUEUEINTERVAL=$answer
+		$CSW_DIR/lib/sendmail -L sm-mta $MODE -q$QUEUEOPTION$QUEUEINTERVAL $OPTIONS &
+		$CSW_DIR/lib/sendmail -L sm-msp -Ac -q$CLIENTQUEUEINTERVAL $CLIENTOPTIONS &
+		#
+		# ETRN_HOSTS should be of the form
+		# "s1:c1.1,c1.2        s2:c2.1 s3:c3.1,c3.2,c3.3"
+		# i.e., white-space separated groups of server:client where
+		# client can be one or more comma-separated names; N.B. that
+		# the :client part is optional; see etrn(1M) for details.
+		# server is the name of the server to prod; a mail queue run
+		# is requested for each client name.  This is comparable to
+		# running "/usr/lib/sendmail -qRclient" on the host server.
+		#
+		# See RFC 1985 for more information.
+		#
+		for i in $ETRN_HOSTS; do
+			SERVER=`echo $i | /usr/bin/sed -e 's/:.*$//'`
+			CLIENTS=`echo $i | /usr/bin/sed -n -e 's/,/ /g' \
+			    -e '/:/s/^.*://p'`
+			/usr/sbin/etrn $SERVER $CLIENTS >/dev/null 2>&1 &
+		done
+	fi	
+
+	if /usr/bin/nawk 'BEGIN{s = 1}
+	    $2 == "/var/mail" && $3 == "nfs" && $4 !~ /actimeo=0/ &&
+	    $4 !~ /noac/{s = 0} END{exit s}' /etc/mnttab; then
+
+		/usr/bin/logger -p mail.crit "$ERRMSG1"
+		/usr/bin/logger -p mail.crit "$ERRMSG2"
+	fi
+	;;
+
+'stop')
+	[ -f $SERVER_PID_FILE ] && kill `head -1 $SERVER_PID_FILE`
+	if [ -f $CLIENT_PID_FILE ]; then
+		kill `head -1 $CLIENT_PID_FILE`
+		rm -f $CLIENT_PID_FILE
+	fi
+	/usr/bin/pkill -x -u 0 sendmail
+	;;
+
+*)
+	echo "Usage: $0 { start | stop | restart }"
+	exit 1
+	;;
+esac
+exit 0
+

Added: csw/mgar/pkg/sendmail/trunk/files/patch-CC-M.m4
===================================================================
--- csw/mgar/pkg/sendmail/trunk/files/patch-CC-M.m4	                        (rev 0)
+++ csw/mgar/pkg/sendmail/trunk/files/patch-CC-M.m4	2009-07-30 19:24:21 UTC (rev 5753)
@@ -0,0 +1,10 @@
+--- sendmail-8.14.3.orig/devtools/M4/depend/CC-M.m4	1999-05-28 00:03:28.000000000 +0200
++++ sendmail-8.14.3/devtools/M4/depend/CC-M.m4	2009-07-30 17:49:02.234202786 +0200
+@@ -3,6 +3,6 @@
+ 	@mv Makefile Makefile.old
+ 	@sed -e '/^# Do not edit or remove this line or anything below it.$$/,$$d' < Makefile.old > Makefile
+ 	@echo "# Do not edit or remove this line or anything below it." >> Makefile
+-	${CC} -M ${COPTS} ${SRCS} >> Makefile
++	${CC} -xM ${COPTS} ${SRCS} >> Makefile
+ 
+ #	End of $RCSfile: CC-M.m4,v $

Modified: csw/mgar/pkg/sendmail/trunk/files/site.config.m4
===================================================================
--- csw/mgar/pkg/sendmail/trunk/files/site.config.m4	2009-07-30 19:21:18 UTC (rev 5752)
+++ csw/mgar/pkg/sendmail/trunk/files/site.config.m4	2009-07-30 19:24:21 UTC (rev 5753)
@@ -1,30 +1,72 @@
-define(`confCC', `/opt/studio/SOS11/SUNWspro/bin/cc')
-define(`confLDOPTS_SO', `-G')
-define(`confLDOPTS', `-L/opt/csw/lib -R/opt/csw/lib')
-define(`confBEFORE', `sysexits.h')
-define(`confMAPDEF', `-DNEWDB -DNIS -DNISPLUS -DMAP_REGEX -DLDAPMAP')
-define(`confENVDEF', `-DSOLARIS=20800 -DNETINET6 -DSM_CONF_LDAP_MEMFREE')
-define(`confSM_OS_HEADER', `sm_os_sunos')
-define(`confLIBS', `-lsocket -lnsl')
-define(`confMTCCOPTS', `-D_REENTRANT') 
-define(`confMTLDOPTS', `-lpthread')
-define(`confSBINGRP', `sys')
-define(`confINSTALL', `${BUILDBIN}/install.sh')
-define(`confDEPEND_TYPE', `CC-M')
-define(`confINCDIRS', `-I/opt/csw/include -I/opt/csw/include/sasl')
-define(`confLIBDIRS', `-L/opt/csw/lib')
-define(`confMBINDIR', `/opt/csw/lib')
-define(`confEBINDIR', `/opt/csw/lib')
-define(`confUBINDIR', `/opt/csw/bin')
-define(`confSBINDIR', `/opt/csw/sbin')
-define(`confSTDIR', `/opt/csw/etc/mail')
-define(`confSHAREDLIBDIR', `/opt/csw/lib')
-define(`confMANROOT', `/opt/csw/share/man/cat')
-define(`confMANROOTMAN', `/opt/csw/share/man/man')
-define(`confLIBSEARCHPATH', `/opt/csw/lib/\$ISALIST /opt/csw/lib')
-define(`confLIBSEARCH', `db bind wrap ldap')
-APPENDDEF(`conf_sendmail_ENVDEF', `-DSTARTTLS')
-APPENDDEF(`conf_sendmail_LIBS', `-lssl -lcrypto') 
-APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL') 
-APPENDDEF(`conf_sendmail_LIBS', `-lsasl2') 
+dnl adapted site.config.m4 from the REV=2007.12.17 build
 
+dnl ### we are using SUN Studio and OpenCSW
+define(`confCC', `%OCSWCC%')
+APPENDDEF(`confCCOPTS', `%CFLAGS%')
+define(`confEBINDIR',`/opt/csw/lib')
+define(`confMANROOT',`/usr/csw/share/man')
+define(`confMANROOTMAN',`/usr/csw/share/man')
+define(`confMBINDIR',`/opt/csw/bin')
+define(`confSBINDIR',`/opt/csw/sbin')
+define(`confUBINDIR',`/opt/csw/bin')
+define(`confNO_STATISTICS_INSTALL',`True')
+define(`confHFDIR', `/opt/csw/share/mail')
+
+dnl ### add OpenCSW lib and include directories
+APPENDDEF(`confLIBDIRS', `-L/opt/csw/lib -R/opt/csw/lib')
+APPENDDEF(`confINCDIRS', `-I/opt/csw/include')
+APPENDDEF(`conf_sendmail_ENVDEF', `-I/opt/csw/include')
+dnl we should not need this..
+dnl APPENDDEF(`confLIBDIRS', `-L/opt/csw/bdb44/lib -R/opt/csw/bdb44/lib')
+dnl APPENDDEF(`confINCDIRS', `-I/opt/csw/bdb44/include')
+
+dnl ### add NIS/NIS+ support
+APPENDDEF(`confENVDEF', `-DNIS')
+APPENDDEF(`confENVDEF', `-DNISPLUS')
+
+dnl ### add LDAP support
+APPENDDEF(`conf_libsm_ENVDEF', `-DLDAPMAP')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DLDAPMAP')
+
+dnl ### add SASL support
+APPENDDEF(`conf_sendmail_ENVDEF', `-DSASL=2')
+APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_TLS_1')
+APPENDDEF(`conf_sendmail_LIBS', `-lsasl2')
+
+dnl ### add STARTTLS support
+APPENDDEF(`confENVDEF',`-DSTARTTLS')
+APPENDDEF(`confLIBS', `-lssl -lcrypto')
+
+dnl ### add because they were already compiled in
+APPENDDEF(`confENVDEF', `-DSOCKETMAP')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DTCPWRAPPERS')
+APPENDDEF(`conf_sendmail_LIBS', `-lwrap')"
+APPENDDEF(`conf_sendmail_ENVDEF', `-DNETINET6')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DNETINET6')
+APPENDDEF(`conf_libsm_ENVDEF', `-I/opt/csw/include')
+APPENDDEF(`conf_libsm_ENVDEF', `-DLDAPMAP')
+APPENDDEF(`conf_libsm_LIBS', `-lldap')
+APPENDDEF(`conf_libsm_LIBS', `-llber')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DLDAPMAP')
+APPENDDEF(`conf_sendmail_LIBS', `-lldap')
+APPENDDEF(`conf_sendmail_LIBS', `-llber')
+APPENDDEF(`conf_editmap_LIBS', `-lldap')
+APPENDDEF(`conf_editmap_LIBS', `-llber')
+APPENDDEF(`conf_mail_local_LIBS', `-lldap')
+APPENDDEF(`conf_mail_local_LIBS', `-llber')
+APPENDDEF(`conf_mailstats_LIBS', `-lldap')
+APPENDDEF(`conf_mailstats_LIBS', `-llber')
+APPENDDEF(`conf_makemap_LIBS', `-lldap')
+APPENDDEF(`conf_makemap_LIBS', `-llber')
+APPENDDEF(`conf_praliases_LIBS', `-lldap')
+APPENDDEF(`conf_praliases_LIBS', `-llber')
+APPENDDEF(`conf_rmail_LIBS', `-lldap')
+APPENDDEF(`conf_smrsh_LIBS', `-lldap')
+APPENDDEF(`conf_smrsh_LIBS', `-llber')
+APPENDDEF(`conf_vacation_LIBS', `-lldap')
+APPENDDEF(`conf_vacation_LIBS', `-llber')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DMILTER')
+APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
+APPENDDEF(`conf_sendmail_ENVDEF', `-D_FFR_TLS_1')
+APPENDDEF(`conf_libmilter_ENVDEF', `-DSM_CONF_POLL=1')
+APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_WORKERS_POOL=1')


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list