diff options
author | merakor <cem@ckyln.com> | 2021-11-03 11:11:03 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-11-03 11:11:03 +0000 |
commit | 14c6c527e8bb97e780cef4f47fdf2f29d741ad0e (patch) | |
tree | 29014ecd3bbae5b6b1a41da4d7dc200996400d4c | |
parent | 82091c4496d74c1ba8e7533ce3ef5871f8b71e32 (diff) | |
download | cpt-14c6c527e8bb97e780cef4f47fdf2f29d741ad0e.tar.gz |
add some hook examples
FossilOrigin-Name: 5b6f01a9c9d80dcee6444d8ad23839eb1fa9546c30dfb4f83350c2bbab44fab7
-rw-r--r-- | examples/hooks/clean-packages | 7 | ||||
-rw-r--r-- | examples/hooks/makewhatis | 10 |
2 files changed, 17 insertions, 0 deletions
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 |