pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/majordomo Modify (finally!) to use pkginstall fra...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a20be34dbf7
branches:  trunk
changeset: 514699:2a20be34dbf7
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Jun 16 17:11:25 2006 +0000

description:
Modify (finally!) to use pkginstall framework.  Bump PKGREVISION to 2.

diffstat:

 mail/majordomo/DEINSTALL        |   27 ----------
 mail/majordomo/INSTALL          |   51 -------------------
 mail/majordomo/Makefile         |  103 +++++++++++++++------------------------
 mail/majordomo/distinfo         |    4 +-
 mail/majordomo/patches/patch-aa |    4 +-
 5 files changed, 43 insertions(+), 146 deletions(-)

diffs (269 lines):

diff -r a195a721bc95 -r 2a20be34dbf7 mail/majordomo/DEINSTALL
--- a/mail/majordomo/DEINSTALL  Fri Jun 16 16:43:37 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.2 2003/08/30 20:22:56 jlam Exp $
-#
-
-PKGNAME=$1
-STAGE=$2
-
-USER=@MAJORDOMO_USER@
-GROUP=@MAJORDOMO_GROUP@
-HOME=@HOME@
-
-case ${STAGE} in
-POST-DEINSTALL)
-       cat << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to
-       - remove the \`${USER}' user.
-       - remove his home directory \`${HOME}/${USER}'
-       - remove the \`${GROUP}' group from /etc/group
-       - remove majordomo aliases from /etc/mail/aliases and
-          run newaliases
-===========================================================================
-EOF
-       ;;
-esac
-exit 0
diff -r a195a721bc95 -r 2a20be34dbf7 mail/majordomo/INSTALL
--- a/mail/majordomo/INSTALL    Fri Jun 16 16:43:37 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: INSTALL,v 1.1 2001/11/01 01:00:27 zuntum Exp $
-
-PKGNAME=$1
-STAGE=$2
-
-HOME=@HOME@
-MAJORDOMO_USER=@MAJORDOMO_USER@
-MAJORDOMO_GROUP=@MAJORDOMO_GROUP@
-ADDUSER=@ADDUSER@
-ADDGROUP=@ADDGROUP@
-CHGRP=@CHGRP@
-ID=@ID@
-TOUCH=@TOUCH@
-RM=@RM@
-
-if [ "$STAGE" != "PRE-INSTALL" ];
-then
-       exit 0
-fi
-
-# We need to check that ${MAJORDOMO_GROUP} exists before adding the user.
-#
-${TOUCH} "/tmp/grouptestmajordomo.$$"
-${CHGRP} ${MAJORDOMO_GROUP} "/tmp/grouptestmajordomo.$$" >/dev/null 2>&1
-if [ $? -eq 0 ]; then
-       echo "Group '${MAJORDOMO_GROUP}' already exists...proceeding."
-else
-       echo "Creating '${MAJORDOMO_GROUP}' group..."
-       ${ADDGROUP} ${MAJORDOMO_GROUP}
-       echo "Done."
-fi
-${RM} -f "/tmp/grouptestmajordomo.$$"
-
-${ID} ${MAJORDOMO_USER} >/dev/null 2>&1
-if [ $? -eq 0 ]; then
-       echo "User '${MAJORDOMO_USER}' already exists...proceeding."
-else
-       echo "Creating '${MAJORDOMO_USER}' user..."
-       ${ADDUSER} -c "Majordomo User" -g ${MAJORDOMO_GROUP} \
-               -b ${HOME} ${MAJORDOMO_USER}
-       echo "Done."
-fi
-
-# Home... in case the login exists but not the home directory
-#
-install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER}
-install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER}/archives
-install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER}/digests
-install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER}/lists
diff -r a195a721bc95 -r 2a20be34dbf7 mail/majordomo/Makefile
--- a/mail/majordomo/Makefile   Fri Jun 16 16:43:37 2006 +0000
+++ b/mail/majordomo/Makefile   Fri Jun 16 17:11:25 2006 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2006/06/09 08:59:01 rillig Exp $
+# $NetBSD: Makefile,v 1.26 2006/06/16 17:11:25 jlam Exp $
 
 DISTNAME=              majordomo-1.94.5
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            mail
 MASTER_SITES=          ftp://ftp.sgi.com/other/majordomo/1.94.5/ \
                        ftp://ftp-europe.sgi.com/other/majordomo/1.94.5/
@@ -13,27 +13,12 @@
 
 LICENSE=               majordomo-license
 
-.if exists(/usr/sbin/user)
-ADDUSER=               /usr/sbin/useradd
-ADDGROUP=              /usr/sbin/groupadd
-.else
-DEPENDS+=              user>=20000313:../../sysutils/user
-ADDUSER=               ${LOCALBASE}/sbin/useradd
-ADDGROUP=              ${LOCALBASE}/sbin/groupadd
-.endif
-
 CONFLICTS+=            bounce-*
 
 USE_TOOLS+=            perl:run
 
-NO_BIN_ON_FTP=         requires compiled-in hardcoded uid/gid
-NO_BIN_ON_CDROM=       ${NO_BIN_ON_FTP}
-
 BUILD_TARGET=          wrapper
 INSTALL_TARGET=                install install-wrapper
-
-DEINSTALL_SRC=         ${PKGDIR}/DEINSTALL
-INSTALL_SRC=           ${PKGDIR}/INSTALL
 MAKEFILE=              Makefile.netbsd
 
 MAJORDOMO_TMPDIR?=     /var/tmp
@@ -41,17 +26,9 @@
 MAJORDOMO_USER?=       majordom
 MAJORDOMO_GROUP?=      majordom
 
-PLIST_SUBST+=          HOME=${MAJORDOMO_HOMEDIR:Q}                     \
-                       MAJORDOMO_USER=${MAJORDOMO_USER:Q}
 MESSAGE_SUBST+=                HOME=${MAJORDOMO_HOMEDIR}                       \
                        MAJORDOMO_USER=${MAJORDOMO_USER}                \
                        MAJORDOMO_GROUP=${MAJORDOMO_GROUP}
-FILES_SUBST+=          HOME=${MAJORDOMO_HOMEDIR:Q}                     \
-                       MAJORDOMO_USER=${MAJORDOMO_USER}                \
-                       MAJORDOMO_GROUP=${MAJORDOMO_GROUP}              \
-                       ADDUSER=${ADDUSER} ADDGROUP=${ADDGROUP}         \
-                       CHGRP=${CHGRP:Q} ID=${ID:Q}                     \
-                       TOUCH=${TOUCH:Q} RM=${RM:Q}
 
 DOCDIR=                        ${PREFIX}/share/doc/majordomo
 DOCFILES=              Changelog FUTURE INSTALL LICENSE NEWLIST README
@@ -66,45 +43,43 @@
 
 BUILD_DEFS+=           MAJORDOMO_USER MAJORDOMO_GROUP MAJORDOMO_TMPDIR
 
-.PHONY: require-uid
-require-uid:
-       ${_PKG_SILENT}${_PKG_DEBUG}                                     \
-       if ! ${ID} ${MAJORDOMO_USER} >/dev/null 2>&1; then              \
-               ${TOUCH} "/tmp/grouptestmajordomo1.$$$$";               \
-               if ! ${CHGRP} ${MAJORDOMO_GROUP}                        \
-                       "/tmp/grouptestmajordomo1.$$$$" >/dev/null 2>&1; then \
-                       realtarget="root-require-uid";                  \
-                       action="create user for";                       \
-                       ${_SU_TARGET};                                  \
-               fi;                                                     \
-               ${RM} -f "/tmp/grouptestmajordomo1.$$$$";               \
-       fi
-
-.PHONY: root-require-uid
-root-require-uid: pre-install-script
+USERGROUP_PHASE=       configure
+PKG_GROUPS=            ${MAJORDOMO_GROUP}
+PKG_USERS=             ${MAJORDOMO_USER}:${MAJORDOMO_GROUP}
+OWN_DIRS_PERMS+=       ${MAJORDOMO_HOMEDIR}/${MAJORDOMO_USER}          \
+                       ${MAJORDOMO_USER} ${MAJORDOMO_GROUP} 0775
+OWN_DIRS_PERMS+=       ${MAJORDOMO_HOMEDIR}/${MAJORDOMO_USER}/archives \
+                       ${MAJORDOMO_USER} ${MAJORDOMO_GROUP} 0775
+OWN_DIRS_PERMS+=       ${MAJORDOMO_HOMEDIR}/${MAJORDOMO_USER}/digests  \
+                       ${MAJORDOMO_USER} ${MAJORDOMO_GROUP} 0775
+OWN_DIRS_PERMS+=       ${MAJORDOMO_HOMEDIR}/${MAJORDOMO_USER}/lists    \
+                       ${MAJORDOMO_USER} ${MAJORDOMO_GROUP} 0775
 
-do-configure: generate-install-scripts
-       ${MAKE} ${.MAKEFLAGS} require-uid
-       ${SED} \
-               -e 's:@PREFIX@:${PREFIX}:g' \
-               -e 's:@LOCALBASE@:${LOCALBASE}:g' \
-               -e 's|@HOME@|${MAJORDOMO_HOMEDIR}|g' \
-               -e 's:@MAJORDOMO_USER@:${MAJORDOMO_USER}:g' \
-               -e "s:@UID@:`${ID} -ru ${MAJORDOMO_USER}`:g" \
-               -e "s:@GID@:`${ID} -rg ${MAJORDOMO_USER}`:g" \
-               -e 's:@TMPDIR@:${MAJORDOMO_TMPDIR}:g' \
-               < ${WRKSRC}/Makefile > ${WRKSRC}/Makefile.netbsd
-       ${SED} \
-               -e 's:@PREFIX@:${PREFIX}:g' \
-               -e 's:@HOME@:${MAJORDOMO_HOMEDIR}:g' \
-               -e 's:@MAJORDOMO_USER@:${MAJORDOMO_USER}:g' \
-               -e 's:@TMPDIR@:${MAJORDOMO_TMPDIR}:g' \
-               < ${WRKSRC}/sample.cf > ${WRKSRC}/majordomo.cf
-       ${SED} \
-               -e 's:@PREFIX@:${PREFIX}:g' \
-               -e 's:@HOME@:${MAJORDOMO_HOMEDIR}:g' \
-               -e 's:@MAJORDOMO_USER@:${MAJORDOMO_USER}:g' \
-               < ${FILESDIR}/aliases.majordomo > ${WRKSRC}/aliases.majordomo
+CONFIGURE_SED=         -e "s|@PREFIX@|${PREFIX}|g"                     \
+                       -e "s|@PERL@|${PERL5}|g"                        \
+                       -e "s|@HOME@|${MAJORDOMO_HOMEDIR}|g"            \
+                       -e "s|@MAJORDOMO_USER@|${MAJORDOMO_USER}|g"     \
+                       -e "s|@UID@|${PKG_UID.${MAJORDOMO_USER}}|g"     \
+                       -e "s|@GID@|${PKG_GID.${MAJORDOMO_GROUP}}|g"    \
+                       -e "s|@TMPDIR@|${MAJORDOMO_TMPDIR}|g"
+
+MESSAGE_SED=           -e 's|$${PREFIX}|${PREFIX}|g'                   \
+                       -e 's|$${HOME}|${HOME}|g'                       \
+                       -e 's|$${MAJORDOMO_USER}|${MAJORDOMO_USER}|g'   \
+                       -e 's|$${MAJORDOMO_GROUP}|${MAJORDOMO_GROUP}|g' \
+
+do-configure:
+       ${SED} ${CONFIGURE_SED} ${WRKSRC}/Makefile > ${WRKSRC}/Makefile.netbsd
+
+post-build:
+       ${SED} ${CONFIGURE_SED} ${WRKSRC}/sample.cf > ${WRKSRC}/majordomo.cf
+       ${SED} ${CONFIGURE_SED} ${FILESDIR}/aliases.majordomo           \
+               > ${WRKSRC}/aliases.majordomo
+       ${SED}  -e 's|$${PREFIX}|${PREFIX}|g'                           \
+               -e 's|$${HOME}|${HOME}|g'                               \
+               -e 's|$${MAJORDOMO_USER}|${MAJORDOMO_USER}|g'           \
+               -e 's|$${MAJORDOMO_GROUP}|${MAJORDOMO_GROUP}|g'         \
+               ${PKGDIR}/MESSAGE > ${WRKSRC}/post-install-notes
 
 post-install:
        ${LN} -sf archive2.pl ${PREFIX}/libexec/majordomo/archive
@@ -115,7 +90,7 @@
 .for file in ${DOCDOCFILES}
        ${INSTALL_DATA} ${WRKSRC}/Doc/${file} ${DOCDIR}/${file}
 .endfor
-       ${INSTALL_DATA} ${MESSAGE} ${DOCDIR}/post-install-notes
+       ${INSTALL_DATA} ${WRKSRC}/post-install-notes ${DOCDIR}/post-install-notes
        ${INSTALL} -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${EXDIR}
 .for dir in ${EXDIRS}
        ${INSTALL} -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${EXDIR}/${dir}
diff -r a195a721bc95 -r 2a20be34dbf7 mail/majordomo/distinfo
--- a/mail/majordomo/distinfo   Fri Jun 16 16:43:37 2006 +0000
+++ b/mail/majordomo/distinfo   Fri Jun 16 17:11:25 2006 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.4 2005/07/23 14:44:39 he Exp $
+$NetBSD: distinfo,v 1.5 2006/06/16 17:11:25 jlam Exp $
 
 SHA1 (majordomo-1.94.5.tgz) = 44b18c7b9133f2cd992f6e718551d613d9d45c00
 RMD160 (majordomo-1.94.5.tgz) = 7f6b48fb5cc5b23948133658b055588d0d6608c4
 Size (majordomo-1.94.5.tgz) = 312244 bytes
-SHA1 (patch-aa) = 7e7c3230c707c48f402e06ec1f021af1c2ba988b
+SHA1 (patch-aa) = 6cc6cd49eb6413489fb782a3bcac70baac99fa7f
 SHA1 (patch-ab) = 68bdbd77029ebd8f113c492e50e60aa7efb35de9
 SHA1 (patch-ac) = bea997e785b2656b1660a11efce759a56a700ab2
 SHA1 (patch-ad) = 65370547240539128a405484e98c7ed15a869464
diff -r a195a721bc95 -r 2a20be34dbf7 mail/majordomo/patches/patch-aa
--- a/mail/majordomo/patches/patch-aa   Fri Jun 16 16:43:37 2006 +0000
+++ b/mail/majordomo/patches/patch-aa   Fri Jun 16 17:11:25 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 2001/03/27 11:53:18 agc Exp $
+$NetBSD: patch-aa,v 1.3 2006/06/16 17:11:25 jlam Exp $
 
 --- Makefile.orig      Wed Aug 27 16:56:21 1997
 +++ Makefile   Tue Mar 27 12:41:29 2001
@@ -7,7 +7,7 @@
   
  # Put the location of your Perl binary here:
 -PERL = /bin/perl
-+PERL = @LOCALBASE@/bin/perl
++PERL = @PERL@
  
  # What do you call your C compiler?
  CC = cc



Home | Main Index | Thread Index | Old Index