summarylogtreecommitdiffstats
path: root/bbswitch-dkms-git.install
diff options
context:
space:
mode:
Diffstat (limited to 'bbswitch-dkms-git.install')
-rw-r--r--bbswitch-dkms-git.install25
1 files changed, 25 insertions, 0 deletions
diff --git a/bbswitch-dkms-git.install b/bbswitch-dkms-git.install
new file mode 100644
index 000000000000..2748873ba54f
--- /dev/null
+++ b/bbswitch-dkms-git.install
@@ -0,0 +1,25 @@
+PKGVER="$(ls /usr/src/ | grep bbswitch | sed 's/^.*-//')"
+_dkms="/usr/bin/dkms"
+
+
+post_install() {
+ ${_dkms} add -m "bbswitch/${PKGVER}"
+ ${_dkms} build -m "bbswitch/${PKGVER}"
+ ${_dkms} install -m "bbswitch/${PKGVER}"
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ ${_dkms} remove -m "bbswitch/${PKGVER}" --all
+}
+
+pre_upgrade() {
+ pre_remove
+}
+
+post_remove() {
+ depmod -a
+}