Add 'fotd/' from commit '800184c29d6079cffae029d82572d58527466e40'
git-subtree-dir: fotd git-subtree-mainline:27332d632a
git-subtree-split:800184c29d
This commit is contained in:
commit
697e76a234
5 changed files with 58 additions and 0 deletions
18
fotd/.SRCINFO
Normal file
18
fotd/.SRCINFO
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
pkgbase = fotd
|
||||||
|
pkgdesc = Fortune of the day
|
||||||
|
pkgver = 1.0.0
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://git.exozy.me/exozyme/fotd
|
||||||
|
arch = any
|
||||||
|
license = GPL
|
||||||
|
conflicts = fortune-mod
|
||||||
|
backup = etc/fortune
|
||||||
|
backup = etc/motd.d/fortune
|
||||||
|
source = fortune
|
||||||
|
source = systemd.service
|
||||||
|
source = systemd.timer
|
||||||
|
sha256sums = 6cc31663003d7208c3b188e6529fe5b4933cefefa0a33a205ab12ca3400632a2
|
||||||
|
sha256sums = d220d733e08e57fe8d9c048a6deec88553034e36c1828dd778bda544e7b2202b
|
||||||
|
sha256sums = 91121ae4298f29502e9142006ccc4f95f0eef089e6e3aa6a7ccc6ff7651591c0
|
||||||
|
|
||||||
|
pkgname = fotd
|
24
fotd/PKGBUILD
Normal file
24
fotd/PKGBUILD
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Maintainer: Anthony Wang <a at exozy dot me>
|
||||||
|
pkgname=fotd
|
||||||
|
pkgver=1.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Fortune of the day"
|
||||||
|
arch=(any)
|
||||||
|
url="https://git.exozy.me/exozyme/$pkgname"
|
||||||
|
license=('GPL')
|
||||||
|
conflicts=('fortune-mod')
|
||||||
|
backup=('etc/fortune' 'etc/motd.d/fortune')
|
||||||
|
source=("fortune"
|
||||||
|
"systemd.service"
|
||||||
|
"systemd.timer")
|
||||||
|
sha256sums=('6cc31663003d7208c3b188e6529fe5b4933cefefa0a33a205ab12ca3400632a2'
|
||||||
|
'd220d733e08e57fe8d9c048a6deec88553034e36c1828dd778bda544e7b2202b'
|
||||||
|
'91121ae4298f29502e9142006ccc4f95f0eef089e6e3aa6a7ccc6ff7651591c0')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -vDm755 fortune "$pkgdir/usr/bin/fortune"
|
||||||
|
install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||||
|
install -vDm644 systemd.timer "$pkgdir/usr/lib/systemd/system/$pkgname.timer"
|
||||||
|
install -vDm644 /dev/null "$pkgdir/etc/fortune"
|
||||||
|
install -vDm644 /dev/null "$pkgdir/etc/motd.d/fortune"
|
||||||
|
}
|
3
fotd/fortune
Normal file
3
fotd/fortune
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
shuf -n 1 /etc/fortune $@
|
5
fotd/systemd.service
Normal file
5
fotd/systemd.service
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Randomly choose line from /etc/fortune to update /etc/motd.d/fortune
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=sh -c "fortune > /etc/motd.d/fortune"
|
8
fotd/systemd.timer
Normal file
8
fotd/systemd.timer
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Update /etc/motd.d/fortune daily
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in a new issue