blob: c1a44e079f5f276503dc5b02b7ec162ff94455c1 (
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
44
45
46
47
48
49
50
51
52
53
|
# Maintainer: chitaotao <chotaotao1qaz2wsx at gmail dot com>
_name='awatcher'
pkgname="$_name-git"
pkgver=0.3.0.r3.ga045780
pkgrel=1
pkgdesc="Activity and idle watchers"
arch=('x86_64')
url="https://github.com/2e3s/$_name"
license=('MPL2')
depends=(
activitywatch
)
makedepends=(
git
cargo
)
provides=(${_name})
conflicts=(
${_name}
aw-${_name}
)
source=("${_name}::git+$url")
sha256sums=('SKIP')
pkgver() {
cd "${_name}"
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${_name}"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "${_name}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release
mv ./target/release/${_name} ./target/release/aw-${_name}
}
package() {
cd "${_name}"
install -Dm0755 ./target/release/aw-${_name} -t "${pkgdir}/usr/bin"
}
|