[arch-commits] Commit in rust-script/repos (2 files)
George Rawlinson
grawlinson at gemini.archlinux.org
Sat Apr 23 14:31:03 UTC 2022
Date: Saturday, April 23, 2022 @ 14:31:02
Author: grawlinson
Revision: 1187634
archrelease: copy trunk to community-x86_64
Added:
rust-script/repos/community-x86_64/
rust-script/repos/community-x86_64/PKGBUILD
(from rev 1187633, rust-script/trunk/PKGBUILD)
----------+
PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
Copied: rust-script/repos/community-x86_64/PKGBUILD (from rev 1187633, rust-script/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2022-04-23 14:31:02 UTC (rev 1187634)
@@ -0,0 +1,47 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: Wenxuan Zhang <wenxuangm at gmail.com>
+
+pkgname=rust-script
+pkgver=0.20.0
+pkgrel=1
+pkgdesc='Run Rust files and expressions as scripts without any setup or compilation'
+arch=('x86_64')
+url='https://rust-script.org'
+license=('MIT' 'Apache')
+depends=('gcc-libs' 'rust')
+makedepends=('git')
+_commit='8b6f3d13d90c712002ec94123e5c0dc814976a68'
+source=("$pkgname::git+https://github.com/fornwall/rust-script#commit=$_commit")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+ cd "$pkgname"
+
+ # download dependencies
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$pkgname"
+
+ cargo build --frozen --release
+}
+
+package() {
+ cd "$pkgname"
+
+ # binary
+ install -vDm755 -t "$pkgdir/usr/bin" target/release/rust-script
+
+ # documentation
+ install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+
+ # licenses
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
+}
More information about the arch-commits
mailing list