diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-10-14 18:03:52 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-10-14 18:03:52 +0000 |
commit | 5571a69fad51adc43df1f6d7296e9d7fe74e2cd3 (patch) | |
tree | 8e2fe22a95911dd7047fe6974c1f71d25bce709c | |
parent | 0.8.22 version bump and remove old. (diff) | |
download | gentoo-2-5571a69fad51adc43df1f6d7296e9d7fe74e2cd3.tar.gz gentoo-2-5571a69fad51adc43df1f6d7296e9d7fe74e2cd3.tar.bz2 gentoo-2-5571a69fad51adc43df1f6d7296e9d7fe74e2cd3.zip |
Split out generation logic so people can quickly run it by hand when updating their eclasses.
(Portage version: 2.2.0_alpha65/cvs/Linux x86_64)
-rw-r--r-- | app-portage/eclass-manpages/ChangeLog | 9 | ||||
-rw-r--r-- | app-portage/eclass-manpages/eclass-manpages-20111014.ebuild | 25 | ||||
-rwxr-xr-x | app-portage/eclass-manpages/files/eclass-to-manpage.sh | 28 |
3 files changed, 61 insertions, 1 deletions
diff --git a/app-portage/eclass-manpages/ChangeLog b/app-portage/eclass-manpages/ChangeLog index 97d43e88af44..e78f934d80b5 100644 --- a/app-portage/eclass-manpages/ChangeLog +++ b/app-portage/eclass-manpages/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-portage/eclass-manpages # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.24 2011/08/22 04:49:21 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/ChangeLog,v 1.25 2011/10/14 18:03:52 vapier Exp $ + +*eclass-manpages-20111014 (14 Oct 2011) + + 14 Oct 2011; Mike Frysinger <vapier@gentoo.org> + +eclass-manpages-20111014.ebuild, +files/eclass-to-manpage.sh: + Split out generation logic so people can quickly run it by hand when updating + their eclasses. 22 Aug 2011; Mike Frysinger <vapier@gentoo.org> files/eclass-to-manpage.awk: Add sources.g.o url to SEE ALSO. diff --git a/app-portage/eclass-manpages/eclass-manpages-20111014.ebuild b/app-portage/eclass-manpages/eclass-manpages-20111014.ebuild new file mode 100644 index 000000000000..b959eed9a03e --- /dev/null +++ b/app-portage/eclass-manpages/eclass-manpages-20111014.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/eclass-manpages-20111014.ebuild,v 1.1 2011/10/14 18:03:52 vapier Exp $ + +DESCRIPTION="collection of Gentoo eclass manpages" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="" + +DEPEND="" +RDEPEND="!app-portage/portage-manpages" + +S=${WORKDIR} + +src_compile() { + "${FILESDIR}"/eclass-to-manpage.sh || die +} + +src_install() { + doman *.5 || die +} diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.sh b/app-portage/eclass-manpages/files/eclass-to-manpage.sh new file mode 100755 index 000000000000..149d5eeab826 --- /dev/null +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +: ${PORTDIR:=/usr/portage} +: ${ECLASSDIR:=${0%/*}/../../../eclass} +: ${FILESDIR:=${ECLASSDIR}/../app-portage/eclass-manpages/files} + +while [[ $# -gt 0 ]] ; do + case $1 in + -e) ECLASSDIR=$2; shift;; + -f) FILESDIR=$2; shift;; + *) break;; + esac + shift +done + +if [[ ! -d ${ECLASSDIR} ]] ; then + echo "Usage: ${0##*/} [-e eclassdir] [-f eclass-to-manpage.awk FILESDIR] [eclasses]" 1>&2 + exit 1 +fi + +[[ $# -eq 0 ]] && set -- "${ECLASSDIR}"/*.eclass + +for e in "$@" ; do + gawk \ + -vPORTDIR="${PORTDIR}" \ + -f "${FILESDIR}"/eclass-to-manpage.awk \ + ${e} > ${e##*/}.5 || rm -f ${e##*/}.5 +done |