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 --- PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 PKGBUILD (limited to 'PKGBUILD') 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