summaryrefslogtreecommitdiffstats
path: root/rlr-git/PKGBUILD
diff options
context:
space:
mode:
authorYigit Sever2024-12-03 08:32:36 +0100
committerYigit Sever2024-12-03 08:32:36 +0100
commit74f85b8eac73ceaccf2a0066451d11aa60025da3 (patch)
tree37c94dd65da163570cfd780aa90fa919d22329a5 /rlr-git/PKGBUILD
parent87cc91dee2df2a3dbad07907c294a9577edac1df (diff)
parent5f1e988ae2df5972646ac5eafb3cb6b9654eeebf (diff)
downloadpackages-74f85b8eac73ceaccf2a0066451d11aa60025da3.tar.gz
packages-74f85b8eac73ceaccf2a0066451d11aa60025da3.tar.bz2
packages-74f85b8eac73ceaccf2a0066451d11aa60025da3.zip
Add 'rlr-git/' from commit '5f1e988ae2df5972646ac5eafb3cb6b9654eeebf'
git-subtree-dir: rlr-git git-subtree-mainline: 87cc91dee2df2a3dbad07907c294a9577edac1df git-subtree-split: 5f1e988ae2df5972646ac5eafb3cb6b9654eeebf
Diffstat (limited to 'rlr-git/PKGBUILD')
-rw-r--r--rlr-git/PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/rlr-git/PKGBUILD b/rlr-git/PKGBUILD
new file mode 100644
index 0000000..4ec3d19
--- /dev/null
+++ b/rlr-git/PKGBUILD
@@ -0,0 +1,45 @@
1# Maintainer: Yigit Sever <yigit at yigitsever dot com>
2
3pkgname=rlr-git
4pkgver=r31.463c617
5pkgrel=1
6pkgdesc="interactive pixel screen ruler and protractor"
7arch=('any')
8url="https://github.com/epilys/rlr"
9license=('GPL')
10makedepends=('git' 'cargo')
11provides=("${pkgname%-git}")
12conflicts=("${pkgname%-git}")
13source=("${pkgname%-git}::git+${url}")
14sha256sums=('SKIP')
15
16pkgver() {
17 cd "$srcdir/${pkgname%-git}"
18 # git, no tags available
19 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
20}
21
22prepare() {
23 cd "$srcdir/${pkgname%-git}"
24 cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
25}
26
27build() {
28 cd "$srcdir/${pkgname%-git}"
29 export RUSTUP_TOOLCHAIN=stable
30 export CARGO_TARGET_DIR=target
31 cargo build --frozen --release --all-features
32}
33
34package() {
35 # binary
36 install -Dm0755 "${srcdir}/${pkgname%-git}/target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin/"
37 # desktop file
38 install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-git}.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
45}