aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArondight2016-06-14 12:25:25 +0800
committerArondight2016-06-14 12:25:25 +0800
commit5d210f027b6a9debba635692507cea17630fcdd9 (patch)
treeee162aed4c07d6c63df15e5b42f9720ed3dca9c7
parent5fccea60c50dd6a498833369ecabc60c5e27b92f (diff)
downloadaur-5d210f027b6a9debba635692507cea17630fcdd9.tar.gz
Add post scripts
-rw-r--r--.SRCINFO3
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD4
-rw-r--r--sudodev.install24
4 files changed, 34 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 348812b9bc7f..5f2b0c30f266 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = sudodev-git
pkgdesc = Create your special device for a none-password sudo
- pkgver = v0.27.r3.gf4ab7a8
+ pkgver = v0.27.r4.g340b488
pkgrel = 1
url = https://github.com/Arondight/sudodev.git
+ install = sudodev.install
arch = any
license = GPL
makedepends = git
diff --git a/.gitignore b/.gitignore
index 1df137bfa9ee..b7b1e8e15ae1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,10 @@ tags*
/src/
/sudodev/
+# tmp files
+.PKGINFO
+.BUILDINFO
+.INSTALL
+.MTREE
+/usr/
diff --git a/PKGBUILD b/PKGBUILD
index b871d18bd0b6..e772df277198 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Arondight <shell_way@foxmail.com>
pkgname='sudodev-git'
-pkgver='v0.27.r3.gf4ab7a8'
+pkgver='v0.27.r4.g340b488'
pkgrel=1
pkgdesc='Create your special device for a none-password sudo'
arch=('any')
@@ -15,7 +15,7 @@ conflicts=()
replaces=()
backup=()
options=()
-install=
+install="${pkgname%-git}.install"
source=("${pkgname%-git}::git+${url}#branch=master")
noextract=()
sha256sums=('SKIP')
diff --git a/sudodev.install b/sudodev.install
new file mode 100644
index 000000000000..5226be451538
--- /dev/null
+++ b/sudodev.install
@@ -0,0 +1,24 @@
+## arg 1: the new package version
+post_install () {
+ systemctl daemon-reload
+ systemctl enable sudodevd.service
+ systemctl restart sudodevd.service
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade () {
+ systemctl daemon-reload
+}
+
+## arg 1: the new package version
+pre_remove () {
+ systemctl disable sudodevd.service
+ systemctl stop sudodevd.service
+}
+
+## arg 1: the new package version
+post_remove () {
+ systemctl daemon-reload
+}
+