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