aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ali Polatel <polatel@gmail.com> 2009-03-09 18:02:28 +0200
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-03-09 16:04:26 +0000
commite00d700edbbe61235fba480c26da58a2bdf07246 (patch)
tree7e73e017b3de52e07bbe187f451db201d3f1e452
parent24cdbd97f6c3655144af0a4934d642ef6567bf58 (diff)
downloadpaludis-e00d700edbbe61235fba480c26da58a2bdf07246.tar.gz
paludis-e00d700edbbe61235fba480c26da58a2bdf07246.tar.xz
add emagicdocs function
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/build_functions.bash40
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/src_install.bash37
2 files changed, 41 insertions, 36 deletions
diff --git a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
index c1ef91c..dd35b32 100644
--- a/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/build_functions.bash
@@ -3,6 +3,7 @@
# Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
# Copyright (c) 2008 Bo ├śrsted Andresen
+# Copyright (c) 2009 David Leverton
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -185,3 +186,42 @@ einstall()
fi
}
+emagicdocs()
+{
+ done_docs=
+ old_set=$(shopt | grep 'nocaseglob[[:space:]]*on')
+ shopt -s nocaseglob
+ for d in '' "${DEFAULT_SRC_INSTALL_EXTRA_SUBDIRS[@]}" ; do
+ if [[ -n ${d} ]]; then
+ [[ -d ${d} ]] || die "${d} is not a dir"
+ pushd "${d}" > /dev/null || die "Failed to enter ${d}"
+ local docdesttree="${DOCDESTTREE}"
+ docinto "${d}"
+ fi
+ for f in README Change{,s,Log} AUTHORS NEWS TODO ABOUT THANKS {KNOWN_,}BUGS SUBMITTING \
+ HACKING FAQ CREDITS PKG-INFO HISTORY PACKAGING MAINTAINER{,S} CONTRIBUT{E,OR,ORS} RELEASE \
+ ANNOUNCE PORTING NOTES PROBLEMS NOTICE "${DEFAULT_SRC_INSTALL_EXTRA_DOCS[@]}"; do
+ for p in "${DEFAULT_SRC_INSTALL_EXTRA_PREFIXES[@]}" '' ; do
+ for doc in "${p}"*([[:digit:]])"${f}"{,+([._-])*} ; do
+ if [[ -s "${doc}" ]] ; then
+ for e in "${DEFAULT_SRC_INSTALL_EXCLUDE[@]}" ; do
+ [[ ${doc} == ${e} ]] && continue 2
+ done
+ done_docs="${done_docs} ${d%/}${d:+/}${doc}"
+ dodoc "${doc}"
+ fi
+ done
+ done
+ done
+ if [[ -n ${d} ]]; then
+ docinto "${docdesttree}"
+ popd > /dev/null || die "Failed to leave ${d}"
+ fi
+ done
+ if [[ -n "${done_docs}" ]] ; then
+ echo "Installed docs ${done_docs# }"
+ else
+ echo "Didn't find any docs to install"
+ fi
+ [[ -n ${old_set} ]] || shopt -u nocaseglob
+}
diff --git a/paludis/repositories/e/ebuild/exheres-0/src_install.bash b/paludis/repositories/e/ebuild/exheres-0/src_install.bash
index ae66dfa..97516b2 100644
--- a/paludis/repositories/e/ebuild/exheres-0/src_install.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/src_install.bash
@@ -33,42 +33,7 @@ default_src_install()
else
echo "No makefile found, not using emake install"
fi
- done_docs=
- old_set=$(shopt | grep 'nocaseglob[[:space:]]*on')
- shopt -s nocaseglob
- for d in '' "${DEFAULT_SRC_INSTALL_EXTRA_SUBDIRS[@]}" ; do
- if [[ -n ${d} ]]; then
- [[ -d ${d} ]] || die "${d} is not a dir"
- pushd "${d}" > /dev/null || die "Failed to enter ${d}"
- local docdesttree="${DOCDESTTREE}"
- docinto "${d}"
- fi
- for f in README Change{,s,Log} AUTHORS NEWS TODO ABOUT THANKS {KNOWN_,}BUGS SUBMITTING \
- HACKING FAQ CREDITS PKG-INFO HISTORY PACKAGING MAINTAINER{,S} CONTRIBUT{E,OR,ORS} RELEASE \
- ANNOUNCE PORTING NOTES PROBLEMS NOTICE "${DEFAULT_SRC_INSTALL_EXTRA_DOCS[@]}"; do
- for p in "${DEFAULT_SRC_INSTALL_EXTRA_PREFIXES[@]}" '' ; do
- for doc in "${p}"*([[:digit:]])"${f}"{,+([._-])*} ; do
- if [[ -s "${doc}" ]] ; then
- for e in "${DEFAULT_SRC_INSTALL_EXCLUDE[@]}" ; do
- [[ ${doc} == ${e} ]] && continue 2
- done
- done_docs="${done_docs} ${d%/}${d:+/}${doc}"
- dodoc "${doc}"
- fi
- done
- done
- done
- if [[ -n ${d} ]]; then
- docinto "${docdesttree}"
- popd > /dev/null || die "Failed to leave ${d}"
- fi
- done
- if [[ -n "${done_docs}" ]] ; then
- echo "Installed docs ${done_docs# }"
- else
- echo "Didn't find any docs to install"
- fi
- [[ -n ${old_set} ]] || shopt -u nocaseglob
+ emagicdocs
}
src_install()