summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMubashshir2020-06-06 19:42:23 +0600
committerMubashshir2020-06-06 19:42:23 +0600
commit2ab6c318100924e357ebc40d6c59d5a2b139112a (patch)
treebf8b1d357806646de9b586fb04534029acac8caa
downloadaur-2ab6c318100924e357ebc40d6c59d5a2b139112a.tar.gz
init
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD24
-rw-r--r--update-notifier.hook10
-rw-r--r--update-notifier.install8
-rw-r--r--update-notifier.service9
-rw-r--r--update-notifier.timer9
7 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6ca7c87f35eb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = update-notifier-service
+ pkgdesc = Update notifier systemd user service and timer
+ pkgver = 1
+ pkgrel = 1
+ install = update-notifier.install
+ arch = any
+ license = GPL
+ source = update-notifier.service
+ source = update-notifier.timer
+ source = update-notifier.hook
+ validpgpkeys = 916961EE198832DD70B628B356DB0538F60D951C
+ sha256sums = 77860876f3dd1de8da0db947e10c0caa868bad1de487b2c06d13a7fcfd446b93
+ sha256sums = eab72cc565c6bb1a594256c9efa6debe2551a03965be989108f950bde83158e4
+ sha256sums = f89c27a3f65b3ce08431d6c6d601114d80264f50604dd1fe27acbfb7dd575f7b
+
+pkgname = update-notifier-service
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..e7b71e71a578
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!update-notifier.hook
+!update-notifier.service
+!update-notifier.timer
+!update-notifier.install
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3b7e97188e0e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Ahmad Hasan Mubashshir <ahmubashshir@gmail.com>
+pkgname=update-notifier-service
+pkgver=1
+pkgrel=1
+pkgdesc="Update notifier systemd user service and timer"
+arch=('any')
+license=('GPL')
+install=update-notifier.install
+depends=('update-notifier')
+source=(
+ 'update-notifier.service'
+ 'update-notifier.timer'
+ 'update-notifier.hook'
+)
+sha256sums=('77860876f3dd1de8da0db947e10c0caa868bad1de487b2c06d13a7fcfd446b93'
+ 'eab72cc565c6bb1a594256c9efa6debe2551a03965be989108f950bde83158e4'
+ '911fbad2abaeda9b20508a155404b240cef9fda6db06f8523da5ddf7c520adf2')
+validpgpkeys=('916961EE198832DD70B628B356DB0538F60D951C')
+
+package() {
+ install -Dm 644 update-notifier.service "$pkgdir/usr/lib/systemd/user/update-notifier.service"
+ install -Dm 644 update-notifier.timer "$pkgdir/usr/lib/systemd/user/update-notifier.timer"
+ install -Dm 644 update-notifier.hook "$pkgdir/usr/share/libalpm/hooks/update-notifier.hook"
+}
diff --git a/update-notifier.hook b/update-notifier.hook
new file mode 100644
index 000000000000..6fc018c3e930
--- /dev/null
+++ b/update-notifier.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Package
+Target = update-notifier
+
+[Action]
+Description = patching update-notifier for systemd.
+When = PostTransaction
+Exec = /usr/bin/sed -i '/^[[:blank:]]*dunstify.*up to date/{s/\(^[[:blank:]]*\)\(dunstify .*\)/\1[ "$1" != "-systemd" ] \&\& \2 || true/}' usr/bin/update-notifier
diff --git a/update-notifier.install b/update-notifier.install
new file mode 100644
index 000000000000..8766c99d8019
--- /dev/null
+++ b/update-notifier.install
@@ -0,0 +1,8 @@
+post_install()
+{
+ echo 'Now run "systemctl --user enable update-notifier.timer"'
+}
+pre_remove()
+{
+ systemctl --global disable update-notifier.timer &> /dev/null
+}
diff --git a/update-notifier.service b/update-notifier.service
new file mode 100644
index 000000000000..93db7f9c3701
--- /dev/null
+++ b/update-notifier.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Update notifier service
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/update-notifier -systemd
+
+[Install]
+WantedBy=update-notifier.timer
diff --git a/update-notifier.timer b/update-notifier.timer
new file mode 100644
index 000000000000..fff4be09a12c
--- /dev/null
+++ b/update-notifier.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Run Update notifier a few times a day
+
+[Timer]
+OnStartupSec=30sec
+OnCalendar=0/2:25:00
+
+[Install]
+WantedBy=timers.target