Drop use of INSTALL_SRC and DEINSTALL_SRC and instead set the proper

variables so that the default INSTALL/DEINSTALL scripts from the
pkginstall framework do the right thing.  Where possible, move some
post-install directions for package setup into MESSAGE files so that
they may be re-inspected by querying the installed package using
"pkg_info -D ...".
This commit is contained in:
jlam 2006-07-05 06:53:12 +00:00
parent 668d96b7c1
commit 3ba41e8b0c
25 changed files with 103 additions and 309 deletions

View file

@ -1,30 +0,0 @@
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.3 2003/08/30 20:22:51 jlam Exp $
case $2 in
POST-INSTALL)
/bin/cat << EOF
===========================================================================
Copy the following files from ${PKG_PREFIX}/etc/rc.d to /etc/rc.d:
linuxrtc vmmon vmnet vmnetif
and append the content of ${PKG_PREFIX}/etc/rc.conf.d/vmware to /etc/rc.conf:
vmware_prefix=${PKG_PREFIX}
vmmon=YES
vmnet=YES
linuxrtc=NO
# XXX should cater for multiple interfaces
vmnetif=YES
vmnetifname=vmnet1
vmnetdev=/dev/vmnet1
vmnetifconfig="inet 172.16.212.1 netmask 0xffffff00"
vmnetif_use_dhcpd=NO
Then, reboot your system.
===========================================================================
EOF
;;
esac

View file

@ -0,0 +1,23 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2006/07/05 06:53:12 jlam Exp $
To use ${PKGNAME}, you will need to copy the following files from
${PREFIX}/etc/rc.d to /etc/rc.d:
linuxrtc vmmon vmnet vmnetif
and append the following content to /etc/rc.conf:
vmware_prefix="${PREFIX}"
vmmon=YES
vmnet=YES
linuxrtc=NO
# XXX should cater for multiple interfaces
vmnetif=YES
vmnetifname=vmnet1
vmnetdev=/dev/vmnet1
vmnetifconfig="inet 172.16.212.1 netmask 0xffffff00"
vmnetif_use_dhcpd=NO
Then, reboot your system.
===========================================================================

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.21 2006/05/18 20:29:58 wiz Exp $
# $NetBSD: Makefile,v 1.22 2006/07/05 06:53:12 jlam Exp $
DISTNAME= vmware-netbsd-1.2
PKGNAME= vmware-module-1.2
@ -18,8 +18,6 @@ ONLY_FOR_PLATFORM= NetBSD-*-i386
WRKSRC= ${WRKDIR}
NO_CONFIGURE= yes
DEINSTALL_SRC= # empty
INSTALL_SRC= ${PKGDIR}/INSTALL
NO_SRC_ON_FTP= already there
@ -69,9 +67,6 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/rc.conf.d/vmware.patched \
${PREFIX}/etc/rc.conf.d/vmware
post-install:
PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} - POST-INSTALL
.include "../../mk/bsd.pkg.mk"
LDFLAGS= # empty since we use BSD-style makefiles

View file

@ -1,30 +0,0 @@
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.2 2003/08/30 20:22:52 jlam Exp $
case $2 in
POST-INSTALL)
/bin/cat << EOF
===========================================================================
Copy the following files from ${PKG_PREFIX}/etc/rc.d to /etc/rc.d:
linuxrtc vmmon vmnet vmnetif
and append the content of ${PKG_PREFIX}/etc/rc.conf.d/vmware to /etc/rc.conf:
vmware_prefix=${PKG_PREFIX}
vmmon=YES
vmnet=YES
linuxrtc=NO
# XXX should cater for multiple interfaces
vmnetif=YES
vmnetifname=vmnet1
vmnetdev=/dev/vmnet1
vmnetifconfig="inet 172.16.212.1 netmask 0xffffff00"
vmnetif_use_dhcpd=NO
Then, reboot your system.
===========================================================================
EOF
;;
esac

View file

