diff options
Diffstat (limited to 'rlr-git')
-rw-r--r-- | rlr-git/.SRCINFO | 15 | ||||
-rw-r--r-- | rlr-git/PKGBUILD | 37 |
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 @@ | |||
1 | pkgbase = 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 | |||
15 | pkgname = 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> | ||
2 | pkgname=rlr-git # '-bzr', '-git', '-hg' or '-svn' | ||
3 | pkgver=r19.3d62f7a | ||
4 | pkgrel=1 | ||
5 | pkgdesc="interactive pixel screen ruler and protractor" | ||
6 | arch=('any') | ||
7 | url="https://github.com/epilys/rlr" | ||
8 | license=('GPL') | ||
9 | depends=() | ||
10 | makedepends=('git' 'cargo') # 'bzr', 'git', 'mercurial' or 'subversion' | ||
11 | provides=("${pkgname%-git}") | ||
12 | conflicts=("${pkgname%-git}") | ||
13 | source=("${pkgname%-git}::git+${url}") | ||
14 | sha256sums=('SKIP') | ||
15 | |||
16 | pkgver() { | ||
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 | |||
22 | prepare() { | ||
23 | cd "$srcdir/${pkgname%-git}" | ||
24 | cargo fetch --locked --target "$CARCH-unknown-linux-gnu" | ||
25 | } | ||
26 | |||
27 | build() { | ||
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 | |||
34 | package() { | ||
35 | cd "$srcdir/${pkgname%-git}" | ||
36 | install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%-git}" | ||
37 | } | ||