summaryrefslogtreecommitdiff
path: root/mail/qpopper
diff options
context:
space:
mode:
authortaca <taca>2001-07-26 15:43:28 +0000
committertaca <taca>2001-07-26 15:43:28 +0000
commit4cd935f2c0c20540ebefccf3b4c05e1e2418179a (patch)
tree8b78f5fa981b16826a5b8d1d65df59ab78ad7529 /mail/qpopper
parenta404e131aa0e110a8ba7f33d56fe95c15c9abdc6 (diff)
downloadpkgsrc-4cd935f2c0c20540ebefccf3b4c05e1e2418179a.tar.gz
- Utilize bulidlink frame work for openssl dependency.
- Use INSTALL/DEINSTALL script rather than post-intall/pre-install work.
Diffstat (limited to 'mail/qpopper')
-rw-r--r--mail/qpopper/Makefile39
-rw-r--r--mail/qpopper/Makefile.common17
-rw-r--r--mail/qpopper/pkg/DEINSTALL22
-rw-r--r--mail/qpopper/pkg/INSTALL38
4 files changed, 86 insertions, 30 deletions
diff --git a/mail/qpopper/Makefile b/mail/qpopper/Makefile
index 26ea01a75c4..2a31c26665d 100644
--- a/mail/qpopper/Makefile
+++ b/mail/qpopper/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2001/06/10 15:08:40 taca Exp $
+# $NetBSD: Makefile,v 1.29 2001/07/26 15:43:28 taca Exp $
#
DISTNAME= qpopper${VERSION}
@@ -16,15 +16,18 @@ COMMENT= Qualcomm's POP server for Eudora
VERSION= 4.0.3
+DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INSTALL_FILE= ${WRKDIR}/INSTALL
+
.include "Makefile.common"
.if exists(/usr/sbin/user)
-USER_CMD= /usr/sbin/user
-GROUP_CMD= /usr/sbin/group
+USER_CMD= /usr/sbin/user
+GROUP_CMD= /usr/sbin/group
.else
-DEPENDS+= user>=20000313:../../sysutils/user
-USER_CMD= ${LOCALBASE}/sbin/user
-GROUP_CMD= ${LOCALBASE}/sbin/group
+DEPENDS+= user>=20000313:../../sysutils/user
+USER_CMD= ${LOCALBASE}/sbin/user
+GROUP_CMD= ${LOCALBASE}/sbin/group
.endif
pre-build:
@@ -32,19 +35,27 @@ pre-build:
${WRKSRC}/man/popper.8 > ${WRKSRC}/man/popper.8.$$ && \
${MV} -f ${WRKSRC}/man/popper.8.$$ ${WRKSRC}/man/popper.8
+post-build:
+ for FILE in DEINSTALL INSTALL; do \
+ ${SED} -e 's|@BINGRP@|${BINGRP}|g' \
+ -e 's|@CHGRP@|${CHGRP}|g' \
+ -e 's|@CHOWN@|${CHOWN}|g' \
+ -e 's|@DB_SUFFIX@|${DB_SUFFIX}|g' \
+ -e 's|@USER_CMD@|${USER_CMD}|g' \
+ -e 's|@QPOPPER_USER@|${QPOPPER_USER}|g' \
+ -e 's|@PKG_PREFIX@|${PREFIX}|g' \
+ -e 's|@QPOPPER_APOP_AUTH@|${QPOPPER_APOP_AUTH}|g' \
+ -e 's|@INSTALL_DATA@|${INSTALL_DATA}|g' \
+ < ${PKGDIR}/$${FILE} > ${WRKDIR}/$${FILE}; \
+ done
+
pre-install:
- @${USER_CMD} info -e ${QPOPPER_USER} || \
- ${USER_CMD} add -g ${BINGRP} \
- -d /nonexistent -s /sbin/nologin ${QPOPPER_USER}
+ PKG_PREFIX=${LOCALBASE} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
post-install:
- @if [ -f ${DESTDIR}/etc/apop.auth.db ]; then \
- ${CHOWN} ${QPOPPER_USER} ${DESTDIR}/etc/apop.auth.db; \
- ${CHGRP} ${BINGRP} ${DESTDIR}/etc/apop.auth.db; \
- fi
${INSTALL_DATA} ${WRKSRC}/License.txt ${LOCALBASE}/share/doc/qpopper.License
${INSTALL_DATA} ${WRKSRC}/samples/qpopper.config \
${LOCALBASE}/share/examples
- @${SETENV} PKG_PREFIX=${LOCALBASE} ${SH} ${INSTALL_FILE}
+ PKG_PREFIX=${LOCALBASE} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/qpopper/Makefile.common b/mail/qpopper/Makefile.common
index 26c076c3670..abee5d1a59d 100644
--- a/mail/qpopper/Makefile.common
+++ b/mail/qpopper/Makefile.common
@@ -1,24 +1,23 @@
-# $NetBSD: Makefile.common,v 1.2 2001/07/26 12:25:55 taca Exp $
+# $NetBSD: Makefile.common,v 1.3 2001/07/26 15:43:28 taca Exp $
GNU_CONFIGURE= yes
-USE_SSL= yes
CONFIGURE_ARGS+= --libexecdir=${LOCALBASE}/libexec \
--sysconfdir=${LOCALBASE}/etc \
- --enable-apop=/etc/apop.auth \
+ --enable-apop=${QPOPPER_APOP_AUTH} \
--with-popuid=${QPOPPER_USER} \
--enable-log-facility=LOG_${QPOPPER_FAC} \
--disable-update-abort --without-gdbm
-.if exists(${LOCALBASE}/include/openssl/ssl.h)
-CONFIGURE_ARGS+= --with-openssl=${LOCALBASE}
-.else
-CONFIGURE_ARGS+= --with-openssl=/usr
-.endif
QPOPPER_USER?= pop
QPOPPER_FAC?= LOCAL1
+QPOPPER_APOP_AUTH?= /etc/apop.auth
+DB_SUFFIX?= db
.include "../../mk/bsd.prefs.mk"
+USE_BUILDLINK_ONLY= # defined
+CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_DIR}
+
.if defined(KERBEROS)
USE_KERBEROS= # defined
CONFIGURE_ARGS+= --enable-kerberos
@@ -32,3 +31,5 @@ CONFIGURE_ARGS+= --enable-servermode
.if defined(USE_INET6) && ${USE_INET6} == YES
CONFIGURE_ENV+= O_DEFS="${O_DEFS}" CFLAGS="-DINET6"
.endif
+
+.include "../../security/openssl/buildlink.mk"
diff --git a/mail/qpopper/pkg/DEINSTALL b/mail/qpopper/pkg/DEINSTALL
new file mode 100644
index 00000000000..dbb3a6b397d
--- /dev/null
+++ b/mail/qpopper/pkg/DEINSTALL
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1 2001/07/26 15:43:29 taca Exp $
+#
+
+PKGNAME=$1
+STAGE=$2
+
+QPOPPER_USER=@QPOPPER_USER@
+
+case "${STAGE}" in
+DEINSTALL)
+ cat <<EOF
+===========================================================================
+
+If you won't be using ${PKGNAME} any longer, you may want to remove
+user "${QPOPPER_USER}".
+
+===========================================================================
+EOF
+ ;;
+esac
diff --git a/mail/qpopper/pkg/INSTALL b/mail/qpopper/pkg/INSTALL
index d828dea257a..21826722e84 100644
--- a/mail/qpopper/pkg/INSTALL
+++ b/mail/qpopper/pkg/INSTALL
@@ -1,18 +1,40 @@
-#! /bin/sh
+#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.3 1998/08/07 11:09:54 agc Exp $
+# $NetBSD: INSTALL,v 1.4 2001/07/26 15:43:29 taca Exp $
#
-case "$2" in
- ""|POST-INSTALL) cat <<EOF
-=================================================================
+PKGNAME=$1
+STAGE=$2
+
+BINGRP=@BINGRP@
+CHGRP=@CHGRP@
+CHOWN=@CHOWN@
+DB_SUFFIX=@DB_SUFFIX@
+PKG_PREFIX=@PKG_PREFIX@
+QPOPPER_APOP_AUTH=@QPOPPER_APOP_AUTH@.${DB_SUFFIX}
+QPOPPER_USER=@QPOPPER_USER@
+USER_CMD="@USER_CMD@"
+
+case "${STAGE}" in
+PRE-INSTALL)
+ ${USER_CMD} info -e ${QPOPPER_USER} ||
+ ${USER_CMD} add -g ${BINGRP} \
+ -d /nonexistent -s /sbin/nologin ${QPOPPER_USER}
+ ;;
+POST-INSTALL)
+ if [ -f ${QPOPPER_APOP_AUTH} ]; then \
+ ${CHOWN} ${QPOPPER_USER} ${QPOPPER_APOP_AUTH}; \
+ ${CHGRP} ${BINGRP} ${QPOPPER_APOP_AUTH}; \
+ fi
+ cat <<EOF
+===========================================================================
In order to enable POP service, you should add the following line
to your /etc/inetd.conf:
- pop3 stream tcp nowait root ${PKG_PREFIX}/libexec/qpopper qpopper -s
+ pop3 stream tcp nowait root ${PKG_PREFIX}/libexec/qpopper qpopper -s
-=================================================================
+===========================================================================
EOF
- ;;
+ ;;
esac