summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDominic2022-01-17 18:46:18 +0100
committerDominic2022-01-17 18:46:18 +0100
commit5fc20e16f93a12425bc5f7b55d86bda5248fcccd (patch)
tree7cbe5b76f5f13aa643a0a070b72e165e7bce4a44 /PKGBUILD
downloadaur-5fc20e16f93a12425bc5f7b55d86bda5248fcccd.tar.gz
cargo-doc2readme-git 0.0.8.r23.g8635970-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..8d375c72747
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# -*- mode: Shell-script; eval: (setq indent-tabs-mode 't); eval: (setq tab-width 4) -*-
+# Maintainer: Dominic Meiser [git at msrd0 dot de]
+
+pkgname="cargo-doc2readme-git"
+pkgver=0.0.8.r23.g8635970
+pkgrel=1
+pkgdesc='cargo subcommand to create a readme file containing the rustdoc comments from your code'
+license=('Apache')
+
+# Tier 1 architectures supported by Rust (https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-1)
+arch=('aarch64' 'i686' 'x86_64')
+
+url="https://github.com/msrd0/cargo-doc2readme"
+depends=('gcc-libs' 'curl' 'libgit2>=1:1.3')
+makedepends=('cargo')
+conflicts=('cargo-doc2readme')
+provides=('cargo-doc2readme')
+source=("$pkgname::git+$url")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --long --tags | sed -E 's,^([0-9\.]+)-([0-9]+)-(g[0-9a-f]+)$,\1.r\2.\3,'
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+ LIBSSH2_SYS_USE_PKG_CONFIG='1' \
+ cargo build --locked --release
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ install -Dm755 "target/release/cargo-doc2readme" -t "$pkgdir/usr/bin"
+}