head	1.3;
access;
symbols
	pkgsrc-2013Q2:1.3.0.54
	pkgsrc-2013Q2-base:1.3
	pkgsrc-2012Q4:1.3.0.52
	pkgsrc-2012Q4-base:1.3
	pkgsrc-2011Q4:1.3.0.50
	pkgsrc-2011Q4-base:1.3
	pkgsrc-2011Q2:1.3.0.48
	pkgsrc-2011Q2-base:1.3
	pkgsrc-2009Q4:1.3.0.46
	pkgsrc-2009Q4-base:1.3
	pkgsrc-2008Q4:1.3.0.44
	pkgsrc-2008Q4-base:1.3
	pkgsrc-2008Q3:1.3.0.42
	pkgsrc-2008Q3-base:1.3
	cube-native-xorg:1.3.0.40
	cube-native-xorg-base:1.3
	pkgsrc-2008Q2:1.3.0.38
	pkgsrc-2008Q2-base:1.3
	pkgsrc-2008Q1:1.3.0.36
	pkgsrc-2008Q1-base:1.3
	pkgsrc-2007Q4:1.3.0.34
	pkgsrc-2007Q4-base:1.3
	pkgsrc-2007Q3:1.3.0.32
	pkgsrc-2007Q3-base:1.3
	pkgsrc-2007Q2:1.3.0.30
	pkgsrc-2007Q2-base:1.3
	pkgsrc-2007Q1:1.3.0.28
	pkgsrc-2007Q1-base:1.3
	pkgsrc-2006Q4:1.3.0.26
	pkgsrc-2006Q4-base:1.3
	pkgsrc-2006Q3:1.3.0.24
	pkgsrc-2006Q3-base:1.3
	pkgsrc-2006Q2:1.3.0.22
	pkgsrc-2006Q2-base:1.3
	pkgsrc-2006Q1:1.3.0.20
	pkgsrc-2006Q1-base:1.3
	pkgsrc-2005Q4:1.3.0.18
	pkgsrc-2005Q4-base:1.3
	pkgsrc-2005Q3:1.3.0.16
	pkgsrc-2005Q3-base:1.3
	pkgsrc-2005Q2:1.3.0.14
	pkgsrc-2005Q2-base:1.3
	pkgsrc-2005Q1:1.3.0.12
	pkgsrc-2005Q1-base:1.3
	pkgsrc-2004Q4:1.3.0.10
	pkgsrc-2004Q4-base:1.3
	pkgsrc-2004Q3:1.3.0.8
	pkgsrc-2004Q3-base:1.3
	pkgsrc-2004Q2:1.3.0.6
	pkgsrc-2004Q2-base:1.3
	pkgsrc-2004Q1:1.3.0.4
	pkgsrc-2004Q1-base:1.3
	pkgsrc-2003Q4:1.3.0.2
	pkgsrc-2003Q4-base:1.3
	buildlink2-base:1.3
	netbsd-1-5-PATCH001:1.1;
locks; strict;
comment	@# @;


1.3
date	2001.11.01.01.17.58;	author zuntum;	state dead;
branches;
next	1.2;

1.2
date	2001.07.13.07.09.23;	author jlam;	state Exp;
branches;
next	1.1;

1.1
date	2000.12.06.06.33.40;	author jlam;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Move pkg/ files into package's toplevel directory
@
text
@#!/bin/sh
#
# $NetBSD: DEINSTALL,v 1.2 2001/07/13 07:09:23 jlam Exp $

PKGNAME=$1
STAGE=$2

CAT="@@CAT@@"
CMP="@@CMP@@"
RM="@@RM@@"

SAMPLECONFDIR=${PKG_PREFIX}/share/examples/sudo
CONFDIR=/etc
CONFFILES="sudoers"

case ${STAGE} in
DEINSTALL)
	# Remove configuration files if they don't differ from the default
	# config file.
	#
	for file in ${CONFFILES}
	do
		FILE=${CONFDIR}/${file}
		SAMPLEFILE=${SAMPLECONFDIR}/${file}
		if ${CMP} -s ${FILE} ${SAMPLEFILE}
		then
			${RM} -f ${FILE}
		fi
	done
	;;

POST-DEINSTALL)
	modified_files=''
	for file in ${CONFFILES}
	do
		FILE=${CONFDIR}/${file}
		if [ -f ${FILE} ]
		then
			modified_files="${modified_files} ${FILE}"
		fi
	done
	if [ -n "${modified_files}" ]
	then
		${CAT} << EOF
===========================================================================
If you won't be using ${PKGNAME} any longer, you may want to remove the
following files:

EOF
		for file in ${modified_files}
		do
			echo "	${file}"
		done
		${CAT} << EOF
===========================================================================
EOF
	fi
	;;

*)
	echo "Unexpected argument: ${STAGE}"
	exit 1
	;;
esac
exit 0
@


1.2
log
@In package Makefiles, create FILES_SUBST instead of duplicating sed
expression for substituting in DEINSTALL/INSTALL scripts.  Use "${CMP} -s"
instead of "diff -q" since the former is more portable across OSes.
@
text
@d3 1
a3 1
# $NetBSD: DEINSTALL,v 1.1 2000/12/06 06:33:40 jlam Exp $
@


1.1
log
@* Cosmetic changes to Makefile.
* Use DEINSTALL/INSTALL scripts to handle config files.
* Install the UPGRADE file and add a MESSAGE file to refer to it, instead
  of spewing a big file every time sudo is installed.
@
text
@d3 1
a3 1
# $NetBSD$
d8 4
d25 1
a25 1
		if diff -q ${FILE} ${SAMPLEFILE} >/dev/null
d27 1
a27 1
			rm -f ${FILE}
d31 1
d44 1
a44 1
		cat << EOF
d54 1
a54 1
		cat << EOF
d59 1
@

