diff options
author | Arondight | 2016-06-14 12:25:25 +0800 |
---|---|---|
committer | Arondight | 2016-06-14 12:25:25 +0800 |
commit | 5d210f027b6a9debba635692507cea17630fcdd9 (patch) | |
tree | ee162aed4c07d6c63df15e5b42f9720ed3dca9c7 | |
parent | 5fccea60c50dd6a498833369ecabc60c5e27b92f (diff) | |
download | aur-5d210f027b6a9debba635692507cea17630fcdd9.tar.gz |
Add post scripts
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | sudodev.install | 24 |
4 files changed, 34 insertions, 3 deletions
@@ -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/ @@ -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 +} + |