[csw-devel] SF.net SVN: gar:[19847] csw/mgar/pkg/courier-imap/trunk
wilbury at users.sourceforge.net
wilbury at users.sourceforge.net
Sat Dec 8 00:13:35 CET 2012
Revision: 19847
http://gar.svn.sourceforge.net/gar/?rev=19847&view=rev
Author: wilbury
Date: 2012-12-07 23:13:35 +0000 (Fri, 07 Dec 2012)
Log Message:
-----------
courier-imap/trunk: Add SMF, some minor tweaks
Modified Paths:
--------------
csw/mgar/pkg/courier-imap/trunk/Makefile
csw/mgar/pkg/courier-imap/trunk/files/cswcourier-imap.xml
Added Paths:
-----------
csw/mgar/pkg/courier-imap/trunk/files/cswcourier-imap
Modified: csw/mgar/pkg/courier-imap/trunk/Makefile
===================================================================
--- csw/mgar/pkg/courier-imap/trunk/Makefile 2012-12-07 14:43:37 UTC (rev 19846)
+++ csw/mgar/pkg/courier-imap/trunk/Makefile 2012-12-07 23:13:35 UTC (rev 19847)
@@ -14,10 +14,13 @@
SF_PROJECT = courier/imap
DISTFILES = $(DISTNAME).tar.bz2
DISTFILES += cswcourier-imap.xml
+DISTFILES += svc-cswcourier-imap
PACKAGING_PLATFORMS = solaris10-i386 solaris10-sparc
sysconfdir = /etc/opt/csw/courier-imap
+localstatedir = /var/opt/csw/courier-imap
+datadir = /opt/csw/share/courier-imap
CONFIGURE_ARGS = $(DIRPATHS)
CONFIGURE_ARGS += --disable-root-check
@@ -43,10 +46,12 @@
OBSOLETED_BY_CSWcourier-imap += CSWcourierimap
EXTRA_LIB = $(prefix)/lib/courier-authlib
+INITSMF = /etc/opt/csw/init.d/cswcourier-imap
+
TEST_SCRIPTS =
MIGRATE_SOURCE_DIR_CSWcourier-imap = $(prefix)/etc/courier-imap
-MIGRATE_DEST_DIR_CSWcourier-imap = $(sysconfdir)/courier-imap
+MIGRATE_DEST_DIR_CSWcourier-imap = $(sysconfdir)
PRESERVECONF += imapd
PRESERVECONF += pop3d
@@ -57,3 +62,11 @@
include gar/category.mk
+post-install-modulated:
+ @/opt/csw/bin/ginstall -d -m 755 $(DESTDIR)/etc/opt/csw/init.d
+ @/opt/csw/bin/ginstall -d -m 755 $(DESTDIR)/var/opt/csw/svc/manifest/network
+ @/opt/csw/bin/ginstall -d -m 755 $(DESTDIR)/etc/opt/csw/pkg/CSW$(NAME)
+ @/opt/csw/bin/ginstall -m 755 $(FILEDIR)/cswcourier-imap $(DESTDIR)/$(INITSMF)
+ @/opt/csw/bin/ginstall -m 644 $(FILEDIR)/cswcourier-imap.xml $(DESTDIR)/var/opt/csw/svc/manifest/network/cswcourier-imap.xml
+ @$(MAKECOOKIE)
+
Added: csw/mgar/pkg/courier-imap/trunk/files/cswcourier-imap
===================================================================
--- csw/mgar/pkg/courier-imap/trunk/files/cswcourier-imap (rev 0)
+++ csw/mgar/pkg/courier-imap/trunk/files/cswcourier-imap 2012-12-07 23:13:35 UTC (rev 19847)
@@ -0,0 +1,127 @@
+#!/bin/sh
+#
+# This is the /etc/init.d file for Courier-IMAP
+# Modified for CSW
+#
+# description: Courier-IMAP - IMAP server
+#
+
+if [ -f /lib/svc/share/smf_include.sh ]
+then
+. /lib/svc/share/smf_include.sh
+fi
+
+prefix=/opt/csw
+exec_prefix=/opt/csw
+bindir=${exec_prefix}/bin
+sbindir=${exec_prefix}/sbin
+
+case "$1" in
+start)
+ cd /
+ . /etc/opt/csw/courier-imap/imapd
+
+ printf "Starting Courier-IMAP server:"
+
+ case x$IMAPDSTART in
+ x[yY]*)
+ # Start daemons.
+ /opt/csw/libexec/courier-imap/imapd.rc start
+ printf "\n imap"
+ ;;
+ esac
+
+ . /etc/opt/csw/courier-imap/imapd-ssl
+ case x$IMAPDSSLSTART in
+ x[yY]*)
+ if test -x $COURIERTLS
+ then
+
+ # First time we start this, generate a dummy SSL certificate.
+
+ if test ! -f $TLS_CERTFILE
+ then
+ printf "\n generating-SSL-certificate..."
+ /opt/csw/share/courier-imap/mkimapdcert >/dev/null 2>&1
+ fi
+ /opt/csw/libexec/courier-imap/imapd-ssl.rc start
+ printf "\n imap-ssl"
+ fi
+ ;;
+ esac
+
+ POP3DSTART=""
+ POP3DSSLSTART=""
+
+ if test -f /etc/opt/csw/courier-imap/pop3d
+ then
+ . /etc/opt/csw/courier-imap/pop3d
+ fi
+
+ case x$POP3DSTART in
+ x[yY]*)
+ # Start daemons.
+ /opt/csw/libexec/courier-imap/pop3d.rc start
+ printf "\n pop3"
+ ;;
+ esac
+
+ if test -f /etc/opt/csw/courier-imap/pop3d-ssl
+ then
+ . /etc/opt/csw/courier-imap/pop3d-ssl
+ fi
+
+ case x$POP3DSSLSTART in
+ x[yY]*)
+ if test -x $COURIERTLS
+ then
+
+ # First time we start this, generate a dummy SSL certificate.
+
+ if test ! -f $TLS_CERTFILE
+ then
+ printf "\n generating-SSL-certificate..."
+ /opt/csw/share/courier-imap/mkpop3dcert >/dev/null 2>&1
+ fi
+ /opt/csw/libexec/courier-imap/pop3d-ssl.rc start
+ printf "\n pop3-ssl"
+ fi
+ ;;
+ esac
+
+ echo ""
+ ;;
+stop)
+ printf "Stopping Courier-IMAP server:"
+ . /etc/opt/csw/courier-imap/imapd
+ . /etc/opt/csw/courier-imap/imapd-ssl
+ /opt/csw/libexec/courier-imap/imapd.rc stop
+ printf "\n imap"
+ if test -x $COURIERTLS
+ then
+ /opt/csw/libexec/courier-imap/imapd-ssl.rc stop
+ printf "\n imap-ssl"
+ fi
+
+ if test -f /etc/opt/csw/courier-imap/pop3d
+ then
+ /opt/csw/libexec/courier-imap/pop3d.rc stop
+ printf "\n pop3"
+
+ if test -x $COURIERTLS
+ then
+ /opt/csw/libexec/courier-imap/pop3d-ssl.rc stop
+ printf "\n pop3-ssl"
+ fi
+ fi
+
+ echo ""
+ ;;
+restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+esac
+exit 0
+
Modified: csw/mgar/pkg/courier-imap/trunk/files/cswcourier-imap.xml
===================================================================
(Binary files differ)
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