summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 695a8d792624b67fa98fd688aef87f85c3be1015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: Allddd <allddd (at) proton (dot) me>

pkgname=tuptime
pkgver=5.2.3
pkgrel=1
pkgdesc='Historical and statistical system uptime reporting'
arch=('any')
url='https://github.com/rfmoz/tuptime'
license=('GPL2')
depends=('python')
source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('c1d7f32dca932ca928082b202134cc7e422e8c6e151cab429ff75339d7b0a3ff')
install=${pkgname}.install

prepare() {
    cd ${pkgname}-${pkgver}/src/systemd/
    sed -ni '1p' tuptime.sysusers
}

package() {
    cd ${pkgname}-${pkgver}
    install -Dm755 "src/tuptime" "${pkgdir}/usr/bin/tuptime"
    install -Dm644 "src/systemd/tuptime.sysusers" "${pkgdir}/usr/lib/sysusers.d/tuptime.conf"
    install -Dm644 "src/systemd/tuptime.service" "${pkgdir}/usr/lib/systemd/system/tuptime.service"
    install -Dm644 "src/systemd/tuptime-sync.timer" "${pkgdir}/usr/lib/systemd/system/tuptime-sync.timer"
    install -Dm644 "src/systemd/tuptime-sync.service" "${pkgdir}/usr/lib/systemd/system/tuptime-sync.service"
    install -Dm644 "src/man/tuptime.1" "${pkgdir}/usr/share/man/man1/tuptime.1"
    install -Dm644 "tuptime-manual.txt" "${pkgdir}/usr/share/doc/${pkgname}/tuptime-manual.txt"
}

# vim: ts=4 sw=4 et: