pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/courier-authlib + Add full DESTDIR support.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ffab92c13832
branches:  trunk
changeset: 538751:ffab92c13832
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Feb 18 20:26:33 2008 +0000

description:
+ Add full DESTDIR support.

+ Create any required directories with the right ownership and permissions
  as a "prestart" action in the authdaemond rc.d script.

Bump the PKGREVISION to 1.

diffstat:

 security/courier-authlib/Makefile             |  26 +++++++++++++++-----------
 security/courier-authlib/files/authdaemond.sh |  23 +++++++++++++++++++----
 security/courier-authlib/options.mk           |  24 ++++++++++++------------
 3 files changed, 46 insertions(+), 27 deletions(-)

diffs (158 lines):

diff -r 7bd8d8a83d5e -r ffab92c13832 security/courier-authlib/Makefile
--- a/security/courier-authlib/Makefile Mon Feb 18 18:22:18 2008 +0000
+++ b/security/courier-authlib/Makefile Mon Feb 18 20:26:33 2008 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.27 2007/10/31 14:22:55 jlam Exp $
+# $NetBSD: Makefile,v 1.28 2008/02/18 20:26:33 jlam Exp $
 
 .include "Makefile.common"
 
 DISTNAME=      courier-authlib-0.60.2
+PKGREVISION=   1
 CATEGORIES=    security
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=courier/}
 EXTRACT_SUFX=  .tar.bz2
@@ -18,6 +19,8 @@
 
 #LICENSE=      gnu-gpl-v3
 
+PKG_DESTDIR_SUPPORT=   user-destdir
+
 USE_LIBTOOL=           yes
 PKG_SYSCONFSUBDIR=     authlib
 
@@ -78,7 +81,8 @@
 .endfor
 
 .for _file_ in ${AUTHLIB_PLIST}
