summaryrefslogtreecommitdiff
path: root/misc/jitterbug
diff options
context:
space:
mode:
authorwennmach <wennmach>1999-10-11 13:39:03 +0000
committerwennmach <wennmach>1999-10-11 13:39:03 +0000
commit2e2a7a4abaffa59393a33cf23f75976a4b3ae2fb (patch)
tree13b3c1f811a0fa4cfad0aaf7ca37cd062477fc4c /misc/jitterbug
parent3f37fd70770d0ed124dd55a10a6d5354a7736e0f (diff)
downloadpkgsrc-2e2a7a4abaffa59393a33cf23f75976a4b3ae2fb.tar.gz
Fixed some minor problems of this pkg, including:
o do not require $JB_PACKAGE to be set to a bug category; if $JB_PACKAGE is not set, the default category "test" is used o the above will also fix the error messages on nbftp occuring in update-distfiles (hi veego!) o make proper use of "DEINSTALL" and "MESSAGE" files so that installing (and deinstalling) of jitterbug from pkgsrc/as binary makes no difference o when echoing the defaults for JB_USER, JB_USERID, etc, use the actual variables, not hardcoded values o ownership of jitterbig.config fixed (@JB_USER@ instead of root)
Diffstat (limited to 'misc/jitterbug')
-rw-r--r--misc/jitterbug/Makefile73
-rw-r--r--misc/jitterbug/pkg/DEINSTALL27
-rw-r--r--misc/jitterbug/pkg/MESSAGE (renamed from misc/jitterbug/files/POSTINSTALL)4
-rw-r--r--misc/jitterbug/pkg/PLIST31
-rw-r--r--misc/jitterbug/pkg/REQ3
5 files changed, 84 insertions, 54 deletions
diff --git a/misc/jitterbug/Makefile b/misc/jitterbug/Makefile
index 193a7cf1a47..54166384ad7 100644
--- a/misc/jitterbug/Makefile
+++ b/misc/jitterbug/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 1999/10/05 12:37:18 wennmach Exp $
+# $NetBSD: Makefile,v 1.2 1999/10/11 13:39:03 wennmach Exp $
DISTNAME= jitterbug-1.6.2
WRKSRC= ${WRKDIR}/${PKGNAME}/source
@@ -13,16 +13,18 @@ DEPENDS+= apache-1.3.*:../../www/apache
PLIST_SRC= ${WRKDIR}/PLIST.tmp
REQ_FILE= ${WRKDIR}/REQ
+DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+MESSAGE_FILE= ${WRKDIR}/MESSAGE
CONFIGDIR= ${WRKDIR}/${PKGNAME}/config
DOCSDIR= ${WRKDIR}/${PKGNAME}/docs
CGIBINDIR= libexec/cgi-bin
-JB_USER?= jitter
+JB_PACKAGE?= test
+JB_USER?= jitter
JB_USERID?= 509
JB_GROUP?= jitter
-
JB_GROUPID?= 509
JB_DATADIR= ${JB_USER}/${JB_PACKAGE}/bug_tracking
@@ -40,23 +42,28 @@ CONFIGURE_ARGS= --prefix=${PREFIX}
.include "../../mk/bsd.prefs.mk"
-fetch-depends:
-.if !defined(JB_PACKAGE)
+pre-extract:
+.if ${JB_PACKAGE} == "test"
@${ECHO}
- @${ECHO} "You must define the following environment variable:"
+ @${ECHO} "You should define the JB_PACKAGE environment variable:"
@${ECHO} "JB_PACKAGE -- the name of your bug category"
@${ECHO}
+ @${ECHO} "pkgsrc will build jitterbug with \$$JB_PACKAGE = \"test\""
+ @${ECHO} "so that you can easily evaluate this package."
+ @${ECHO} "If you decide to use jitterbug for a real application"
+ @${ECHO} "you can safly deinstall jitterbug and reinstall it with"
+ @${ECHO} "\$$JB_PACKAGE set to something more senseful."
+ @${ECHO}
@${ECHO} "You may override the following environment variables:"
- @${ECHO} "JB_USER -- jitterbug user (default 'jitter')"
- @${ECHO} "JB_USERID -- jitterbug user id (default 509)"
- @${ECHO} "JB_GROUP -- jitterbug group name (default 'jitter')"
- @${ECHO} "JB_GROUPID -- jitterbug group id (default 509)"
+ @${ECHO} "JB_USER -- jitterbug user (default='${JB_USER}')"
+ @${ECHO} "JB_USERID -- jitterbug user id (default=${JB_USERID})"
+ @${ECHO} "JB_GROUP -- jitterbug group name (default='${JB_GROUP}')"
+ @${ECHO} "JB_GROUPID -- jitterbug group id (default=${JB_GROUPID})"
@${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}
- @${FALSE}
.endif
.if (${JB_FQHOSTNAME} == ${JB_HOSTNAME})
@${ECHO} "Warning: Could not determine your fully qualified hostname."
@@ -64,8 +71,6 @@ fetch-depends:
@${ECHO}
@${FALSE}
.endif
-
-pre-extract:
@(case "X${JB_USER}" in \
Xbin|Xetc|Xinclude|Xinfo|Xlib|Xlibdata|Xlibexec|Xman|Xsbin|Xshare) \
gooduser=no; \
@@ -95,7 +100,7 @@ pre-install:
@${ECHO} "Arrrgggghhh. JB_USER not defined. Send-pr!"
@${FALSE}
.endif
- @${SED} \
+ @${SED} \
-e 's|@JB_USER@|${JB_USER}|g' \
-e 's|@JB_USERID@|${JB_USERID}|g' \
-e 's|@JB_GROUP@|${JB_GROUP}|g' \
@@ -107,7 +112,7 @@ pre-install:
-e 's|@FILESDIR@|${FILESDIR}|g' \
<${PKGDIR}/REQ \
>${REQ_FILE}
- @${SED} \
+ @${SED} \
-e 's|@JB_DATADIR@|${JB_DATADIR}|g' \
-e 's|@CGIBINDIR@|${CGIBINDIR}|g' \
-e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \
@@ -115,22 +120,29 @@ pre-install:
-e 's|@JB_GROUP@|${JB_GROUP}|g' \
<${PKGDIR}/PLIST \
>${PLIST_SRC}
- @${SED} \
+ @${SED} \
-e 's|@JB_USER@|${JB_USER}|g' \
<${FILESDIR}/jitterbug.auth \
>${WRKDIR}/jitterbug.auth
- @${SED} \
+ @${SED} \
-e 's|@JB_USER@|${JB_USER}|g' \
-e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \
-e 's|@PREFIX@|${PREFIX}|g' \
<${FILESDIR}/NEWPACKAGE \
>${WRKDIR}/NEWPACKAGE
- @${SED} \
+ @${SED} \
-e 's|@JB_USER@|${JB_USER}|g' \
-e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \
-e 's|@PREFIX@|${PREFIX}|g' \
- <${FILESDIR}/POSTINSTALL \
- >${WRKDIR}/POSTINSTALL
+ <${PKGDIR}/MESSAGE \
+ >${MESSAGE_FILE}
+ @${SED} \
+ -e 's|@JB_USER@|${JB_USER}|g' \
+ -e 's|@JB_GROUP@|${JB_GROUP}|g' \
+ -e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \
+ -e 's|@PREFIX@|${PREFIX}|g' \
+ <${PKGDIR}/DEINSTALL \
+ >${DEINSTALL_FILE}
${SH} ${REQ_FILE} ${PKGNAME} INSTALL
do-install:
@@ -183,7 +195,7 @@ do-install:
${WRKDIR}/jitterbug.auth ${PREFIX}/${JB_USER}/etc
${MKDIR} ${PREFIX}/${JB_USER}/doc
${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \
- ${WRKDIR}/POSTINSTALL ${PREFIX}/${JB_USER}/doc
+ ${MESSAGE_FILE} ${PREFIX}/${JB_USER}/doc/POSTINSTALL
${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \
${WRKDIR}/NEWPACKAGE ${PREFIX}/${JB_USER}/doc
${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \
@@ -192,9 +204,6 @@ do-install:
${DOCSDIR}/INSTALL ${PREFIX}/${JB_USER}/doc
${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \
${DOCSDIR}/JitterBug.txt ${PREFIX}/${JB_USER}/doc
- ${CHOWN} -R ${JB_USER} ${PREFIX}/${JB_USER}
- ${CHGRP} -R ${JB_GROUP} ${PREFIX}/${JB_USER}
- -${MKDIR} ${PREFIX}/etc/jitterbug
@${SED} \
-e 's|@JB_EMAIL@|${JB_EMAIL}|g' \
-e 's|@JB_DATADIR@|${JB_DATADIR}|g' \
@@ -203,6 +212,9 @@ do-install:
-e 's|@PREFIX@|${PREFIX}|g' \
<${FILESDIR}/jitterbug.config \
>${PREFIX}/${JB_CONFIGDIR}/jitterbug.config
+ ${CHOWN} -R ${JB_USER} ${PREFIX}/${JB_USER}
+ ${CHGRP} -R ${JB_GROUP} ${PREFIX}/${JB_USER}
+ -${MKDIR} ${PREFIX}/etc/jitterbug
[ -f ${PREFIX}/etc/jitterbug/${JB_PACKAGE} ] || \
${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \
${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \
@@ -212,17 +224,4 @@ do-install:
${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \
${PREFIX}/etc/jitterbug/${JB_PACKAGE}.private
-post-install:
-.if !defined(BATCH)
- @${ECHO} " "
- @${ECHO} "Please observe the following POSTINSTALL notes:"
- @${ECHO} "(POSTINSTALL is also installed in ${PREFIX}/${JB_USER}/doc)"
- @${ECHO} " "
- @${ECHO} "=============================================================================="
- @${CAT} ${WRKDIR}/POSTINSTALL
- @${ECHO} " "
- @${ECHO} "=============================================================================="
- @${ECHO} " "
-.endif
-
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/jitterbug/pkg/DEINSTALL b/misc/jitterbug/pkg/DEINSTALL
new file mode 100644
index 00000000000..081b24d5468
--- /dev/null
+++ b/misc/jitterbug/pkg/DEINSTALL
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 1999/10/11 13:39:33 wennmach Exp $
+
+JB_USER=@JB_USER@
+JB_GROUP=@JB_GROUP@
+JB_PACKAGE=@JB_PACKAGE@
+PREFIX=@PREFIX@
+
+PKG=$1
+STAGE=$2
+
+if [ "$STAGE" != "DEINSTALL" ];
+then
+ exit 0
+fi
+
+echo "If you are removing jitterbug permanently, you may wish to"
+echo " - remove user ${JB_USER}"
+echo " - remove group ${JB_GROUP}"
+echo " - rm -rf ${PREFIX}/${JB_USER}"
+echo " - rm -rf ${PREFIX}/etc/jitterbug"
+echo " - remove entries in ${PREFIX}/etc/httpd/httpd.conf"
+echo " - remove mail alias for ${JB_PACKAGE}-bugs in /etc/aliases"
+echo " and run newaliases"
+
+exit 0
diff --git a/misc/jitterbug/files/POSTINSTALL b/misc/jitterbug/pkg/MESSAGE
index 4ccf764dbbe..17d42293a75 100644
--- a/misc/jitterbug/files/POSTINSTALL
+++ b/misc/jitterbug/pkg/MESSAGE
@@ -1,3 +1,5 @@
+
+===============================================================================
Jitterbug now has successfully been installed on your system.
Before using jitterbug you should perform the following steps:
@@ -13,3 +15,5 @@ o Customize (if necessary)
o Customize the html documents in the project's bug tracking directory:
@PREFIX@/@JB_USER@/@JB_PACKAGE@/bug_tracking
+===============================================================================
+
diff --git a/misc/jitterbug/pkg/PLIST b/misc/jitterbug/pkg/PLIST
index 7d9918b7794..42c85580633 100644
--- a/misc/jitterbug/pkg/PLIST
+++ b/misc/jitterbug/pkg/PLIST
@@ -1,19 +1,22 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 1999/10/05 12:37:19 wennmach Exp $
+@comment $NetBSD: PLIST,v 1.2 1999/10/11 13:39:34 wennmach Exp $
@JB_USER@/config/footer.html
-@exec [ -f %D/@JB_DATADIR@/footer.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/footer.html
+@exec if [ ! -d %D/@JB_DATADIR@ ]; then /bin/mkdir -p %D/@JB_DATADIR@; fi
+@exec if [ ! -f %D/@JB_DATADIR@/footer.html ]; then /bin/cp -p %D/%F %D/@JB_DATADIR@/footer.html; fi
@JB_USER@/config/guest.prefs
-@exec [ -f %D/@JB_DATADIR@/guest.prefs ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/guest.prefs
+@exec if [ ! -f %D/@JB_DATADIR@/guest.prefs ]; then /bin/cp -p %D/%F %D/@JB_DATADIR@/guest.prefs; fi
@JB_USER@/config/guestintro.html
-@exec [ -f %D/@JB_DATADIR@/guestintro.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/guestintro.html
+@exec if [ ! -f %D/@JB_DATADIR@/guestintro.html ]; then /bin/cp -p %D/%F %D/@JB_DATADIR@/guestintro.html; fi
@JB_USER@/config/intro.html
-@exec [ -f %D/@JB_DATADIR@/intro.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/intro.html
+@exec if [ ! -f %D/@JB_DATADIR@/intro.html ]; then /bin/cp -p %D/%F %D/@JB_DATADIR@/intro.html; fi
@JB_USER@/config/reportform.html
-@exec [ -f %D/@JB_DATADIR@/reportform.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/reportform.html
+@exec if [ ! -f %D/@JB_DATADIR@/reportform.html ]; then /bin/cp -p %D/%F %D/@JB_DATADIR@/reportform.html; fi
@JB_USER@/config/users
-@exec [ -f %D/@JB_DATADIR@/users ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/users
+@exec if [ ! -f %D/@JB_DATADIR@/users ]; then /bin/cp -p %D/%F %D/@JB_DATADIR@/users; fi
@JB_USER@/config/jitterbug.config
-@exec [ -f %D/etc/jitterbug/@JB_PACKAGE@ ] || /bin/cp -p %D/%F %D/etc/jitterbug/@JB_PACKAGE@
-@exec [ -f %D/etc/jitterbug/@JB_PACKAGE@.private ] || /bin/cp -p %D/%F %D/etc/jitterbug/@JB_PACKAGE@.private
+@exec if [ ! -d %D/etc/jitterbug/@JB_PACKAGE@ ]; then /bin/mkdir -p %D/etc/jitterbug/@JB_PACKAGE@; fi
+@exec if [ ! -f %D/etc/jitterbug/@JB_PACKAGE@ ]; then /bin/cp -p %D/%F %D/etc/jitterbug/@JB_PACKAGE@; fi
+@exec if [ ! -f %D/etc/jitterbug/@JB_PACKAGE@.private ]; then /bin/cp -p %D/%F %D/etc/jitterbug/@JB_PACKAGE@.private; fi
+@exec if [ ! -d %D/@JB_USER@/etc ]; then /bin/mkdir -p %D/@JB_USER@/etc; fi
@exec [ -f %D/@JB_USER@/etc/jitterbug.auth ] || /bin/echo "@JB_USER@:*************" > %D/@JB_USER@/etc/jitterbug.auth
@JB_USER@/bin/new_message
@JB_USER@/bin/jitterbug
@@ -22,16 +25,10 @@
@JB_USER@/doc/CONFIG.txt
@JB_USER@/doc/INSTALL
@JB_USER@/doc/JitterBug.txt
+@exec /usr/sbin/chown -R @JB_USER@ %D/@JB_USER@
+@exec /usr/bin/chgrp -R @JB_GROUP@ %D/@JB_USER@
@dirrm @JB_USER@/bin
@dirrm @JB_USER@/doc
@dirrm @JB_USER@/config
@CGIBINDIR@/@JB_PACKAGE@
@CGIBINDIR@/@JB_PACKAGE@.private
-@unexec echo "If you are removing jitterbug permanently, you may wish to"
-@unexec echo " - remove user @JB_USER@"
-@unexec echo " - remove group @JB_GROUP@"
-@unexec echo " - rm -rf %D/@JB_USER@"
-@unexec echo " - rm -rf %D/etc/jitterbug"
-@unexec echo " - remove entries in %D/etc/httpd/httpd.conf"
-@unexec echo " - remove mail alias for @JB_PACKAGE@-bugs in /etc/aliases"
-@unexec echo " and run newaliases"
diff --git a/misc/jitterbug/pkg/REQ b/misc/jitterbug/pkg/REQ
index 45e012a6077..25ebc864a35 100644
--- a/misc/jitterbug/pkg/REQ
+++ b/misc/jitterbug/pkg/REQ
@@ -1,4 +1,6 @@
#!/bin/sh
+#
+# $NetBSD: REQ,v 1.2 1999/10/11 13:39:34 wennmach Exp $
JB_USER=@JB_USER@
JB_USERID=@JB_USERID@
@@ -77,3 +79,4 @@ else
echo " "
fi
fi
+exit 0