diff -prauN evilvte/evilvte-0.4.3.ebuild evilvte/evilvte-0.4.3.ebuild --- evilvte/evilvte-0.4.3.ebuild 2009-04-05 09:08:24.000000000 +0100 +++ evilvte/evilvte-0.4.3.ebuild 2009-05-05 00:52:54.000000000 +0100 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/x11-terms/evilvte/evilvte-0.4.3.ebuild,v 1.4 2008/11/27 22:04:44 armin76 Exp $ -inherit toolchain-funcs +inherit savedconfig toolchain-funcs DESCRIPTION="VTE based, super lightweight terminal emulator" HOMEPAGE="http://www.calno.com/evilvte" @@ -21,8 +21,11 @@ DEPEND="${RDEPEND} src_unpack() { unpack ${A} cd "${S}" + if [[ -f /etc/${PN}/config.h ]]; then cp /etc/${PN}/config.h src/ || die "copying config.h failed." + else + restore_config src/config.h fi } @@ -34,10 +37,18 @@ src_compile() { src_install() { emake DESTDIR="${D}" install || die "emake install failed." dodoc Changelog - insinto /etc/${PN} - doins src/config.h || die "doins failed." + save_config src/config.h } pkg_postinst() { - elog "Edit /etc/${PN}/config.h and re-emerge for custom configuration." + # Thanks busybox! + echo + einfo "This ebuild has support for user defined configs" + einfo "Please read this ebuild for more details and re-emerge as needed" + einfo "if you want to add or remove functionality for ${PN}" + echo + if [[ -f "${ROOT}"/etc/${PN}/config.h ]]; then + rm "${ROOT}"/etc/${PN}/config.h || die "Failed to remove old config in /etc/${PN}" + rmdir "${ROOT}"/etc/${PN} 2>/dev/null + fi } diff -prauN evilvte/evilvte-0.4.4_pre9.ebuild evilvte/evilvte-0.4.4_pre9.ebuild --- evilvte/evilvte-0.4.4_pre9.ebuild 2009-01-06 17:20:49.000000000 +0000 +++ evilvte/evilvte-0.4.4_pre9.ebuild 2009-05-05 00:53:06.000000000 +0100 @@ -4,7 +4,7 @@ MY_P=${P/_/\~} -inherit toolchain-funcs +inherit savedconfig toolchain-funcs DESCRIPTION="VTE based, super lightweight terminal emulator" HOMEPAGE="http://www.calno.com/evilvte" @@ -28,6 +28,8 @@ src_unpack() { if [[ -f /etc/${PN}/config.h ]]; then cp /etc/${PN}/config.h src/ || die "copying config.h failed." + else + restore_config src/config.h fi } @@ -39,10 +41,18 @@ src_compile() { src_install() { emake DESTDIR="${D}" install || die "emake install failed." dodoc Changelog - insinto /etc/${PN} - doins src/config.h || die "doins failed." + save_config src/config.h } pkg_postinst() { - elog "Edit /etc/${PN}/config.h and re-emerge for custom configuration." + # Thanks busybox! + echo + einfo "This ebuild has support for user defined configs" + einfo "Please read this ebuild for more details and re-emerge as needed" + einfo "if you want to add or remove functionality for ${PN}" + echo + if [[ -f "${ROOT}"/etc/${PN}/config.h ]]; then + rm "${ROOT}"/etc/${PN}/config.h || die "Failed to remove old config in /etc/${PN}" + rmdir "${ROOT}"/etc/${PN} 2>/dev/null + fi }