summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9eeb1eb0c921b153bf308f26f139265d8515e039 (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
# Maintainer: peippo <christoph+aur@christophfink.com>

pkgname=prosody-mod-vcard-muc-hg
_pkgname=${pkgname%-hg}
pkgdesc="XEP-0153: vCard-Based Avatar (MUC)"
url="https://modules.prosody.im/mod_vcard_muc.html"

pkgver=r3998.67047ed63b15
pkgrel=1

arch=("any")
license=("MIT")

provides=("${_pkgname}")
conflicts=("${_pkgname}")

makedepends=(
    "mercurial"
)
depends=(
    "prosody"
)

source=("hg+https://hg.prosody.im/prosody-modules/")
sha512sums=("SKIP")

pkgver() {
    cd "${srcdir}/prosody-modules/"
    printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}

package() {
    # derive module name from packagename
    _modulename=${_pkgname#prosody-}
    _modulename=${_modulename//-/_}

    install \
        -Dm 0644 \
        "${srcdir}/prosody-modules/${_modulename}/${_modulename}.lua" \
        "${pkgdir}/usr/lib/prosody/modules/${_modulename}.lua"

    install \
        -Dm 0644 \
        "${srcdir}/prosody-modules/${_modulename}/README.markdown" \
        "${pkgdir}/usr/share/doc/${pkgname}/README.md"

    install \
        -Dm 0644 \
        "${srcdir}/prosody-modules/COPYING" \
        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}