@ -0,0 +1,23 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2006/07/05 06:53:12 jlam Exp $
To use ${PKGNAME}, you will need to copy the following files from
${PREFIX}/etc/rc.d to /etc/rc.d:
linuxrtc vmmon vmnet vmnetif
and append the following content to /etc/rc.conf:
vmware_prefix="${PREFIX}"
vmmon=YES
vmnet=YES
linuxrtc=NO
# XXX should cater for multiple interfaces
vmnetif=YES
vmnetifname=vmnet1
vmnetdev=/dev/vmnet1
vmnetifconfig="inet 172.16.212.1 netmask 0xffffff00"
vmnetif_use_dhcpd=NO
Then, reboot your system.
===========================================================================

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.20 2006/03/26 21:34:51 veego Exp $
# $NetBSD: Makefile,v 1.21 2006/07/05 06:53:12 jlam Exp $
DISTNAME= vmware-netbsd-3.2.1.8
PKGNAME= vmware-module-3.2.1.8
@ -15,8 +15,6 @@ CONFLICTS= vmware-module-1.*
ONLY_FOR_PLATFORM= NetBSD-*-i386
NO_CONFIGURE= yes
DEINSTALL_SRC= # empty
INSTALL_SRC= ${PKGDIR}/INSTALL
NO_SRC_ON_FTP= already there
@ -63,9 +61,6 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/rc.conf.d/vmware.patched \
${PREFIX}/etc/rc.conf.d/vmware
post-install:
PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} - POST-INSTALL
.include "../../mk/bsd.pkg.mk"
LDFLAGS= # empty since we use BSD-style makefiles

View file

@ -1,17 +1,19 @@
#!/bin/sh
#
# $NetBSD: DEINSTALL,v 1.1 2004/08/18 17:52:25 ben Exp $
#
# $NetBSD: DEINSTALL,v 1.2 2006/07/05 06:53:12 jlam Exp $
case $2 in
DEINSTALL) cat << EOF
=============================================================
The records, log and bones were not wiped out by this
deletion process. If you don't want them around, please
remove ${PKG_PREFIX}/share/ivan.
=============================================================
case "${STAGE}" in
DEINSTALL)
DATADIR="${PKG_PREFIX}/share/ivan"
${RMDIR} -p ${DATADIR} 2>/dev/null || ${TRUE}
if ${TEST} -d ${DATADIR}; then
${CAT} << EOF
======================================================================
The records, log and bones were not wiped out by this deletion process.
If you don't want them around, then please remove the following
directory:
${DATADIR}
======================================================================
EOF
fi
;;
esac

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.10 2006/06/12 16:28:09 wiz Exp $
# $NetBSD: Makefile,v 1.11 2006/07/05 06:53:12 jlam Exp $
#
DISTNAME= ivan-0.50
PKGREVISION= 5
PKGREVISION= 6
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ivan/}
@ -17,9 +17,7 @@ CONFIGURE_ARGS+= --localstatedir=${PREFIX}/share
USE_LANGUAGES= c++
DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
INSTALL_SRC= # empty
REQD_DIRS+= share/ivan
CONF_FILES_PERMS+= /dev/null ${PREFIX}/share/ivan/ivan-highscore.scores \
${ROOT_USER} games 664

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.3 2006/05/19 07:15:24 joerg Exp $
@comment $NetBSD: PLIST,v 1.4 2006/07/05 06:53:13 jlam Exp $
bin/ivan
share/ivan/Graphics/Char.pcx
share/ivan/Graphics/Cursor.pcx
@ -23,4 +23,3 @@ share/ivan/Script/olterra.dat
@dirrm share/ivan/Bone
@dirrm share/ivan/Graphics
@dirrm share/ivan/Script
@dirrm share/ivan

View file

