summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorOrhun Parmaksız2021-10-01 16:18:45 +0300
committerOrhun Parmaksız2021-10-01 16:18:45 +0300
commitdad05d0bf1a4fa7f04155740e60fa415e47e3bd9 (patch)
tree4a86144c62f58af9f6c072d8b1411492f53b99b2 /PKGBUILD
downloadaur-dad05d0bf1a4fa7f04155740e60fa415e47e3bd9.tar.gz
Initial upload: cargo-about-git 0.3.0.r4.g35f3c73-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..22668b24d4c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: orhun <orhunparmaksiz@gmail.com>
+# https://github.com/orhun/pkgbuilds
+
+pkgname=cargo-about-git
+pkgver=0.3.0.r4.g35f3c73
+pkgrel=1
+pkgdesc="Cargo plugin to generate list of all licenses for a crate (git)"
+arch=('x86_64')
+url="https://github.com/EmbarkStudios/cargo-about"
+license=('Apache' 'MIT')
+depends=('gcc-libs')
+makedepends=('rust' '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
+}
+
+build() {
+ cd "${pkgname%-git}"
+ cargo build --release --frozen
+}
+
+check() {
+ cd "${pkgname%-git}"
+ cargo test --frozen
+}
+
+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-MIT -t "$pkgdir/usr/share/licenses/$pkgname"
+}