aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/hooks/clean-packages7
-rw-r--r--examples/hooks/makewhatis10
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