summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksii Vilchanskyi2017-07-28 18:26:33 +0200
committerOleksii Vilchanskyi2017-07-28 18:26:33 +0200
commit667c0407493d35eae953cdc6add4412a1370d962 (patch)
tree0a03e20915c5b5f0f136e68d7fa5c0c469b32137
parent6ab3e81dbdfeef27147c0a24c350b90906c410ab (diff)
downloadaur-667c0407493d35eae953cdc6add4412a1370d962.tar.gz
Provide [pre|post]-[install|upgrade|remove] funcs
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rwxr-xr-xckb-next.install37
3 files changed, 30 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bb6304f13bf6..abd26f02d008 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ckb-next
pkgdesc = Corsair Keyboard and Mouse Input Driver, release version
pkgver = 0.2.8
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/mattanger/ckb-next
install = ckb-next.install
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index 376123c8968d..edcbc94e4108 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=ckb-next
pkgver=0.2.8
-pkgrel=2
+pkgrel=3
pkgdesc="Corsair Keyboard and Mouse Input Driver, release version"
arch=('i686' 'x86_64')
url="https://github.com/mattanger/ckb-next"
diff --git a/ckb-next.install b/ckb-next.install
index c82a406d0563..31029d6523d9 100755
--- a/ckb-next.install
+++ b/ckb-next.install
@@ -12,17 +12,36 @@ bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"
+# arg 1: the new package version
post_install() {
- echo -e "=================================================="
- note "To start the daemon automatically, you must execute:"
- note "sudo systemctl start ckb-daemon"
- note "sudo systemctl enable ckb-daemon"
- echo -e '\n'
- note "Further information:"
- note "https://github.com/mattanger/ckb-next"
- echo -e "=================================================="
+ msg_blue "Starting and enabling ckb-next daemon..."
+ systemctl daemon-reload
+ systemctl start ckb-daemon
+ systemctl enable ckb-daemon
}
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ msg_blue "Terminating ckb-next daemon..."
+ systemctl daemon-reload
+ systemctl stop ckb-daemon
+ systemctl disable ckb-daemon
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
post_upgrade() {
- post_install
+ msg_blue "Starting and enabling ckb-next daemon..."
+ systemctl daemon-reload
+ systemctl start ckb-daemon
+ systemctl enable ckb-daemon
+}
+
+# arg 1: the old package version
+pre_remove() {
+ msg_blue "Terminating ckb-next daemon..."
+ systemctl daemon-reload
+ systemctl stop ckb-daemon
+ systemctl disable ckb-daemon
}