summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3b655d7c33abd93e38ecab89dcc748329941998b (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
# Maintainer: Jonathan Kirszling <jonathan.kirszling at runbox dot com>
# Maintainer: Ralph Torres <mail at ralphptorr dot es>
# Contributor: Nick Econopouly <wry at mm dot st>

pkgname=tiny-irc-client-git
pkgver=0.10.0
pkgrel=1
pkgdesc='A console IRC client'
arch=(x86_64)
url=https://github.com/osa1/tiny
license=(MIT)

depends=(openssl dbus)
makedepends=(git rust)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=(git+$url)
sha512sums=(SKIP)

_pkgname=${pkgname%-irc-client-git}

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

build() {
    cd $_pkgname
    cargo install --path crates/$_pkgname --features=desktop-notifications
}

package() {
    cd $_pkgname
    install -Dm755 target/release/$_pkgname "$pkgdir"/usr/bin/$_pkgname
    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$_pkgname/LICENSE
    install -Dm644 crates/$_pkgname/config.yml \
        "$pkgdir"/usr/share/$_pkgname/config.yml
    mkdir -p "$pkgdir"/usr/share/doc/$_pkgname
    install -Dm644 ARCHITECTURE.md CHANGELOG.md README.md \
        "$pkgdir"/usr/share/doc/$_pkgname
}