forked from Lainports/freebsd-ports
make the default location of running directory of saslauthd
customizable by SASLAUTHD_RUNPATH variable. PR: ports/66521
This commit is contained in:
parent
895a5f3714
commit
f6d66d8cb6
4 changed files with 32 additions and 16 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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%%
|
||||
|
|
|
|||
|
|
@ -52,7 +52,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
|
||||
|
|
@ -182,6 +182,8 @@ CONFIGURE_ENV+= LOCALBASE=${LOCALBASE} \
|
|||
OPENSSLLIB=${OPENSSLLIB} \
|
||||
LDFLAGS=${LDFLAGS}
|
||||
|
||||
SASLAUTHD_RUNPATH?= /var/state/saslauthd
|
||||
|
||||
CYRUS_USER?= cyrus
|
||||
CYRUS_GROUP?= cyrus
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue