aboutsummaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2-saslauthd
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2004-05-12 16:12:11 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2004-05-12 16:12:11 +0000
commitf6d66d8cb6ca08c97dfaee3eadca773f4dd006f1 (patch)
tree9e3391f88912ef27bf6a715f4be603cfd49bcf4f /security/cyrus-sasl2-saslauthd
parent895a5f3714bb39aadf2a562dd89b9798ae2c3b52 (diff)
downloadports-f6d66d8cb6ca08c97dfaee3eadca773f4dd006f1.tar.gz
ports-f6d66d8cb6ca08c97dfaee3eadca773f4dd006f1.zip
Notes
Diffstat (limited to 'security/cyrus-sasl2-saslauthd')
-rw-r--r--security/cyrus-sasl2-saslauthd/Makefile24
-rw-r--r--security/cyrus-sasl2-saslauthd/files/saslauthd.sh6
-rw-r--r--security/cyrus-sasl2-saslauthd/pkg-plist14
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%%