summarylogtreecommitdiffstats
path: root/douane-dkms-git.install
diff options
context:
space:
mode:
Diffstat (limited to 'douane-dkms-git.install')
-rw-r--r--[l---------]douane-dkms-git.install16
1 files changed, 15 insertions, 1 deletions
diff --git a/douane-dkms-git.install b/douane-dkms-git.install
index 881825df91f3..efdeb0e2126b 120000..100644
--- a/douane-dkms-git.install
+++ b/douane-dkms-git.install
@@ -1 +1,15 @@
-douane-dkms.install \ No newline at end of file
+post_install() {
+ dkms install -m douane -v ${1%%-*}
+}
+pre_upgrade() {
+ local curver=${2%%-*}
+ # $2 is unset due to a bug. Query current version using pacman as fallback
+ [ -n "$curver" ] || curver=$(pacman -Qi douane-dkms | awk '/^Version/{print $3}')
+ pre_remove $curver
+}
+post_upgrade() {
+ post_install ${1%%-*}
+}
+pre_remove() {
+ dkms remove -m douane -v ${1%%-*} --all
+}