-GENERATE_PLIST+=       ${TEST} -f ${PREFIX}/${_file_} && ${ECHO} "${_file_}";
+GENERATE_PLIST+=       ${TEST} -f ${DESTDIR}${PREFIX}/${_file_} &&     \
+                       ${ECHO} "${_file_}";
 .endfor
 .if !empty(AUTHLIB_PLIST:M${AUTHEXAMPLEDIR}/*)
 GENERATE_PLIST+=       ${ECHO} "@dirrm ${AUTHEXAMPLEDIR}";
@@ -92,16 +96,16 @@
 post-install: ${POST_INSTALL_TARGETS}
 
 post-install-common:
-       ${INSTALL_DATA_DIR} ${EGDIR}
-       ${INSTALL_SCRIPT} ${WRKSRC}/sysconftool ${PREFIX}/sbin
-       ${INSTALL_DATA_DIR} ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/INSTALL.html ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/README.authdebug.html ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/README.html ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/README_authlib.html ${DOCDIR}
+       ${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
+       ${INSTALL_SCRIPT} ${WRKSRC}/sysconftool ${DESTDIR}${PREFIX}/sbin
+       ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/INSTALL.html ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/README.authdebug.html ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/README.html ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/README_authlib.html ${DESTDIR}${DOCDIR}
 
 post-install-authdaemon:
-       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${EGDIR}/authdaemonrc.dist
-       ${CHMOD} ${SHAREMODE} ${EGDIR}/authdaemonrc.dist
+       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${DESTDIR}${EGDIR}/authdaemonrc.dist
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${EGDIR}/authdaemonrc.dist
 
 .include "../../mk/bsd.pkg.mk"
diff -r 7bd8d8a83d5e -r ffab92c13832 security/courier-authlib/files/authdaemond.sh
--- a/security/courier-authlib/files/authdaemond.sh     Mon Feb 18 18:22:18 2008 +0000
+++ b/security/courier-authlib/files/authdaemond.sh     Mon Feb 18 20:26:33 2008 +0000
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: authdaemond.sh,v 1.2 2005/02/21 17:08:39 jlam Exp $
+# $NetBSD: authdaemond.sh,v 1.3 2008/02/18 20:26:33 jlam Exp $
 #
 # Courier user authentication daemon
 #
@@ -16,10 +16,25 @@
 pidfile="@AUTHDAEMONVAR@/pid"
 required_files="@PKG_SYSCONFDIR@/authdaemonrc"
 
-start_cmd="courier_doit start"
-stop_cmd="courier_doit stop"
+start_cmd="authdaemond_doit start"
+stop_cmd="authdaemond_doit stop"
 
-courier_doit()
+mkdir_perms()
+{
+       dir="$1"; user="$2"; group="$3"; mode="$4"
+       @TEST@ -d $dir || @MKDIR@ $dir
+       @CHOWN@ $user $dir
+       @CHGRP@ $group $dir
+       @CHMOD@ $mode $dir
+}
+
+authdaemond_prestart()
+{
+       mkdir_perms @AUTHDAEMONVAR@ \
+               @COURIER_USER@ @COURIER_GROUP@ 0750
+}
+
+authdaemond_doit()
 {
        action=$1
        case ${action} in
diff -r 7bd8d8a83d5e -r ffab92c13832 security/courier-authlib/options.mk
--- a/security/courier-authlib/options.mk       Mon Feb 18 18:22:18 2008 +0000
+++ b/security/courier-authlib/options.mk       Mon Feb 18 20:26:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.10 2006/05/31 18:22:25 ghen Exp $
+# $NetBSD: options.mk,v 1.11 2008/02/18 20:26:33 jlam Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.courier-authlib
 PKG_SUPPORTED_OPTIONS= pam bdb ldap mysql pgsql
@@ -24,7 +24,7 @@
 POST_INSTALL_TARGETS+= post-install-pipe
 
 post-install-pipe:
-       ${INSTALL_SCRIPT} ${WRKSRC}/samplepipe.pl ${EGDIR}
+       ${INSTALL_SCRIPT} ${WRKSRC}/samplepipe.pl ${DESTDIR}${EGDIR}
 
 ###
 ### PAM authentication
@@ -72,10 +72,10 @@
 POST_INSTALL_TARGETS+= post-install-ldap
 
 post-install-ldap:
-       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${EGDIR}/authldaprc.dist
-       ${CHMOD} ${SHAREMODE} ${EGDIR}/authldaprc.dist
-       ${INSTALL_DATA} ${WRKSRC}/README.ldap ${DOCDIR}
-       ${INSTALL_DATA} ${WRKSRC}/authldap.schema ${EGDIR}
+       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${DESTDIR}${EGDIR}/authldaprc.dist
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${EGDIR}/authldaprc.dist
+       ${INSTALL_DATA} ${WRKSRC}/README.ldap ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/authldap.schema ${DESTDIR}${EGDIR}
 .else
 CONFIGURE_ARGS+=       --without-authldap
 .endif
@@ -93,9 +93,9 @@
 POST_INSTALL_TARGETS+= post-install-mysql
 
 post-install-mysql:
-       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${EGDIR}/authmysqlrc.dist
-       ${CHMOD} ${SHAREMODE} ${EGDIR}/authmysqlrc.dist
-       ${INSTALL_DATA} ${WRKSRC}/README.authmysql.html ${DOCDIR}
+       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${DESTDIR}${EGDIR}/authmysqlrc.dist
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${EGDIR}/authmysqlrc.dist
+       ${INSTALL_DATA} ${WRKSRC}/README.authmysql.html ${DESTDIR}${DOCDIR}
 .else
 CONFIGURE_ARGS+=       --without-authmysql
 .endif
@@ -118,9 +118,9 @@
 POST_INSTALL_TARGETS+= post-install-pgsql
 
 post-install-pgsql:
-       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${EGDIR}/authpgsqlrc.dist
-       ${CHMOD} ${SHAREMODE} ${EGDIR}/authpgsqlrc.dist
-       ${INSTALL_DATA} ${WRKSRC}/README.authpostgres.html ${DOCDIR}
+       ${CHOWN} ${SHAREOWN}:${SHAREGRP} ${DESTDIR}${EGDIR}/authpgsqlrc.dist
+       ${CHMOD} ${SHAREMODE} ${DESTDIR}${EGDIR}/authpgsqlrc.dist
+       ${INSTALL_DATA} ${WRKSRC}/README.authpostgres.html ${DESTDIR}${DOCDIR}
 .else
 CONFIGURE_ARGS+=       --without-authpgsql
 .endif



Home | Main Index | Thread Index | Old Index