summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c3afbf1d5bdf7db1a1baf78219d722aaab3af6fe (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
# Maintainer: Patrik McMullin <patrikmcm@outlook.com>
_pkgname=femto
pkgname="$_pkgname-git"
pkgver="0.1.0"
pkgrel=1
pkgdesc="A terminal-based text editor written in 300 lines of Rust"
arch=("any")
url="https://github.com/frapa/femto"
license=("MIT")
depends=()
makedepends=("git" "cargo")
optdepends=()
provides=()
conflicts=()
source=("$_pkgname::git+https://github.com/frapa/femto.git")
sha256sums=('SKIP')

pkgver() {
    cd "$_pkgname"
    echo "$(grep '^version =' Cargo.toml | cut -d " " -f 3)"
}

build() {
    cd "$_pkgname"
    cargo build --release
}

check() {
    cd "$_pkgname"
    cargo test --release
}

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