From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B9841138595 for ; Sun, 20 Jan 2013 11:42:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9D53221C005; Sun, 20 Jan 2013 11:42:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1DEC421C005 for ; Sun, 20 Jan 2013 11:42:34 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0FD5B33DAD0 for ; Sun, 20 Jan 2013 11:42:33 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2262) id C9D572171D; Sun, 20 Jan 2013 11:42:30 +0000 (UTC) From: "Pacho Ramos (pacho)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, pacho@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog readme.gentoo.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog readme.gentoo.eclass X-VCS-Directories: eclass X-VCS-Committer: pacho X-VCS-Committer-Name: Pacho Ramos Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130120114230.C9D572171D@flycatcher.gentoo.org> Date: Sun, 20 Jan 2013 11:42:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e592d077-9084-4535-9444-ae37711a30cb X-Archives-Hash: f34d8110fefa57d9b65c31ae12d9a51f pacho 13/01/20 11:42:30 Modified: ChangeLog Added: readme.gentoo.eclass Log: Finally commit readme.gentoo.eclass to create a README.gentoo doc file recording tips shown via elog messages first time the package is merged. Revision Changes Path 1.627 eclass/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.627&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.627&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.626&r2=1.627 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v retrieving revision 1.626 retrieving revision 1.627 diff -u -r1.626 -r1.627 --- ChangeLog 18 Jan 2013 15:00:31 -0000 1.626 +++ ChangeLog 20 Jan 2013 11:42:30 -0000 1.627 @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.626 2013/01/18 15:00:31 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.627 2013/01/20 11:42:30 pacho Exp $ + + 20 Jan 2013; Pacho Ramos +readme.gentoo.eclass: + Finally commit readme.gentoo.eclass to create a README.gentoo doc file + recording tips shown via elog messages first time the package is merged. 18 Jan 2013; Justin Lecher intel-sdp.eclass: No EPREFIX with helper functions 1.1 eclass/readme.gentoo.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/readme.gentoo.eclass?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/readme.gentoo.eclass?rev=1.1&content-type=text/plain Index: readme.gentoo.eclass =================================================================== # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/eclass/readme.gentoo.eclass,v 1.1 2013/01/20 11:42:30 pacho Exp $ # @ECLASS: readme.gentoo # @MAINTAINER: # Pacho Ramos # @AUTHOR: # Author: Pacho Ramos # @BLURB: An eclass for installing a README.gentoo doc file recording tips # shown via elog messages. # @DESCRIPTION: # An eclass for installing a README.gentoo doc file recording tips # shown via elog messages. With this eclass, those elog messages will only be # shown at first package installation and a file for later reviewing will be # installed under /usr/share/doc/${PF} if [[ ${___ECLASS_ONCE_README_GENTOO} != "recur -_+^+_- spank" ]] ; then ___ECLASS_ONCE_README_GENTOO="recur -_+^+_- spank" inherit eutils case "${EAPI:-0}" in 0|1|2|3) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; 4|5) # EAPI>=4 is required for REPLACING_VERSIONS preventing us # from needing to export another pkg_preinst phase to save has_version # result. Also relies on EAPI >=4 default src_install phase. ;; *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; esac EXPORT_FUNCTIONS src_install pkg_postinst # @FUNCTION: readme.gentoo_create_doc # @DESCRIPTION: # Create doc file with ${DOC_CONTENTS} variable (preferred) and, if not set, # look for "${FILESDIR}/README.gentoo" contents. You can use # ${FILESDIR}/README.gentoo-${SLOT} also. # Usually called at src_install phase. readme.gentoo_create_doc() { debug-print-function ${FUNCNAME} "${@}" if [[ -n "${DOC_CONTENTS}" ]]; then eshopts_push set -f echo ${DOC_CONTENTS} | fmt > "${T}"/README.gentoo eshopts_pop dodoc "${T}"/README.gentoo else if [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo dodoc "${T}"/README.gentoo else if [[ -f "${FILESDIR}/README.gentoo" ]]; then cp "${FILESDIR}/README.gentoo" "${T}"/README.gentoo dodoc "${T}"/README.gentoo else die "You are not specifying README.gentoo contents!" fi fi fi } # @FUNCTION: readme.gentoo_print_elog # @DESCRIPTION: # Print elog messages with "${T}"/README.gentoo contents. # Usually called at pkg_postinst phase. readme.gentoo_print_elog() { debug-print-function ${FUNCNAME} "${@}" if [[ -f "${T}"/README.gentoo ]]; then if ! [[ "${REPLACING_VERSIONS}" ]]; then eshopts_push set -f cat "${T}"/README.gentoo | while read -r ELINE; do elog "${ELINE}"; done eshopts_pop fi else die "README.gentoo wasn't created at src_install!" fi } # @FUNCTION: readme.gentoo_src_install # @DESCRIPTION: # Install generated doc file automatically. readme.gentoo_src_install() { debug-print-function ${FUNCNAME} "${@}" default readme.gentoo_create_doc } # @FUNCTION: readme.gentoo_pkg_postinst # @DESCRIPTION: # Show elog messages from from just generated doc file. readme.gentoo_pkg_postinst() { debug-print-function ${FUNCNAME} "${@}" readme.gentoo_print_elog } fi