# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-portage/cfg-update/cfg-update-1.8.0-r6.ebuild,v 1.7 2007/03/13 15:45:33 gustavoz Exp $ DESCRIPTION="Safe automatic updating of configuration files, merging files in GUI and multiple system updating from one location..." HOMEPAGE="http://people.zeelandnet.nl/xentric/" SRC_URI="http://people.zeelandnet.nl/xentric/${PF}.tar.gz" LICENSE="GPL-2" SLOT="0" IUSE="kde gnome X" KEYWORDS="~amd64 ~ppc ~sparc ~x86" RDEPEND="sys-apps/findutils kde? ( >=x11-misc/sux-1.0 x11-apps/xhost ) gnome? ( >=x11-misc/sux-1.0 x11-apps/xhost ) X? ( >=x11-misc/sux-1.0 x11-apps/xhost )" RESTRICT="userpriv primaryuri" S=${WORKDIR}/${PF} pkg_prerm() { ebegin "Disabling Portage hook" /usr/bin/cfg-update --ebuild --disable-portage-hook eend $? ebegin "Disabling Paludis hook" /usr/bin/cfg-update --ebuild --disable-paludis-hook eend $? } pkg_postrm() { ewarn "********************************************************************" ewarn "If you want to permanently remove cfg-update from your system you" ewarn "can manually remove the index: rm /var/lib/cfg-update/checksum.index" ewarn "and all config file backups: rm -rf /var/lib/cfg-update/backups" ewarn ewarn "If you are just updating to a newer version you do not have to" ewarn "do anything. The hook for Portage and/or Paludis will be enabled" ewarn "automatically the next time you use cfg-update..." ewarn "********************************************************************" } src_install() { exeinto /usr/bin doexe cfg-update doexe emerge_with_indexing_for_cfg-update emerge_with_indexing_for_cfg-update_phphelper cfg-update_phphelper emerge_with_indexing_for_cfg-update_bashhelper insinto /usr/lib/cfg-update doins cfg-update cfg-update_indexing .bashrc test.tgz dodoc ChangeLog doman *.8 insinto /etc doins cfg-update.conf doins cfg-update.hosts keepdir /var/lib/cfg-update } pkg_postinst() { if [[ ! -e "${ROOT}"/var/lib/cfg-update/checksum.index \ && -e "${ROOT}"/usr/lib/cfg-update/checksum.index ]] then ebegin "Moving checksum.index to /var/lib/cfg-update" mv "${ROOT}"/usr/lib/cfg-update/checksum.index \ "${ROOT}"/var/lib/cfg-update/checksum.index eend $? fi if [[ -e "${ROOT}"/usr/bin/paludis ]] then ewarn ewarn "********************************************************************" ewarn " NOTE FOR PALUDIS USERS" ewarn "********************************************************************" ewarn "If you have used Paludis version <0.20.0 on your system, chances are" ewarn "that you have some corrupted CONTENTS files on your system..." ewarn ewarn "Please run: cfg-update --check-packages" ewarn ewarn "The above command will check all packages installed with Paludis and" ewarn "will output a list of packages that need to be re-installed with" ewarn "Paludis 0.20.0 or higher. If you do not re-install these packages" ewarn "you risk losing your custom settings when updating configuration" ewarn "files, that belong to these packages, with cfg-update!" ewarn "********************************************************************" ewarn fi ebegin "Moving backups to /var/lib/cfg-update/backups" /usr/bin/cfg-update --ebuild --move-backups eend $? ewarn ewarn "********************************************************************" ewarn " FIRST TIME INSTALLATION NOTES " ewarn "********************************************************************" ewarn "If this is a first time install, please check the configuration" ewarn "in /etc/cfg-update.conf before using cfg-update:" ewarn ewarn "If your system does not have an X-server installed you need to" ewarn "change the MERGE_TOOL to sdiff, imediff2 or vimdiff." ewarn "If you have X installed, set MERGE_TOOL to your favorite GUI tool:" ewarn "xxdiff (default), kdiff3, meld, gtkdiff, gvimdiff, tkdiff" ewarn ewarn "TIP: to maximize the chances of future automatic updates, run:" ewarn "cfg-update --optimize-backups" ewarn ewarn "For an example of an updating session with screenshots visit:" ewarn "http://people.zeelandnet.nl/xentric" ewarn "********************************************************************" ewarn }