summaryrefslogtreecommitdiffstats
path: root/rlr-git/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'rlr-git/PKGBUILD')
-rw-r--r--rlr-git/PKGBUILD41
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 <somepaulo@duck.com>
2 3
3pkgname=rlr-git 4pkgname=rlr-git
4pkgver=r31.463c617 5_pkgnamefull=com.github.epilys.rlr
6pkgver=r64.7bed0f3
5pkgrel=1 7pkgrel=1
6pkgdesc="interactive pixel screen ruler and protractor" 8pkgdesc="interactive pixel screen ruler and protractor"
7arch=('any') 9arch=('any')
8url="https://github.com/epilys/rlr" 10url="https://github.com/epilys/rlr"
9license=('GPL') 11license=('GPL-3.0-or-later')
10makedepends=('git' 'cargo') 12makedepends=('git' 'cargo')
11provides=("${pkgname%-git}") 13provides=("${pkgname%-git}")
12conflicts=("${pkgname%-git}") 14conflicts=("${pkgname%-git}")
@@ -14,32 +16,31 @@ source=("${pkgname%-git}::git+${url}")
14sha256sums=('SKIP') 16sha256sums=('SKIP')
15 17
16pkgver() { 18pkgver() {
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
22prepare() { 24prepare() {
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
27build() { 29build() {
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
34package() { 36package() {
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}