From 0795fb8922486dccf5fb6df5914c284e3c47eb18 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Wed, 17 Jun 2020 21:22:51 +0200 Subject: [PATCH] Initial packaging. --- .SRCINFO | 14 ++++++++++++++ PKGBUILD | 29 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 00000000000..bc8617300bc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = cargo-license + pkgdesc = Cargo subcommand to see license of dependencies + pkgver = 0.3.0 + pkgrel = 1 + url = https://github.com/onur/cargo-license + arch = x86_64 + license = MIT + makedepends = cargo + depends = gcc-libs + source = cargo-license-0.3.0.tar.gz::https://github.com/onur/cargo-license/archive/v0.3.0.tar.gz + sha256sums = 50edb76242a93604386deb87f730d08538f893a571cd1ae6a3f53dd203c7bfae + +pkgname = cargo-license + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 00000000000..57f363c6337 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Bert Peters +pkgname=cargo-license +pkgver=0.3.0 +pkgrel=1 +pkgdesc="Cargo subcommand to see license of dependencies" +arch=(x86_64) +url="https://github.com/onur/cargo-license" +license=('MIT') +depends=(gcc-libs) +makedepends=(cargo) +source=("$pkgname-$pkgver.tar.gz::https://github.com/onur/cargo-license/archive/v$pkgver.tar.gz") +sha256sums=('50edb76242a93604386deb87f730d08538f893a571cd1ae6a3f53dd203c7bfae') + +build() { + cd "$pkgname-$pkgver" + cargo build --release +} + +check() { + cd "$pkgname-$pkgver" + # Test in release mode to avoid recompiling everything + cargo test --release +} + +package() { + cd "$pkgname-$pkgver" + install -D -t "$pkgdir/usr/bin" target/release/cargo-license + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE +}