summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rlr-git/.SRCINFO15
-rw-r--r--rlr-git/PKGBUILD37
2 files changed, 52 insertions, 0 deletions
diff --git a/rlr-git/.SRCINFO b/rlr-git/.SRCINFO
new file mode 100644
index 0000000..7969152
--- /dev/null
+++ b/rlr-git/.SRCINFO
@@ -0,0 +1,15 @@
1pkgbase = rlr-git
2 pkgdesc = interactive pixel screen ruler and protractor
3 pkgver = r19.3d62f7a
4 pkgrel = 1
5 url = https://github.com/epilys/rlr
6 arch = any
7 license = GPL
8 makedepends = git
9 makedepends = cargo
10 provides = rlr
11 conflicts = rlr
12 source = rlr::git+https://github.com/epilys/rlr
13 sha256sums = SKIP
14
15pkgname = rlr-git
diff --git a/rlr-git/PKGBUILD b/rlr-git/PKGBUILD
new file mode 100644
index 0000000..a1773e0
--- /dev/null
+++ b/rlr-git/PKGBUILD
@@ -0,0 +1,37 @@
1# Maintainer: Yigit Sever <yigit at yigitsever dot com>
2pkgname=rlr-git # '-bzr', '-git', '-hg' or '-svn'
3pkgver=r19.3d62f7a
4pkgrel=1
5pkgdesc="interactive pixel screen ruler and protractor"
6arch=('any')
7url="https://github.com/epilys/rlr"
8license=('GPL')
9depends=()
10makedepends=('git' 'cargo') # 'bzr', 'git', 'mercurial' or 'subversion'
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 cd "$srcdir/${pkgname%-git}"
36 install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%-git}"
37}