diff options
Diffstat (limited to 'rlr-git/PKGBUILD')
-rw-r--r-- | rlr-git/PKGBUILD | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/rlr-git/PKGBUILD b/rlr-git/PKGBUILD index 4ec3d19..1c9da2d 100644 --- a/rlr-git/PKGBUILD +++ b/rlr-git/PKGBUILD | |||
@@ -1,12 +1,14 @@ | |||
1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> | 1 | # Maintainer: Yigit Sever <yigit at yigitsever dot com> |
2 | # Contributor: Paulo Fino <[email protected]> | ||
2 | 3 | ||
3 | pkgname=rlr-git | 4 | pkgname=rlr-git |
4 | pkgver=r31.463c617 | 5 | _pkgnamefull=com.github.epilys.rlr |
6 | pkgver=r64.7bed0f3 | ||
5 | pkgrel=1 | 7 | pkgrel=1 |
6 | pkgdesc="interactive pixel screen ruler and protractor" | 8 | pkgdesc="interactive pixel screen ruler and protractor" |
7 | arch=('any') | 9 | arch=('any') |
8 | url="https://github.com/epilys/rlr" | 10 | url="https://github.com/epilys/rlr" |
9 | license=('GPL') | 11 | license=('GPL-3.0-or-later') |
10 | makedepends=('git' 'cargo') | 12 | makedepends=('git' 'cargo') |
11 | provides=("${pkgname%-git}") | 13 | provides=("${pkgname%-git}") |
12 | conflicts=("${pkgname%-git}") | 14 | conflicts=("${pkgname%-git}") |
@@ -14,32 +16,31 @@ source=("${pkgname%-git}::git+${url}") | |||
14 | sha256sums=('SKIP') | 16 | sha256sums=('SKIP') |
15 | 17 | ||
16 | pkgver() { | 18 | pkgver() { |
17 | cd "$srcdir/${pkgname%-git}" | 19 | cd "$srcdir/${pkgname%-git}" |
18 | # git, no tags available | 20 | # git, no tags available |
19 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | 21 | printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" |
20 | } | 22 | } |
21 | 23 | ||
22 | prepare() { | 24 | prepare() { |
23 | cd "$srcdir/${pkgname%-git}" | 25 | cd "$srcdir/${pkgname%-git}" |
24 | cargo fetch --locked --target "$CARCH-unknown-linux-gnu" | 26 | cargo fetch --locked --target "$CARCH-unknown-linux-gnu" |
25 | } | 27 | } |
26 | 28 | ||
27 | build() { | 29 | build() { |
28 | cd "$srcdir/${pkgname%-git}" | 30 | cd "$srcdir/${pkgname%-git}" |
29 | export RUSTUP_TOOLCHAIN=stable | 31 | export RUSTUP_TOOLCHAIN=stable |
30 | export CARGO_TARGET_DIR=target | 32 | export CARGO_TARGET_DIR=target |
31 | cargo build --frozen --release --all-features | 33 | cargo build --frozen --release --all-features |
32 | } | 34 | } |
33 | 35 | ||
34 | package() { | 36 | package() { |
35 | # binary | 37 | # binary |
36 | install -Dm0755 "${srcdir}/${pkgname%-git}/target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin/" | 38 | install -Dm0755 "${srcdir}/${pkgname%-git}/target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin/" |
37 | # desktop file | 39 | # desktop file |
38 | install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop" | 40 | install -Dm644 "${srcdir}/${pkgname%-git}/data/${_pkgnamefull%}.desktop" "${pkgdir}/usr/share/applications/${_pkgnamefull%}.desktop" |
39 | |||
40 | # icon | ||
41 | install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname%-git}.svg" | ||
42 | # symbolic icon | ||
43 | install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}-symbolic.svg" "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/${pkgname%-git}-symbolic.svg" | ||
44 | 41 | ||
42 | # icon | ||
43 | install -Dm644 "${srcdir}/${pkgname%-git}/data/${_pkgnamefull%}.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${_pkgnamefull%}.svg" | ||
44 | # symbolic icon | ||
45 | install -Dm644 "${srcdir}/${pkgname%-git}/data/${_pkgnamefull%}-symbolic.svg" "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/${_pkgnamefull%}-symbolic.svg" | ||
45 | } | 46 | } |