From 829e950279e794b4066476f74b0ff6e196528eed Mon Sep 17 00:00:00 2001 From: naddy Date: Fri, 8 Oct 2004 15:27:27 +0000 Subject: [PATCH] kill INSTALL/DEINSTALL, overhaul; ok maintainer --- net/jabberd/Makefile | 3 +- net/jabberd/pkg/DEINSTALL | 26 ---------- net/jabberd/pkg/INSTALL | 99 --------------------------------------- net/jabberd/pkg/PLIST | 34 +++++++++----- 4 files changed, 24 insertions(+), 138 deletions(-) delete mode 100644 net/jabberd/pkg/DEINSTALL delete mode 100644 net/jabberd/pkg/INSTALL diff --git a/net/jabberd/Makefile b/net/jabberd/Makefile index b52c92215a4..ae56233e8b9 100644 --- a/net/jabberd/Makefile +++ b/net/jabberd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2004/10/06 01:08:17 naddy Exp $ +# $OpenBSD: Makefile,v 1.4 2004/10/08 15:27:27 naddy Exp $ COMMENT= "jabber server" DISTNAME= jabberd-2.0s3 @@ -24,7 +24,6 @@ EXAMPLES= ${PREFIX}/share/examples/jabberd SUBST_VARS= CONFIG_DIR EXAMPLES \ JABBERDUSER JABBERDGROUP JABBERDDIR -BUILD_DEPENDS= ::databases/mysql,-server LIB_DEPENDS= lib/mysql/mysqlclient.10::databases/mysql MODULES= converters/libiconv diff --git a/net/jabberd/pkg/DEINSTALL b/net/jabberd/pkg/DEINSTALL deleted file mode 100644 index d28299c6d8f..00000000000 --- a/net/jabberd/pkg/DEINSTALL +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# $OpenBSD: DEINSTALL,v 1.1.1.1 2004/05/29 13:12:30 jakob Exp $ -# -# jabberd de-installation - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -PREFIX=${PKG_PREFIX:-/usr/local} - -if [ "$PKG_DELETE_EXTRA" != Yes ]; then - echo - echo "+---------------" - echo "| To completely deinstall the $1 package you need to perform" - echo "| these steps as root:" - echo "|" - echo "| userdel ${JABBERDUSER}" - echo "| groupdel ${JABBERDGROUP}" - echo "| rm -rf ${CONFIG_DIR}" - echo "| rm -rf ${JABBERDDIR}" - echo "|" - echo "| Do not do this if you plan on re-installing $1" - echo "| at some future time." - echo "+---------------" - echo -fi - -exit 0 diff --git a/net/jabberd/pkg/INSTALL b/net/jabberd/pkg/INSTALL deleted file mode 100644 index af706277506..00000000000 --- a/net/jabberd/pkg/INSTALL +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh -# $OpenBSD: INSTALL,v 1.2 2004/06/05 21:13:25 jakob Exp $ -# -# Pre/post-installation setup of jabberd - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -PREFIX=${PKG_PREFIX:-/usr/local} -UID=533 -GID=533 - -do_usergroup_install() -{ - # Create jabberd user and group - groupinfo -e ${JABBERDGROUP} - if [ $? -eq 0 ]; then - echo "===> Using ${JABBERDGROUP} group for jabberd" - else - echo "===> Creating ${JABBERDGROUP} group for jabberd" - groupadd -g $GID ${JABBERDGROUP} - fi - userinfo -e ${JABBERDUSER} - if [ $? -eq 0 ]; then - echo "===> Using ${JABBERDUSER} user for jabberd" - else - echo "===> Creating ${JABBERDUSER} user for jabberd" - useradd -g ${JABBERDGROUP} -d /nonexistent -L daemon -c 'jabberd account' -s /bin/sh -u $UID ${JABBERDUSER} - fi -} - -do_jabberddir_install() -{ - install -d -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 771 ${JABBERDDIR} - install -d -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 775 ${JABBERDDIR}/pid - install -d -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 775 ${JABBERDDIR}/log -} - -do_notice_conf() -{ - echo - echo "+---------------" - echo "| The existing $1 configuration files in ${CONFIG_DIR} have NOT" - echo "| been changed. You may want to compare them to the current samples in" - echo "| ${EXAMPLES}, and update your configuration" - echo "| files as needed." -} - -do_install_conf() -{ - install -d -o root -g wheel -m 755 ${CONFIG_DIR} - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/jabberd.cfg ${CONFIG_DIR}/jabberd.cfg - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/c2s.xml ${CONFIG_DIR}/c2s.xml - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/resolver.xml ${CONFIG_DIR}/resolver.xml - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/router-users.xml ${CONFIG_DIR}/router-users.xml - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/router.xml ${CONFIG_DIR}/router.xml - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/s2s.xml ${CONFIG_DIR}/s2s.xml - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/sm.xml ${CONFIG_DIR}/sm.xml - install -d -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 750 ${CONFIG_DIR}/templates - install -o ${JABBERDUSER} -g ${JABBERDGROUP} -m 640 ${EXAMPLES}/templates/roster.xml ${CONFIG_DIR}/templates/roster.xml - - echo - echo "+---------------" - echo "| The $1 configuration files have been installed in ${CONFIG_DIR}." - echo "| Please view this file and change the configuration to meet your needs." - echo "+---------------" - echo -} - -# verify proper execution -# -if [ $# -ne 2 ]; then - echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 - exit 1 -fi - -# Verify/process the command -# -case $2 in - PRE-INSTALL) - do_usergroup_install - ;; - POST-INSTALL) - if [ ! -d ${JABBERDDIR} ]; then - do_jabberddir_install - fi - if [ ! -d ${CONFIG_DIR} ]; then - do_install_conf $1 - elif [ ! -f ${CONFIG_DIR}/jabberd.cfg ]; then - do_install_conf $1 - else - do_notice_conf $1 - fi - ;; - *) - echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/net/jabberd/pkg/PLIST b/net/jabberd/pkg/PLIST index 7b19646fb9a..cd9797118d4 100644 --- a/net/jabberd/pkg/PLIST +++ b/net/jabberd/pkg/PLIST @@ -1,4 +1,6 @@ -@comment $OpenBSD: PLIST,v 1.2 2004/09/15 18:17:41 espie Exp $ +@comment $OpenBSD: PLIST,v 1.3 2004/10/08 15:27:27 naddy Exp $ +@newgroup ${JABBERDGROUP}:533 +@newuser ${JABBERDUSER}:533:${JABBERDGROUP}:daemon:jabberd account:/nonexistent:/bin/sh libexec/jabberd/ libexec/jabberd/c2s libexec/jabberd/resolver @@ -13,23 +15,33 @@ libexec/jabberd/sm @man man/man8/sm.8 sbin/jabberd share/examples/jabberd/ +@sample ${CONFIG_DIR}/ +@group ${JABBERDGROUP} +@owner ${JABBERDUSER} +@mode 640 share/examples/jabberd/c2s.xml +@sample ${CONFIG_DIR}/c2s.xml share/examples/jabberd/db-setup.mysql share/examples/jabberd/jabberd.cfg +@sample ${CONFIG_DIR}/jabberd.cfg share/examples/jabberd/resolver.xml +@sample ${CONFIG_DIR}/resolver.xml share/examples/jabberd/router-users.xml +@sample ${CONFIG_DIR}/router-users.xml share/examples/jabberd/router.xml +@sample ${CONFIG_DIR}/router.xml share/examples/jabberd/s2s.xml +@sample ${CONFIG_DIR}/s2s.xml share/examples/jabberd/sm.xml +@sample ${CONFIG_DIR}/sm.xml +@mode 750 share/examples/jabberd/templates/ +@sample ${CONFIG_DIR}/templates/ +@mode 640 share/examples/jabberd/templates/roster.xml -@cwd ${SYSCONFDIR} -@extra jabberd/templates/roster.xml -@extra jabberd/templates -@extra jabberd/jabberd.cfg -@extra jabberd/c2s.xml -@extra jabberd/resolver.xml -@extra jabberd/router-users.xml -@extra jabberd/router.xml -@extra jabberd/s2s.xml -@extra jabberd/sm.xml +@sample ${CONFIG_DIR}/templates/roster.xml +@mode 771 +@sample ${JABBERDDIR}/ +@mode 775 +@sample ${JABBERDDIR}/pid/ +@sample ${JABBERDDIR}/log/