--- bzr/bzr-0.91.ebuild 2007-09-26 18:46:10.000000000 +0200 +++ /home/fauli/bzr-0.91.ebuild 2007-10-04 13:20:15.000000000 +0200 @@ -29,6 +29,7 @@ $python_rdep" PYTHON_MODNAME="bzrlib" +SITEFILE=71${PN}-gentoo.el DOCS="doc/*.txt" @@ -58,9 +59,11 @@ docinto user-reference dodoc doc/en/user-reference/* if use emacs; then - insinto "${SITELISP}" - doins contrib/emacs/bzr-mode.el* - elisp-site-file-install "${FILESDIR}/70bzr-gentoo.el" + elisp-install ${PN} contrib/emacs/*.el* || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die "elisp-site-file-install failed" + # don't add automatically to the load-path, so the sitefile + # can do a conditional loading + touch "${D}${SITELISP}/${PN}/.nosearch" fi insinto /usr/share/zsh/site-functions doins contrib/zsh/_bzr @@ -69,8 +72,15 @@ pkg_postinst() { distutils_pkg_postinst - use emacs && elisp-site-regen bash-completion_pkg_postinst + if use emacs; then + elisp-site-regen + elog "If you are using a GNU Emacs version greater than 22.1, bzr support" + elog "is already included. This ebuild does not automatically activate bzr support" + elog "in versions below, but prepares it in a way you can load it from your ~/.emacs" + elog "file by adding" + elog " (load \"bzr-mode\")" + fi } pkg_postrm() {