summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a0181efb757cd48c064fed3c3d5ae5f7761c5488 (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
# Maintainer: Matteo De Carlo <matteo.dek@gmail.com>

pkgname=sodium-git
pkgver=0.1.0.319.3bb1da3
pkgrel=1
pkgdesc="Sodium is an editor inspired by Vim (but not a clone). It aims to be efficient, fast, and productive."
arch=('x86_64')
url="https://github.com/redox-os/sodium"
license=('MIT')
depends=('sdl2')
makedepends=('cargo')
provides=('sodium')
conflicts=('sodium-bin' 'sodium')
source=("${pkgname}::git+https://github.com/redox-os/sodium.git")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  echo -n $(grep version Cargo.toml| sed 's/version = "\(.*\)"/\1./')
  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  # Use a temporary local Cargo repository.
  export CARGO_HOME="${srcdir}/cargo-repository"

  cd "${srcdir}/${pkgname}"
  cargo build --release
}

# no tests available
#check() {
#  # Use a temporary local Cargo repository.
#  export CARGO_HOME="$srcdir/cargo-repository"
#
#  cd "${srcdir}/${pkgname}"
#  cargo test
#}

package() {
  install -D -m755 "${srcdir}/${pkgname}/target/release/sodium" "${pkgdir}/usr/bin/sodium"
}