From bacdbc90efc8cd407b5ce658e3616748ae6c8ea3 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 20 Dec 2021 11:47:46 +0300 Subject: Publish to AUR --- .SRCINFO | 15 +++++++++++++++ PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..7969152 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = rlr-git + pkgdesc = interactive pixel screen ruler and protractor + pkgver = r19.3d62f7a + pkgrel = 1 + url = https://github.com/epilys/rlr + arch = any + license = GPL + makedepends = git + makedepends = cargo + provides = rlr + conflicts = rlr + source = rlr::git+https://github.com/epilys/rlr + sha256sums = SKIP + +pkgname = rlr-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..a1773e0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Yigit Sever +pkgname=rlr-git # '-bzr', '-git', '-hg' or '-svn' +pkgver=r19.3d62f7a +pkgrel=1 +pkgdesc="interactive pixel screen ruler and protractor" +arch=('any') +url="https://github.com/epilys/rlr" +license=('GPL') +depends=() +makedepends=('git' 'cargo') # 'bzr', 'git', 'mercurial' or 'subversion' +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() { + cd "$srcdir/${pkgname%-git}" + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%-git}" +} -- cgit v1.2.3-70-g09d2