summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 813fcb8ef4ff7ea544efa44a1b81f3a94e966006 (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
# Maintainer: Evgeny Kurnevsky <kurnevsky@gmail.com>

_pkgname=tox-node
pkgname=$_pkgname-rs
pkgver=0.1.1
pkgrel=1
pkgdesc="A server application to run tox node written in pure Rust"
arch=('i686' 'x86_64')
depends=('libsodium')
makedepends=('rust' 'cargo' 'pkgconf')
url="https://github.com/tox-rs/tox-node"
license=('MIT')
source=("$pkgname-$pkgver.tar.gz::https://github.com/tox-rs/tox-node/archive/v$pkgver.tar.gz")
sha256sums=('f6646784ceff9cfae854dbba34913aaf5b55bd9e066aaa6ecfe4ca458435aca5')
provides=('tox-node-rs')

build() {
  cd "$srcdir/$_pkgname-$pkgver"
  SODIUM_USE_PKG_CONFIG=1 \
    cargo build --release
}

check() {
  cd "$srcdir/$_pkgname-$pkgver"
  SODIUM_USE_PKG_CONFIG=1 \
    cargo test --release
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"
  install -Dm755 target/release/tox-node $pkgdir/usr/bin/tox-node
}