summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD43
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3377a43414d1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = cargo-about-git
+ pkgdesc = Cargo plugin to generate list of all licenses for a crate (git)
+ pkgver = 0.3.0.r4.g35f3c73
+ pkgrel = 1
+ url = https://github.com/EmbarkStudios/cargo-about
+ arch = x86_64
+ license = Apache
+ license = MIT
+ makedepends = rust
+ makedepends = git
+ depends = gcc-libs
+ provides = cargo-about
+ conflicts = cargo-about
+ source = git+https://github.com/EmbarkStudios/cargo-about
+ sha512sums = SKIP
+
+pkgname = cargo-about-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..22668b24d4c8
--- /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"
+}