[arch-commits] Commit in linux/trunk (PKGBUILD)

Jan Steffens heftig at archlinux.org
Tue Aug 21 21:12:21 UTC 2018


    Date: Tuesday, August 21, 2018 @ 21:12:21
  Author: heftig
Revision: 332776

FS#59688 - Install HTML docs

Modified:
  linux/trunk/PKGBUILD

----------+
 PKGBUILD |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-21 19:24:55 UTC (rev 332775)
+++ PKGBUILD	2018-08-21 21:12:21 UTC (rev 332776)
@@ -11,7 +11,7 @@
 arch=(x86_64)
 url="https://git.archlinux.org/linux.git/log/?h=v$_srcver"
 license=(GPL2)
-makedepends=(xmlto kmod inetutils bc libelf git)
+makedepends=(xmlto kmod inetutils bc libelf git python-sphinx graphviz)
 options=('!strip')
 _srcname=archlinux-linux
 source=(
@@ -62,7 +62,7 @@
 
 build() {
   cd $_srcname
-  make bzImage modules
+  make bzImage modules htmldocs
 }
 
 _package() {
@@ -211,6 +211,18 @@
   mkdir -p "$builddir"
   cp -t "$builddir" -a Documentation
 
+  msg2 "Removing doctrees..."
+  rm -r "$builddir/Documentation/output/.doctrees"
+
+  msg2 "Moving HTML docs..."
+  local src dst
+  while read -rd '' src; do
+    dst="$builddir/Documentation/${src#$builddir/Documentation/output/}"
+    mkdir -p "${dst%/*}"
+    mv "$src" "$dst"
+    rmdir -p --ignore-fail-on-non-empty "${src%/*}"
+  done < <(find "$builddir/Documentation/output" -type f -print0)
+
   msg2 "Adding symlink..."
   mkdir -p "$pkgdir/usr/share/doc"
   ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"



More information about the arch-commits mailing list