summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrhun Parmaksız2022-11-10 20:54:09 +0300
committerOrhun Parmaksız2022-11-10 20:54:09 +0300
commitb305a9c35eb3064de4c95cbd696eb36aa606edf0 (patch)
tree5cf05d8a8c293412748ae8f04aa33851897f0388
downloadaur-b305a9c35eb3064de4c95cbd696eb36aa606edf0.tar.gz
Initial upload: cargo-public-api-git 0.21.0.r30.g5f95e57-1
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD44
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..46f40d443edb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = cargo-public-api-git
+ pkgdesc = List and diff the public API of Rust library crates (git)
+ pkgver = 0.21.0.r30.g5f95e57
+ pkgrel = 1
+ url = https://github.com/Enselic/cargo-public-api
+ arch = x86_64
+ license = MIT
+ makedepends = cargo
+ makedepends = git
+ depends = gcc-libs
+ provides = cargo-public-api
+ conflicts = cargo-public-api
+ source = git+https://github.com/Enselic/cargo-public-api
+ sha512sums = SKIP
+
+pkgname = cargo-public-api-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..adad8926268f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: orhun <orhunparmaksiz@gmail.com>
+# https://github.com/orhun/pkgbuilds
+
+pkgname=cargo-public-api-git
+pkgver=0.21.0.r30.g5f95e57
+pkgrel=1
+pkgdesc="List and diff the public API of Rust library crates (git)"
+arch=('x86_64')
+url="https://github.com/Enselic/cargo-public-api"
+license=('MIT')
+depends=('gcc-libs')
+makedepends=('cargo' 'git')
+conflicts=("${pkgname%-git}")
+provides=("${pkgname%-git}")
+source=("git+${url}")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${pkgname%-git}"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${pkgname%-git}"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "${pkgname%-git}"
+ cargo build --release --frozen
+}
+
+# tests require nightly
+#check() {
+# cd "${pkgname%-git}"
+# cargo test --frozen --bins
+#}
+
+package() {
+ cd "${pkgname%-git}"
+ install -Dm 755 "target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin"
+ install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
+ install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+}