aboutsummaryrefslogtreecommitdiff
path: root/Keywords
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-12-26 12:43:44 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-12-26 12:43:44 +0000
commit8d8d775b8be5e57ef631209844e079a5df524841 (patch)
tree441699559e408c095c00525e4626070ae8422c40 /Keywords
parent729a381c7f4c2ce7b0bf0d2acbbd3b96e36303e6 (diff)
downloadports-8d8d775b8be5e57ef631209844e079a5df524841.tar.gz
ports-8d8d775b8be5e57ef631209844e079a5df524841.zip
Use a custom keyword for kldxref, that allows to control exactly when it is run
and work nicer with automatic directly support from pkg Differential Revision: https://reviews.freebsd.org/D1377 Reviewed by: rene, antoine Approved by: rene
Notes
Notes: svn path=/head/; revision=375621
Diffstat (limited to 'Keywords')
-rw-r--r--Keywords/kld.ucl24
1 files changed, 24 insertions, 0 deletions
diff --git a/Keywords/kld.ucl b/Keywords/kld.ucl
new file mode 100644
index 000000000000..d13a0a86f5b3
--- /dev/null
+++ b/Keywords/kld.ucl
@@ -0,0 +1,24 @@
+# $FreeBSD$
+#
+# MAINTAINER: rene@FreeBSD.org
+
+actions: []
+post-install: <<EOD
+ case "%@" in
+ /*) kmoddir="%@" ;;
+ *) kmoddir="%D/%@" ;;
+ esac
+ /usr/sbin/kldxref ${kmoddir}
+EOD
+post-deinstall: <<EOD
+ case "%@" in
+ /*) kmoddir="%@" ;;
+ *) kmoddir="%D/%@" ;;
+ esac
+ /usr/sbin/kldxref ${kmoddir}
+ case "${kmoddir}" in
+ %D/*) ;;
+ /boot/modules) ;;
+ *) rmdir -p ${kmoddir} 2>/dev/null || true ;;
+ esac
+EOD