@ -1,27 +1,14 @@
#!/bin/sh
# $NetBSD: DEINSTALL,v 1.1.1.1 2006/02/14 17:03:54 rillig Exp $
# $NetBSD: DEINSTALL,v 1.2 2006/07/05 06:53:13 jlam Exp $
PKGNAME=$1
STAGE=$2
LIST="${PKG_PREFIX}/share/tetrinetx/game.log"
case ${STAGE} in
DEINSTALL)
for to_trash in ${LIST}; do
if [ -d "${to_trash}" ]; then
rm -rf ${to_trash}/*
elif [ -f "${to_trash}" ]; then
rm ${to_trash}
fi
done
;;
POST-DEINSTALL)
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
case "${STAGE}" in
DEINSTALL)
LIST="${PKG_PREFIX}/share/tetrinetx/game.log"
for to_trash in ${LIST}; do
if ${TEST} -d "$to_trash"; then
${RM} -fr $to_trash/*
elif ${TEST} -f "$to_trash"; then
${RM} -f $to_trash
fi
done
;;
esac
exit 0

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.2 2006/03/14 01:14:29 jlam Exp $
# $NetBSD: Makefile,v 1.3 2006/07/05 06:53:13 jlam Exp $
DISTNAME= tetrinetx-1.13.16+qirc-1.40c
PKGNAME= tetrinetx-1.13.16
PKGREVISION= 1
CATEGORIES= games
MASTER_SITES= http://tetrinetx.sourceforge.net/
@ -13,8 +14,6 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
SHAREDIR= ${PREFIX}/share/tetrinetx
BINARY= tetrix.netbsd
RCD_SCRIPTS= tetrinetx
DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
INSTALL_SRC= # empty
LIBS.SunOS+= -lsocket -lnsl -lresolv

View file

@ -1,19 +0,0 @@
#!/bin/sh
#
# $NetBSD: DEINSTALL,v 1.2 2003/08/30 20:22:54 jlam Exp $
#
PKGNAME=$1
case $2 in
POST-DEINSTALL)
cat << EOF
=============================================================================
If you won't be using ${PKGNAME} any longer, you may want to remove the
scores and progress files that were copied to ~/.scavenger/ of every
user playing it.
=============================================================================
EOF
;;
esac
exit 0

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.15 2006/06/15 13:31:29 wiz Exp $
# $NetBSD: Makefile,v 1.16 2006/07/05 06:53:13 jlam Exp $
#
DISTNAME= xscavenger-1.4.4
PKGREVISION= 2
PKGREVISION= 3
CATEGORIES= games x11
MASTER_SITES= http://www.xdr.com/dash/
EXTRACT_SUFX= .tgz
@ -17,8 +17,6 @@ USE_IMAKE= yes
CONFIGURE_DIRS= src
BUILD_DIRS= ${CONFIGURE_DIRS}
NO_INSTALL_MANPAGES= yes
DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
INSTALL_SRC= # empty
CPPFLAGS+= -DSOUNDDEV="\"${DEVOSSSOUND}\""

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile.common,v 1.11 2006/03/10 22:29:08 jlam Exp $
# $NetBSD: Makefile.common,v 1.12 2006/07/05 06:53:13 jlam Exp $
#
DISTNAME= FreeWnn-1.10
@ -17,7 +17,7 @@ WRKSRC= ${WRKDIR}/Xsi
INSTALL_TARGET= install install.man
.include "../../mk/bsd.prefs.mk"
WNNOWNER?= wnn
WNNOWNER?= ${FREEWNN_USER}
SEDSCRIPT+= -e 's|\(WNNOWNER = \).*|\1${WNNOWNER}|'
SEDSCRIPT+= -e 's|\([JCKT]\)\(WNNDICDIR = \).*|\1\2${IMDICTDIR}/wnn/$$(\1WNNLANG)|'
@ -27,9 +27,6 @@ SEDSCRIPT+= -e 's|$$([CK]*WNNJLIBSRC)/lib\([ck]*wnn\).a|-l\1|'
SEDSCRIPT+= -e 's|\(:.*\)$$(WNNJLIB)|\1|'
.elif defined(WNN_TARGET) && (${WNN_TARGET} == "DICT")
MAKE_ENV+= "WNN_TARGET=DICT"
DEINSTALL_SRC= # empty
INSTALL_SRC= ${FILESDIR}/INSTALL
FILES_SUBST+= WNNOWNER=${WNNOWNER}
.else
MAKE_ENV+= "WNN_TARGET=LIBRARY"
.endif

View file

@ -1,26 +0,0 @@
#!/bin/sh
WNNOWNER="@WNNOWNER@"
case $2 in
PRE-INSTALL)
uid=`id -u ${WNNOWNER} 2> /dev/null`
if [ X"$uid" != X ]; then
exit 0
fi
wnn_uid=69
uid=`id -u $wnn_uid 2> /dev/null`
if [ X"$uid" != X ]; then
wnn_uid=32768
while id -u $wnn_uid > /dev/null 2>&1; do
wnn_uid=`echo $wnn_uid+1|bc`
if [ $wnn_uid = 65536 ]; then
exit 1
fi
done
fi
chpass -l -a "${WNNOWNER}:*:$wnn_uid:1::0:0:User Wnn:/nonexistent:/sbin/nologin"
exit $?
;;
esac

View file

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.14 2006/04/23 00:12:37 jlam Exp $
# $NetBSD: Makefile,v 1.15 2006/07/05 06:53:13 jlam Exp $
#
PKGNAME= ja-FreeWnn-server-bin-1.10
PKGREVISION= 4
PKGREVISION= 5
CATEGORIES= japanese inputmethod
MAINTAINER= tech-pkg-ja@jp.NetBSD.org

View file

@ -1,14 +0,0 @@
#! /bin/sh
# $NetBSD: INSTALL,v 1.2 2003/05/31 13:09:00 uebayasi Exp $
case "$2" in
POST-INSTALL)
# install skkserv port number
if grep '^skkserv[ ]' /etc/services >/dev/null; then
:
else
echo '
skkserv 1178/tcp # SKK server' >>/etc/services
fi
;;
esac

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.11 2006/03/14 01:14:29 jlam Exp $
# $NetBSD: Makefile,v 1.12 2006/07/05 06:53:13 jlam Exp $
DISTNAME= skkinput-2.06.3
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= japanese inputmethod
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP:=skkinput2/1815/}
@ -13,10 +13,6 @@ BUILD_DEFS+= USE_INET6
USE_IMAKE= YES
PLIST_SUBST+= PKGBASE=${LOCALBASE:Q}
DEINSTALL_SRC= # empty
INSTALL_SRC= ${PKGDIR}/INSTALL
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/skkinput
${INSTALL_DATA} ${WRKSRC}/README.jis ${PREFIX}/share/doc/skkinput

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.3 2006/01/12 00:29:16 joerg Exp $
@comment $NetBSD: PLIST,v 1.4 2006/07/05 06:53:13 jlam Exp $
bin/skkinput
lib/X11/app-defaults/Skkinput
${IMAKE_MAN_DIR}/skkinput.${IMAKE_MAN_SUFFIX}
@ -7,4 +7,3 @@ share/doc/skkinput/BUGS.jis
share/doc/skkinput/FAQ.jis
share/doc/skkinput/README.jis
@dirrm share/doc/skkinput
@unexec if [ -f ${PKGBASE}/etc/skk.conf ]; then echo 'Remove "${PKGBASE}/etc/skk.conf" if you will not use SKK programs any longer.'; fi

View file

@ -1,23 +0,0 @@
#! /bin/sh
#
# $NetBSD: DEINSTALL,v 1.3 2003/05/06 17:42:13 jmmv Exp $
#
case "$2" in
DEINSTALL) cat <<EOF
---------------------------------------------------------------------------
Data files and messages created by nocol are stored in /var/run/msgs and
/var/run/data. You may want to remove these directories manually if you
don't need them any longer:
rm -fr /var/run/msgs /var/run/data
For further information look at $PKG_PREFIX/share
---------------------------------------------------------------------------
EOF
;;
esac
exit 0

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2006/06/20 22:17:14 minskim Exp $
# $NetBSD: Makefile,v 1.28 2006/07/05 06:53:13 jlam Exp $
#
DISTNAME= nocol-4.3.1
@ -22,8 +22,9 @@ LIBTOOL_OVERRIDE= ${WRKSRC}/cmu-snmp/snmp/libtool \
${WRKSRC}/cmu-snmp/snmpapps/libtool
INSTALL_TARGET= install root
DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
INSTALL_SRC= # empty
OWN_DIRS+= /var/run/msgs
OWN_DIRS+= /var/run/data
post-patch:
@(hostname=`/bin/hostname`; \

View file

@ -1,15 +0,0 @@
# $NetBSD: DEINSTALL,v 1.1 2001/10/31 22:58:14 zuntum Exp $
#
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
if ! user del glunix
then
echo Removing user \'glunix\' failed, please remove him manually.
fi
if ! group del glunix
then
echo Removing group \'glunix\' failed, please remove it manually.
fi

View file

@ -1,35 +0,0 @@
# $NetBSD: INSTALL,v 1.1 2001/10/31 22:58:15 zuntum Exp $
#
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
if [ -f /usr/sbin/user ]
then
USER_CMD=/usr/sbin/user
GROUP_CMD=/usr/sbin/group
else
if [ -f ${PKG_PREFIX}/sbin/user ]
then
USER_CMD=${PKG_PREFIX}/sbin/user
GROUP_CMD=${PKG_PREFIX}/sbin/group
else
echo
echo Please install the sysutils/user first!
echo
exit 0
fi
fi
if `${GROUP_CMD} info -e glunix` ; then \
${ECHO} Group \'glunix\' already exists.; \
else \
${GROUP_CMD} add glunix; \
fi
if `${USER_CMD} info -e glunix` ; then \
${ECHO} User \'glunix\' already exists.; \
else \
${USER_CMD} add -g glunix -d /nonexistent -s \
${PKG_PREFIX}/now/bin/glush glunix; \
fi

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.34 2006/03/14 01:14:32 jlam Exp $
# $NetBSD: Makefile,v 1.35 2006/07/05 06:53:13 jlam Exp $
DISTNAME= glunix-release-1-0a
PKGNAME= glunix-1.0a
@ -34,17 +34,12 @@ MAKE_ENV+= OPSYS=${OPSYS:Q} ARCH=${MACHINE_ARCH:Q} NOW_ROOT=${NOW_ROOT:Q}
MAKE_ENV+= PORTSDIR=${PKGDIR:Q} WRKDIR=${WRKDIR:Q} FLAGS=${FLAGS:Q}
MAKE_ENV+= SSH=${SSH:Q}
.if exists(/usr/sbin/user)
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
.endif
PKG_GROUPS= glunix
PKG_USERS= glunix:glunix
PKG_SHELL.glunix= ${NOW_ROOT}/bin/glush
USERGROUP_PHASE= configure
DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
INSTALL_SRC= ${PKGDIR}/INSTALL
PKG_SHELL= ${NOW_ROOT}/bin/glush
post-patch:
cd ${WRKSRC}; \
@ -60,31 +55,12 @@ post-patch:
${SED} -e 's|%%%PLAT%%%|${MACHINE_ARCH}-NetBSD-tcp|' \
progs/glush/Makefile.input > progs/glush/Makefile
# the glunix group needs to exist before building.
pre-configure:
${CP} ${FILESDIR}/Makefile-2 ${WRKSRC}/Makefile
@if `${GROUP_CMD} info -e glunix`; then \
${ECHO} Group \'glunix\' already exists.; \
else \
${GROUP_CMD} add glunix; \
fi
pre-install:
@${ECHO} "updating /etc/shells";
${CP} /etc/shells /etc/shells.bak;
( ${GREP} -v ${NOW_ROOT}/bin/glush /etc/shells.bak; \
${ECHO} ${NOW_ROOT}/bin/glush \
) >/etc/shells
@if `${USER_CMD} info -e glunix`; then \
${ECHO} User \'glunix\' already exists.; \
else \
${USER_CMD} add -g glunix -d /nonexistent \
-s ${NOW_ROOT}/bin/glush glunix; \
fi;
post-install:
@${LN} -s ../../now/lib/libglunix.so.1.0 ${PREFIX}/now/lib/libglunix.so.1
@${LN} -s ../../now/lib/libglunix.so.1.0 ${PREFIX}/now/lib/libglunix.so
@${TOUCH} ${NOW_ROOT}/lib/${MACHINE_ARCH}-${OPSYS}-tcp/.keepme
${LN} -s libglunix.so.1.0 ${PREFIX}/now/lib/libglunix.so.1
${LN} -s libglunix.so.1.0 ${PREFIX}/now/lib/libglunix.so
${TOUCH} ${NOW_ROOT}/lib/${MACHINE_ARCH}-${OPSYS}-tcp/.keepme
.include "../../mk/bsd.pkg.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.2 2005/05/29 11:23:14 wiz Exp $
@comment $NetBSD: PLIST,v 1.3 2006/07/05 06:53:13 jlam Exp $
now/bin/${MACHINE_ARCH}-${OPSYS}-tcp/daemon
now/bin/${MACHINE_ARCH}-${OPSYS}-tcp/master
now/bin/GLUnix-bin
@ -26,8 +26,6 @@ now/bin/glups
now/bin/gluptime
now/bin/glurun
now/bin/glush
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (/usr/bin/grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (/usr/bin/grep -v %D/%F /etc/shells.bak) >/etc/shells
now/bin/glustat
now/bin/glutestnode
now/bin/mhtml2html