Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=44367657dd22976f291f5cf70414a098e0f20516
commit 44367657dd22976f291f5cf70414a098e0f20516 Author: Michel Hermier <[email protected]> Date: Tue Nov 20 08:11:57 2012 +0100 scripts/makepkg * Added _pkg_documentation_hook and _pkg_nodocumentation_hook, these populate (and fix) documentation or destroy the documentation respectively. diff --git a/scripts/makepkg b/scripts/makepkg index 85b40e5..5e4d514 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -1747,6 +1747,28 @@ fi # NOTE: _P_subpkgsfixes hook registration order is important. +_pkg_documentation_hook() +{ + mkdir -p usr/share/doc/$pkgname-$pkgver + + if [ -d usr/doc ]; then + mv usr/doc/* usr/share/doc/$pkgname-$pkgver + fi +} + +_pkg_nodocumentation_hook() +{ + rm -rf \ + usr/doc \ + usr/share/doc/"$1-$pkgver" \ + +} +if [ ! "`check_option NODOCS`" -a "$NODOCS" = "0" ]; then + _P_subpkgsfixes+=(_pkg_documentation_hook) +else + _P_subpkgsfixes+=(_pkg_nodocumentation_hook) +fi + _subpkgs_removeemptydirfix() { # FIXME: Make it more general (detect all dirs and try to remove them) @@ -1797,13 +1819,6 @@ do_subpkgsfixes() for d in $startdir/{pkg,pkg.*} do [ ! -d $d ] && continue - if [ -d $d/usr/doc ]; then - if [ ! "`check_option NODOCS`" -a "$NODOCS" = "0" ]; then - mkdir -p $d/usr/share/doc/$pkgname-$pkgver - cp -a $d/usr/doc/* $d/usr/share/doc/$pkgname-$pkgver - fi - rm -rf $d/usr/doc - fi # move /usr/info files to /usr/share/info if [ -d $d/usr/info ]; then _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
