From 5a324a1142d649e24a72543a6ad0855b0c1780cf Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 25 Jan 2015 02:07:48 +0000 Subject: profiles/common: Add a drop-doc pre_pkg_preinst hook --- profiles/common/profile.bashrc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'profiles') diff --git a/profiles/common/profile.bashrc b/profiles/common/profile.bashrc index 93166759..4eccbc31 100644 --- a/profiles/common/profile.bashrc +++ b/profiles/common/profile.bashrc @@ -38,6 +38,26 @@ function __drop-nls-locales () { done } +function __drop-doc () { + # FEATURES=nodoc does not care about everything + if ! has nodoc ${FEATURES} ; then + return 0 + fi + + local -a _DIRS=( + /usr/share/gtk-doc + ) + + for _dir in "${_DIRS[@]}" ; do + if [[ ! -d "${ED}/${_dir}" ]] ; then + continue + fi + + einfo "Removing ${_dir}" + rm -rf "${ED}/${_dir}" + done +} + function __drop-empty-dir () { local i @@ -118,6 +138,7 @@ function pre_pkg_preinst () { __drop-nls-man-pages __drop-nls-locales + __drop-doc __drop-empty-dir } -- cgit v1.2.3