summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorwennmach <wennmach>1999-10-26 16:38:09 +0000
committerwennmach <wennmach>1999-10-26 16:38:09 +0000
commit85c799a921dd6eec2f37e49efc1fd03756a18ed3 (patch)
tree58d9a12f7ec3087d68dc67d2d3651e5a37bdb655 /misc
parentc1e2609be9ac2d48e07919891037b6ee324ffbc0 (diff)
downloadpkgsrc-85c799a921dd6eec2f37e49efc1fd03756a18ed3.tar.gz
Make this pkg work even if 'hostname' does not return the fully qualified
hostname, without requiring the environment variable JB_FQHOSTNAME to be set. Should also work on Solaris.
Diffstat (limited to 'misc')
-rw-r--r--misc/jitterbug/Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/misc/jitterbug/Makefile b/misc/jitterbug/Makefile
index d257d3c1e9e..9b3d99c2d27 100644
--- a/misc/jitterbug/Makefile
+++ b/misc/jitterbug/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 1999/10/22 14:43:06 agc Exp $
+# $NetBSD: Makefile,v 1.4 1999/10/26 16:38:09 wennmach Exp $
DISTNAME= jitterbug-1.6.2
WRKSRC= ${WRKDIR}/${PKGNAME}/source
@@ -21,6 +21,12 @@ CGIBINDIR= libexec/cgi-bin
.include "../../mk/bsd.prefs.mk"
+.if exists(/usr/sbin/nslookup)
+NSLOOKUP= /usr/sbin/nslookup
+.elif exists(/usr/bin/nslookup)
+NSLOOKUP= /usr/bin/nslookup
+.endif
+
JB_PACKAGE?= test
JB_USER?= jitter
@@ -33,10 +39,11 @@ JB_DATADIR= ${JB_USER}/${JB_PACKAGE}/bug_tracking
JB_CONFIGDIR= ${JB_USER}/config
JB_LOCALMAIL?= ${JB_PACKAGE}-bugs
+
.if !defined(JB_FQHOSTNAME)
-JB_FQHOSTNAME!= hostname
+JB_HOSTNAME!= /bin/hostname
+JB_FQHOSTNAME!= ${NSLOOKUP} ${JB_HOSTNAME} | /usr/bin/grep Name: | /usr/bin/awk '{ print $$2 }'
.endif
-JB_HOSTNAME!= echo '${JB_FQHOSTNAME}' | sed -e 's|\..*||'
JB_EMAIL?= ${JB_LOCALMAIL}@${JB_FQHOSTNAME}
HAS_CONFIGURE= yes
@@ -62,7 +69,7 @@ pre-extract:
@${ECHO} "JB_FQHOSTNAME -- fully qualified host name"
@${ECHO} "JB_LOCALMAIL -- local mail alias for \$$JB_PACKAGE category."
@${ECHO} "jitterbug will send and receive e-mail for \$$JB_PACKAGE"
- @${ECHO} "as \$$JB_LOCALMAIL@\$$JB_FQHOSTNAME"
+ @${ECHO} "as '\$$JB_LOCALMAIL'@${JB_FQHOSTNAME}"
@${ECHO}
.endif
.if (${JB_FQHOSTNAME} == ${JB_HOSTNAME})