From 14c6c527e8bb97e780cef4f47fdf2f29d741ad0e Mon Sep 17 00:00:00 2001 From: merakor Date: Wed, 3 Nov 2021 11:11:03 +0000 Subject: add some hook examples FossilOrigin-Name: 5b6f01a9c9d80dcee6444d8ad23839eb1fa9546c30dfb4f83350c2bbab44fab7 --- examples/hooks/clean-packages | 7 +++++++ examples/hooks/makewhatis | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 examples/hooks/clean-packages create mode 100644 examples/hooks/makewhatis (limited to 'examples') diff --git a/examples/hooks/clean-packages b/examples/hooks/clean-packages new file mode 100644 index 0000000..972eb31 --- /dev/null +++ b/examples/hooks/clean-packages @@ -0,0 +1,7 @@ +# -*- mode: sh; -*- +# clean-packages -- Remove documentation, and locales from packages. +case $TYPE in + post-build) + rm -rf "$DEST/usr/share/locale" \ + "$DEST/usr/share/doc" +esac diff --git a/examples/hooks/makewhatis b/examples/hooks/makewhatis new file mode 100644 index 0000000..5c38001 --- /dev/null +++ b/examples/hooks/makewhatis @@ -0,0 +1,10 @@ +# -*- mode: sh; -*- +# Run makewhatis if a manual page is installed, or removed +case $TYPE in + post-install|pre-remove) + grep -q "^/usr/share/man/" "$DEST/manifest" && + run_makewhatis=1 + ;; + end-install|end-remove) + [ "$run_makewhatis" ] && makewhatis "$DEST/usr/share/man" +esac -- cgit v1.2.3