summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 06c005d5cafa42e9f2ad4333d85bc5e0b6a9d461 (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
# Maintainer: Martin Kröning (mkroening) <m.kroening@hotmail.de>

pkgname=edu-sync-git
pkgver=0.2.3.r0.g3a82e44
pkgrel=1
pkgdesc="A command line application for synchronizing the contents of Moodle instances to your computer."
arch=('x86_64')
url="http://edu-sync.org/"
license=('GPL3')
depends=()
makedepends=('cargo' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
options=(!strip !lto)
source=("${pkgname%-git}::git+https://github.com/${pkgname%-git}/${pkgname%-git}")
sha256sums=('SKIP')

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

prepare() {
    cd ${pkgname%-git}
    cargo fetch --locked
}

build() {
    cd ${pkgname%-git}
    cargo build --release --frozen
}

check() {
    cd ${pkgname%-git}
    cargo test --release --frozen
}

package() {
    cd ${pkgname%-git}
    install -Dm 755 target/release/${pkgname%-git}-cli -t "$pkgdir/usr/bin"
}