From 492ba86af98e70576e2085059dc5b49ab5cfa6ad Mon Sep 17 00:00:00 2001 From: rene Date: Mon, 7 Apr 2014 16:28:41 +0000 Subject: Fix typo in pkg-plist and sanitize creation/removal of (sample) configuration files. Prodded by: swills Approved by: (followup of r350186 and r350187) --- mail/qpopper/Makefile | 4 +--- mail/qpopper/pkg-install | 53 ------------------------------------------------ mail/qpopper/pkg-plist | 7 ++++--- 3 files changed, 5 insertions(+), 59 deletions(-) delete mode 100644 mail/qpopper/pkg-install diff --git a/mail/qpopper/Makefile b/mail/qpopper/Makefile index 9100494b5df0..bb310a3cb985 100644 --- a/mail/qpopper/Makefile +++ b/mail/qpopper/Makefile @@ -127,8 +127,6 @@ USE_OPENSSL= yes CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE} .endif -.include - post-patch: @${RM} -f ${WRKSRC}/popper/md5.h @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/man/* @@ -185,4 +183,4 @@ post-install: @${ECHO_MSG} "" .endif -.include +.include diff --git a/mail/qpopper/pkg-install b/mail/qpopper/pkg-install deleted file mode 100644 index 1e6a59b7e5c8..000000000000 --- a/mail/qpopper/pkg-install +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -# based on original from op port, written by Cyrille Lefevre -# - -[ ! $# = 2 -a ! $# = 4 ] && exit 1 -PKGNAME=$1 -ACTION=$2 - -CONF_DIR=${PKG_PREFIX}/etc/qpopper - -CONF_FILE=popusers -CONF_OWN=$3 -CONF_GRP=$4 -CONF_MODE=444 - -SAMP_SUFX=.sample - -INSTALL=install -CMP=cmp -RM=rm - -case "$ACTION" in - -POST-INSTALL) - if [ -f ${CONF_DIR}/${CONF_FILE} ]; then - echo "$PKGNAME: Will not overwrite existing ${CONF_DIR}/${CONF_FILE} file." - else - ${INSTALL} -c -o ${CONF_OWN} -g ${CONF_GRP} -m ${CONF_MODE} \ - ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \ - ${CONF_DIR}/${CONF_FILE} - fi - ;; - -DEINSTALL) - if ${CMP} -s ${CONF_DIR}/${CONF_FILE}${SAMP_SUFX} \ - ${CONF_DIR}/${CONF_FILE}; then - ${RM} -f ${CONF_DIR}/${CONF_FILE} - else - echo "$PKGNAME: Will not remove existing ${CONF_DIR}/${CONF_FILE} file." - fi - ;; - -PRE-INSTALL|POST-DEINSTALL) - ;; - -*) - exit 1 - ;; -esac - -exit diff --git a/mail/qpopper/pkg-plist b/mail/qpopper/pkg-plist index bd1e29c9df5a..de036fe214d9 100644 --- a/mail/qpopper/pkg-plist +++ b/mail/qpopper/pkg-plist @@ -1,14 +1,15 @@ @owner %%USERS%% @mode u+s +%%QPOPAUTH%%bin/qapopauth %%QPOPAUTH%%bin/qpopauth -@group %%GROUP%% +@group %%GROUPS%% @mode 0444 +@unexec if cmp -s %D/%%ETCDIR%%/popusers %D/%%ETCDIR%%/popusers.sample ; then rm -f %D/%%ETCDIR%%/popusers ; fi %%ETCDIR%%/popusers.sample +@exec if [ ! -f %D/%%ETCDIR%%/popusers ] ; then cp -p %D/%F %B/popusers ; fi @mode @group wheel @owner root -%%QPOPAUTH%%@unexec rm -f %D/bin/qapopauth -%%QPOPAUTH%%@exec ln -sf %D/bin/qpopauth %D/bin/qapopauth libexec/qpopper man/man8/qpopper.8.gz %%QPOPAUTH%%man/man8/qpopauth.8.gz -- cgit