# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Easy to use GUI & CLI alternative for etc-update..." HOMEPAGE="http://people.zeelandnet.nl/xentric/cfg-update/" SRC_URI="http://people.zeelandnet.nl/xentric/cfg-update/${PF}.tar.gz" LICENSE="GPL-2" SLOT="0" IUSE="" KEYWORDS="x86 ppc sparc alpha mips hppa arm amd64 ia64" RDEPEND=">=dev-lang/perl-5.0 >=sys-apps/textutils-2.0 >=sys-apps/gawk-3.0 >=sys-apps/grep-2.0 >=dev-util/xxdiff-2.9 >=app-portage/gentoolkit-0.1.30" src_unpack() { unpack ${PF}.tar.gz } pkg_preinst() { einfo "Removing old script (non-ebuild version) if it exists..." rm /usr/local/bin/cfg-update 2>/dev/null einfo "Saving old checksum-index if it exists..." mv /etc/cfg-update.index /tmp/checksum.index 2>/dev/null mv /usr/lib/cfg-update/checksum.index /tmp/checksum.index 2>/dev/null } pkg_prerm() { ewarn "You should manually disable the alias for emerge in /etc/profile" ewarn "and remove the checksum-index from /usr/lib/cfg-update if you unmerge" ewarn "this package. The ebuild cannot do this for you !" } src_install() { exeinto /usr/lib/cfg-update doexe cfg-update.pl dodir /usr/bin dosym /usr/lib/cfg-update/cfg-update.pl /usr/bin/cfg-update insinto /usr/lib/cfg-update doins .bashrc doins .bash_profile doins .Xdefaults doins README doins COPYING doins ChangeLog doman *.8 } pkg_postinst() { einfo "Checking root environment..." cfg-update --check einfo "Creating alias for emerge in /etc/profile..." cfg-update --on einfo "Sourcing /etc/profile..." source /etc/profile 2>/dev/null einfo "Creating new checksum-index if necessary..." cfg-update --index einfo "Importing old checksum-index if it exists..." mv /tmp/checksum.index /usr/lib/cfg-update/checksum.index 2>/dev/null }