summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c424f7cea24f67df0c3a453775311ab1b503e858 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Quentin Glidic <sardemff7@eventd.org>

pkgname=session-nanny-git
pkgver=0.r15.g5e5c80c
_gitname=session-nanny
_pkgdir=${_gitname}
pkgrel=1
pkgdesc="A small daemon to act on remote or local events"
arch=(
    i686
    x86_64
)
url="https://github.com/sardemff7/session-nanny/"
license=(
    GPL3
)
depends=(
    'glib2>=2.40.0'
)
makedepends=(
    'meson>=0.39.1'
    pkg-config
    ninja
    vala
)
optdepends=(
)
provides=(
    session-nanny
)
conflicts=(
    session-nanny
)
options=(
    !strip
)
source=(
    git+https://github.com/sardemff7/${_gitname}
)
sha256sums=(
    SKIP
)

pkgver() {
    cd "${srcdir}"/${_pkgdir}
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    local params=(
        --prefix=/usr
        -Dsystemduserunitdir=/usr/lib/systemd/user
        -Ddbussessionservicedir=/usr/share/dbus-1/services
    )

    cd "${srcdir}"/${_pkgdir}
    meson "${srcdir}"/build "${params[@]}"
    ninja -C "${srcdir}"/build
}

check() {
    ninja -C "${srcdir}"/build test
}

package() {
    DESTDIR="${pkgdir}" \
    ninja -C "${srcdir}"/build install
}