summarylogtreecommitdiffstats
path: root/clevo-xsm-wmi-dkms.install
diff options
context:
space:
mode:
authorMarc Rozanc2015-07-06 23:59:11 +0200
committerMarc Rozanc2015-07-06 23:59:11 +0200
commit9d3d5842dc849e078f48ca4ef657daa31dbed2d3 (patch)
tree1d8780c49ad60f473158f4e021e8aa496c6da363 /clevo-xsm-wmi-dkms.install
downloadaur-9d3d5842dc849e078f48ca4ef657daa31dbed2d3.tar.gz
Initial import
Diffstat (limited to 'clevo-xsm-wmi-dkms.install')
-rw-r--r--clevo-xsm-wmi-dkms.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/clevo-xsm-wmi-dkms.install b/clevo-xsm-wmi-dkms.install
new file mode 100644
index 000000000000..a81d01b1819b
--- /dev/null
+++ b/clevo-xsm-wmi-dkms.install
@@ -0,0 +1,20 @@
+post_install() {
+ dkms install -m clevo-xsm-wmi -v ${1%%-*}
+}
+
+pre_upgrade() {
+ local curver=${2%%-*}
+ # $2 is unset due to a bug. See, https://bugs.archlinux.org/task/32278
+ # Query current version using pacman as fallback
+ [ -n "$curver" ] || curver=$(pacman -Q clevo-xsm-wmi-dkms | cut -d' ' -f2)
+ pre_remove $curver
+}
+
+post_upgrade() {
+ post_install ${1%%-*}
+}
+
+pre_remove() {
+ dkms remove -m clevo-xsm-wmi -v ${1%%-*} --all
+}
+