Revision: 3023 http://gar.svn.sourceforge.net/gar/?rev=3023&view=rev Author: skayser Date: 2009-02-09 12:16:00 +0000 (Mon, 09 Feb 2009)
Log Message: ----------- dovecot: fixed PROTOTYPE_FILTER, added preinstall for user creation, added STRIP_DIRS Modified Paths: -------------- csw/mgar/pkg/dovecot/trunk/Makefile csw/mgar/pkg/dovecot/trunk/checksums Added Paths: ----------- csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.preinstall Modified: csw/mgar/pkg/dovecot/trunk/Makefile =================================================================== --- csw/mgar/pkg/dovecot/trunk/Makefile 2009-02-09 00:30:58 UTC (rev 3022) +++ csw/mgar/pkg/dovecot/trunk/Makefile 2009-02-09 12:16:00 UTC (rev 3023) @@ -1,6 +1,4 @@ # TODO -# * postinstall: Create dovecot user(s) or advise user to do so -# * Create default config so that service can startup right away? # * Build and package Dovecot Sieve plugin http://wiki.dovecot.org/LDA/Sieve GARNAME = dovecot @@ -17,17 +15,19 @@ MASTER_SITES = http://dovecot.org/releases/1.1/ DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz -SPKG_SOURCEURL = http://dovecot.org/ +DISTFILES += CSWdovecot.preinstall PACKAGES = CSWdovecot CSWdovecotdevel CATALOGNAME_CSWdovecotdevel = dovecot_devel -SPKG_DESC_CSWdovecot = Secure IMAP server +SPKG_SOURCEURL = http://dovecot.org/ +SPKG_DESC_CSWdovecot = Secure IMAP server SPKG_DESC_CSWdovecotdevel = Dovecot secure IMAP server header files +SPKG_CLASSES_CSWdovecot = none cswcpsampleconf cswinitsmf REQUIRED_PKGS_CSWdovecot = CSWosslrt CSWmysql5rt CSWoldaprt REQUIRED_PKGS_CSWdovecot += CSWsasl CSWsqlite3 CSWzlib CSWlibnet -REQUIRED_PKGS_CSWdovecot += CSWcswclassutils +REQUIRED_PKGS_CSWdovecot += CSWbzip2 CSWiconv CSWcswclassutils REQUIRED_PKGS_CSWdovecotdevel = CSWdovecot PREREQUISITE_PKGS = CSWossldevel CSWosslrt @@ -59,10 +59,8 @@ EXTRA_LIB = /opt/csw/mysql5/lib/mysql EXTRA_INC = /opt/csw/mysql5/include/mysql -include gar/category.mk +STRIP_DIRS = $(DESTDIR)$(libexecdir)/dovecot -# init script / SMF integration -SPKG_CLASSES_CSWdovecot = none cswcpsampleconf cswinitsmf PROTOTYPE_FILTER = awk '\ $$$$3 ~ /\/init.d\/cswdovecot$$$$/ { $$$$2 = "cswinitsmf" } \ $$$$3 ~ /dovecot.pem.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \ @@ -71,6 +69,8 @@ $$$$3 == "/opt/csw/ssl/private" { next } \ { print }' +include gar/category.mk + post-install-modulated: DOCS = NEWS AUTHORS COPYING.LGPL COPYING.MIT post-install-modulated: DOCDEST = $(DESTDIR)$(docdir)/$(GARNAME) post-install-modulated: SSLDIR = $(DESTDIR)/opt/csw/ssl Modified: csw/mgar/pkg/dovecot/trunk/checksums =================================================================== --- csw/mgar/pkg/dovecot/trunk/checksums 2009-02-09 00:30:58 UTC (rev 3022) +++ csw/mgar/pkg/dovecot/trunk/checksums 2009-02-09 12:16:00 UTC (rev 3023) @@ -1 +1,2 @@ c973eb41aca79fb16630a16f0d84f765 download/dovecot-1.1.11.tar.gz +f8e71a5be649e71131cf1ad7ea11019a download/CSWdovecot.preinstall Added: csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.preinstall =================================================================== --- csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.preinstall (rev 0) +++ csw/mgar/pkg/dovecot/trunk/files/CSWdovecot.preinstall 2009-02-09 12:16:00 UTC (rev 3023) @@ -0,0 +1,29 @@ +#!/bin/sh + +# Test if the dovecot group exist, if not create it +getent group dovecot > /dev/null +if test $? -gt 0 +then + groupadd dovecot > /dev/null + if test $? -eq 0 + then + echo CSWdovecot postinstall: group dovecot has been added + else + echo CSWdovecot postinstall: ERROR: Failed to add group dovecot + exit 1 + fi +fi + +# Test if the dovecot user exist, if not create it +getent passwd dovecot > /dev/null +if test $? -gt 0 +then + useradd -c "Dovecot service user" -g dovecot -d /var/opt/csw/run/dovecot/login -s /bin/false dovecot > /dev/null + if test $? -eq 0 + then + echo CSWdovecot postinstall: user dovecot has been added + else + echo CSWdovecot postinstall: ERROR: Failed to add user dovecot + exit 1 + fi +fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ devel mailing list devel@lists.opencsw.org https://lists.opencsw.org/mailman/listinfo/devel