diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -1,37 +1,40 @@ | |||
1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> | 1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> |
2 | |||
2 | pkgname=rlr-git # '-bzr', '-git', '-hg' or '-svn' | 3 | pkgname=rlr-git # '-bzr', '-git', '-hg' or '-svn' |
3 | pkgver=r19.3d62f7a | 4 | pkgver=r25.5fd3169 |
4 | pkgrel=1 | 5 | pkgrel=1 |
5 | pkgdesc="interactive pixel screen ruler and protractor" | 6 | pkgdesc="interactive pixel screen ruler and protractor" |
6 | arch=('any') | 7 | arch=('any') |
7 | url="https://github.com/epilys/rlr" | 8 | url="https://github.com/epilys/rlr" |
8 | license=('GPL') | 9 | license=('GPL') |
9 | depends=() | ||
10 | makedepends=('git' 'cargo') # 'bzr', 'git', 'mercurial' or 'subversion' | 10 | makedepends=('git' 'cargo') # 'bzr', 'git', 'mercurial' or 'subversion' |
11 | provides=("${pkgname%-git}") | 11 | provides=("${pkgname%-git}") |
12 | conflicts=("${pkgname%-git}") | 12 | conflicts=("${pkgname%-git}") |
13 | source=("${pkgname%-git}::git+${url}") | 13 | source=("${pkgname%-git}::git+${url}" "${pkgname%-git}.desktop") |
14 | sha256sums=('SKIP') | 14 | sha256sums=('SKIP' |
15 | '7f659ea7e8cb794963ff6881294a8aba388c33bc10c7e14c1ecf58fb241386e7') | ||
15 | 16 | ||
16 | pkgver() { | 17 | pkgver() { |
17 | cd "$srcdir/${pkgname%-git}" | 18 | cd "$srcdir/${pkgname%-git}" |
18 | # Git, no tags available | 19 | # git, no tags available |
19 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | 20 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" |
20 | } | 21 | } |
21 | 22 | ||
22 | prepare() { | 23 | prepare() { |
23 | cd "$srcdir/${pkgname%-git}" | 24 | cd "$srcdir/${pkgname%-git}" |
24 | cargo fetch --locked --target "$CARCH-unknown-linux-gnu" | 25 | cargo fetch --locked --target "$CARCH-unknown-linux-gnu" |
25 | } | 26 | } |
26 | 27 | ||
27 | build() { | 28 | build() { |
28 | cd "$srcdir/${pkgname%-git}" | 29 | cd "$srcdir/${pkgname%-git}" |
29 | export RUSTUP_TOOLCHAIN=stable | 30 | export RUSTUP_TOOLCHAIN=stable |
30 | export CARGO_TARGET_DIR=target | 31 | export CARGO_TARGET_DIR=target |
31 | cargo build --frozen --release --all-features | 32 | cargo build --frozen --release --all-features |
32 | } | 33 | } |
33 | 34 | ||
34 | package() { | 35 | package() { |
35 | cd "$srcdir/${pkgname%-git}" | 36 | # binary |
36 | install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%-git}" | 37 | install -Dm0755 "${srcdir}/${pkgname%-git}/target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin/" |
38 | # desktop file | ||
39 | install -Dm644 "${pkgname%-git}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop" | ||
37 | } | 40 | } |