Package Details: rlr-git r64.7bed0f3-1

Git Clone URL: https://aur.archlinux.org/rlr-git.git (read-only, click to copy)
Package Base: rlr-git
Description: interactive pixel screen ruler and protractor
Upstream URL: https://github.com/epilys/rlr
Licenses: GPL-3.0-or-later
Conflicts: rlr
Provides: rlr
Submitter: yigits
Maintainer: yigits
Last Packager: yigits
Votes: 2
Popularity: 1.02
First Submitted: 2021-12-20 08:48 (UTC)
Last Updated: 2024-12-03 07:45 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

yigits commented on 2024-12-03 07:45 (UTC)

@somepaulo: Thank you, I've updated the PKGBUILD

somepaulo commented on 2024-12-03 01:29 (UTC) (edited on 2024-12-03 01:30 (UTC) by somepaulo)

The latest changes in git break the current PKBUILD. The references to the .desktop and icon files location need to be changed. Here's a full working PKGBUILD:

# Maintainer: Yigit Sever <yigit at yigitsever dot com>

pkgname=rlr-git
_pkgnamefull=com.github.epilys.rlr
pkgver=r64.7bed0f3
pkgrel=1
pkgdesc="interactive pixel screen ruler and protractor"
arch=('any')
url="https://github.com/epilys/rlr"
license=('GPL')
makedepends=('git' 'cargo')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+${url}")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    # git, no tags available
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$srcdir/${pkgname%-git}"
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
    cd "$srcdir/${pkgname%-git}"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --all-features
}

package() {
    # binary
    install -Dm0755 "${srcdir}/${pkgname%-git}/target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin/"
    # desktop file
    install -Dm644 "${srcdir}/${pkgname%-git}/data/${_pkgnamefull%}.desktop" "${pkgdir}/usr/share/applications/${_pkgnamefull%}.desktop"

    # icon
    install -Dm644 "${srcdir}/${pkgname%-git}/data/${_pkgnamefull%}.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${_pkgnamefull%}.svg"
    # symbolic icon
    install -Dm644 "${srcdir}/${pkgname%-git}/data/${_pkgnamefull%}-symbolic.svg" "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/${_pkgnamefull%}-symbolic.svg"

}

somepaulo commented on 2022-10-07 15:44 (UTC)

There's another little bug. The symbolic icon file has a dot instead of a dash in the source. I've notified the dev, but for now line 43 should read:

# symbolic icon
    install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}.symbolic.svg" "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/${pkgname%-git}-symbolic.svg"

Note the dot in the first path is replaced by a dash in the second path to comply with icon naming standards.

yigits commented on 2022-10-07 15:35 (UTC)

@somepaulo: ugh, sorry!

should be all fine now

somepaulo commented on 2022-10-07 15:21 (UTC)

Thank you!

Sorry for being such a nag, but you missed the word -symbolic on line 43 (two times, before the extension name). As it is, the PKGBUILD installs the same main app icon into both locations. Line 43 should read:

# symbolic icon
    install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}-symbolic.svg" "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/${pkgname%-git}-symbolic.svg"

yigits commented on 2022-10-06 22:13 (UTC)

@somepaulo: oops, fixed!

somepaulo commented on 2022-10-06 21:58 (UTC) (edited on 2022-10-06 21:59 (UTC) by somepaulo)

Great, thank you! I helped the dev with that a little bit.

I think you missed the symbolic icon and installed the .png logo (used only on the github page) as an icon. Only the .svg files are icons. So by looking at the PKGBUILD I guess the last part should be like this:

package() {
    # binary
    install -Dm0755 "${srcdir}/${pkgname%-git}/target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin/"
    # desktop file
    install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop"
    # main icon
    install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname%-git}.svg"
    # symbolic icon
    install -Dm644 "${srcdir}/${pkgname%-git}/${pkgname%-git}-symbolic.svg" "${pkgdir}/usr/share/icons/hicolor/symbolic/apps/${pkgname%-git}-symbolic.svg"
}

yigits commented on 2022-10-03 21:31 (UTC)

@somepaulo: all done, great work on those icons!

somepaulo commented on 2022-10-03 15:45 (UTC)

The developer has now included a .desktop file and respective icons (app & symbolic). He says, though, that cargo doesn't allow to install those files on build. I'm not an expert in cargo or PKGBUILD files, but maybe there's a way to make PKGBUILD copy the .desktop and icon files into their intended system locations when installing the app?

yigits commented on 2022-09-13 15:27 (UTC)

@somepaulo: thank you for providing one, added