diff options
author | ume <ume@FreeBSD.org> | 2004-05-13 00:12:11 +0800 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2004-05-13 00:12:11 +0800 |
commit | 655c19bb141163ba4ef9334987d705c71cca2254 (patch) | |
tree | 849d8e8a47ed1670a3500233e1dc45229eb81b6a /security/cyrus-sasl2-saslauthd | |
parent | 9d47f4be622fb5e25a93f9a7daf655f538a29776 (diff) | |
download | freebsd-ports-gnome-655c19bb141163ba4ef9334987d705c71cca2254.tar.gz freebsd-ports-gnome-655c19bb141163ba4ef9334987d705c71cca2254.tar.zst freebsd-ports-gnome-655c19bb141163ba4ef9334987d705c71cca2254.zip |
make the default location of running directory of saslauthd
customizable by SASLAUTHD_RUNPATH variable.
PR: ports/66521
Diffstat (limited to 'security/cyrus-sasl2-saslauthd')
-rw-r--r-- | security/cyrus-sasl2-saslauthd/Makefile | 24 | ||||
-rw-r--r-- | security/cyrus-sasl2-saslauthd/files/saslauthd.sh | 6 | ||||
-rw-r--r-- | security/cyrus-sasl2-saslauthd/pkg-plist | 14 |
3 files changed, 29 insertions, 15 deletions
diff --git a/security/cyrus-sasl2-saslauthd/Makefile b/security/cyrus-sasl2-saslauthd/Makefile index c0749b346dd0..4ff1a4817b99 100644 --- a/security/cyrus-sasl2-saslauthd/Makefile +++ b/security/cyrus-sasl2-saslauthd/Makefile @@ -42,7 +42,7 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \ --enable-auth-sasldb \ --with-openssl=${OPENSSLBASE} \ --with-rc4=openssl \ - --with-saslauthd + --with-saslauthd=${SASLAUTHD_RUNPATH} .if defined(WITH_BDB_VER) .if ${WITH_BDB_VER} == 3 @@ -111,15 +111,22 @@ CONFIGURE_ENV+= LOCALBASE=${LOCALBASE} \ OPENSSLLIB=${OPENSSLLIB} \ LDFLAGS=${LDFLAGS} +SASLAUTHD_RUNPATH?= /var/state/saslauthd +.if ${SASLAUTHD_RUNPATH} != /var/state/saslauthd +RUNPATH= "@comment " +.endif + CYRUS_USER?= cyrus DOCS= AUTHORS COPYING ChangeLog INSTALL LDAP_SASLAUTHD NEWS README PLIST_SUB= PREFIX=${PREFIX} \ - DOCSDIR=${DOCSDIR:S/^${PREFIX}\///} + DOCSDIR=${DOCSDIR:S/^${PREFIX}\///} \ + RUNPATH=${RUNPATH} RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ - RC_SUBR=${RC_SUBR} + RC_SUBR=${RC_SUBR} \ + SASLAUTHD_RUNPATH=${SASLAUTHD_RUNPATH} do-build: @${RM} -f ${WRKSRC}/saslauthd/saslauthd.8 @@ -131,8 +138,15 @@ post-install: @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${FILESDIR}/saslauthd.sh > ${PREFIX}/etc/rc.d/saslauthd.sh @${CHMOD} 755 ${PREFIX}/etc/rc.d/saslauthd.sh - ${MKDIR} -m 770 /var/state/saslauthd - ${CHOWN} ${CYRUS_USER}:mail /var/state/saslauthd +.if ${SASLAUTHD_RUNPATH} != /var/state/saslauthd + @${ECHO_MSG} "" + @${ECHO_MSG} "SASLAUTHD_RUNPATH was specified." + @${ECHO_MSG} "Make sure to have ${SASLAUTHD_RUNPATH} by yourself." + @${ECHO_MSG} "" +.else + ${MKDIR} -m 770 ${SASLAUTHD_RUNPATH} + ${CHOWN} ${CYRUS_USER}:mail ${SASLAUTHD_RUNPATH} +.endif .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR}/saslauthd .for file in ${DOCS} diff --git a/security/cyrus-sasl2-saslauthd/files/saslauthd.sh b/security/cyrus-sasl2-saslauthd/files/saslauthd.sh index c212409d83da..7f7baa3f7536 100644 --- a/security/cyrus-sasl2-saslauthd/files/saslauthd.sh +++ b/security/cyrus-sasl2-saslauthd/files/saslauthd.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/security/cyrus-sasl2-saslauthd/files/Attic/saslauthd.sh,v 1.4 2004-03-31 16:32:17 ume Exp $ +# $FreeBSD: /tmp/pcvs/ports/security/cyrus-sasl2-saslauthd/files/Attic/saslauthd.sh,v 1.5 2004-05-12 16:12:11 ume Exp $ # # PROVIDE: saslauthd @@ -23,7 +23,7 @@ prefix=%%PREFIX%% # saslauthd_enable=${saslauthd_enable:-"NO"} # Enable saslauthd saslauthd_flags=${saslauthd_flags:-"-a pam"} # Flags to saslauthd program -#saslauthd_runpath="/var/state/saslauthd" # Working directory +#saslauthd_runpath="%%SASLAUTHD_RUNPATH%%" # Working directory #saslauthd_program="${prefix}/sbin/saslauthd" # Location of saslauthd . %%RC_SUBR%% @@ -35,7 +35,7 @@ command="${prefix}/sbin/${name}" load_rc_config $name if [ -z "$saslauthd_runpath" ]; then - pidfile="/var/state/${name}/${name}.pid" + pidfile="%%SASLAUTHD_RUNPATH%%/${name}.pid" flags="${saslauthd_flags}" else pidfile="${saslauthd_runpath}/${name}.pid" diff --git a/security/cyrus-sasl2-saslauthd/pkg-plist b/security/cyrus-sasl2-saslauthd/pkg-plist index bb42660dfcab..5eae85807b93 100644 --- a/security/cyrus-sasl2-saslauthd/pkg-plist +++ b/security/cyrus-sasl2-saslauthd/pkg-plist @@ -9,11 +9,11 @@ sbin/saslauthd %%PORTDOCS%%%%DOCSDIR%%/saslauthd/NEWS %%PORTDOCS%%%%DOCSDIR%%/saslauthd/README %%PORTDOCS%%@dirrm %%DOCSDIR%%/saslauthd -@mode ug=rwx,o= -@exec mkdir -p /var/state/saslauthd -@exec chown -R cyrus:mail /var/state/saslauthd -@exec chmod -R ug=rwx,o= /var/state/saslauthd -@comment This file gets created by the state/saslauthd program -@unexec rm -fr /var/state/saslauthd -@unexec rmdir /var/state +%%RUNPATH%%@mode ug=rwx,o= +%%RUNPATH%%@exec mkdir -p /var/state/saslauthd +%%RUNPATH%%@exec chown -R cyrus:mail /var/state/saslauthd +%%RUNPATH%%@exec chmod -R ug=rwx,o= /var/state/saslauthd +%%RUNPATH%%@comment This file gets created by the state/saslauthd program +%%RUNPATH%%@unexec rm -fr /var/state/saslauthd +%%RUNPATH%%@unexec rmdir /var/state @cwd %%PREFIX%% |