summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Feletto2021-01-07 23:57:07 +0100
committerAndrea Feletto2021-01-07 23:57:07 +0100
commit974ab0484896630380bf3fc7df4771d104aef434 (patch)
treef4f75af3229c037f718f51ed4e494227a85a615f
parent76934bb115071e9e8973f3513bed6377ac6a41f1 (diff)
downloadaur-974ab0484896630380bf3fc7df4771d104aef434.tar.gz
follow rust package guidelines
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD17
2 files changed, 8 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a0d3318006d..1f8fd45b0e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = heliocron-git
pkgdesc = Execute tasks relative to sunset, sunrise and other solar events.
pkgver = 0.5.0.r0.g7fd3b66
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/mfreeborn/heliocron
arch = x86_64
license = Apache
diff --git a/PKGBUILD b/PKGBUILD
index 4e20ae7b9b5..8c45e5ca19d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,35 +4,32 @@
pkgname=heliocron-git
_pkgname=${pkgname%-*}
pkgver=0.5.0.r0.g7fd3b66
-pkgrel=1
+pkgrel=2
pkgdesc='Execute tasks relative to sunset, sunrise and other solar events.'
arch=('x86_64')
-url='https://github.com/mfreeborn/heliocron'
+url="https://github.com/mfreeborn/$_pkgname"
license=('Apache' 'MIT')
provides=('heliocron')
conflicts=('heliocron-bin')
makedepends=('cargo')
-source=("git+https://github.com/mfreeborn/$_pkgname")
+source=("git+$url")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$_pkgname"
+
git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
}
build() {
cd "$srcdir/$_pkgname"
- env CARGO_INCREMENTAL=0 cargo build --release
-}
-# currently not all tests are passed, but binary works
-# check() {
-# cd "$srcdir/$_pkgname"
-# env CARGO_INCREMENTAL=0 cargo test --release
-# }
+ cargo build --release --locked --all-features --target-dir=target
+}
package() {
cd "$srcdir/$_pkgname"
+
install -Dm755 "target/release/$_pkgname" -t "$pkgdir/usr/bin"
install -Dm644 'LICENSE-APACHE' -t "$pkgdir/usr/share/licenses/$_pkgname"
install -Dm644 'LICENSE-MIT' -t "$pkgdir/usr/share/licenses/$_pkgname"