summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDominic2020-12-30 01:05:03 +0100
committerDominic2020-12-30 01:05:03 +0100
commit6c5a182f439ca17fce4f3321f9c7992f37bdeeed (patch)
tree364d578a5535f1fb3102f3c90f221de5f8c3905f /PKGBUILD
parentd320a148fd06041989171e93da1c595bdd0ba949 (diff)
downloadaur-6c5a182f439ca17fce4f3321f9c7992f37bdeeed.tar.gz
cargo-readme 3.2.0-3
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 21 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4dca4a4e7bd..49e5369f166 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,28 +1,37 @@
+# -*- mode: Shell-script; eval: (setq indent-tabs-mode 't); eval: (setq tab-width 4) -*-
# Maintainer: Dominic Meiser [git at msrd0 dot de]
+# Package Information
pkgname=cargo-readme
pkgver=3.2.0
-pkgrel=2
+pkgrel=3
pkgdesc='A cargo subcommand to generate README.md content from doc comments'
arch=('x86_64')
-url='https://github.com/livioribeiro/cargo-readme/blob/master/README.md'
license=('Apache' 'MIT')
+
+# Generic Stuff for cargo packages
+url="https://crates.io/crates/$pkgname"
depends=('gcc-libs')
makedepends=('cargo')
-source=(
- "cargo-readme.tar.gz::https://crates.io/api/v1/crates/cargo-readme/$pkgver/download"
- "https://github.com/livioribeiro/cargo-readme/raw/a9f80759ec55717307d39cc98d3fd919b1fbe424/LICENSE-MIT"
-)
-sha512sums=('49fdfcde0913e330e4f79e56d41ff675e2a1b0d0e11b09d8b3db348e11fabe9024ec71eeef72465113e92aa49324b6d5ab5e7607e196d35730d4fe059feeb5e9'
- 'd3fa97aa6ca3da8246b20d0965c3f05d9640fe7a50d92d61e27a759ea4710df2af725aeb70df5bbcc5e4f0503db9f4f5f7ecbc2a332d3b73afd108ed7d1b86fc')
+source=("$pkgname.tar.gz::https://crates.io/api/v1/crates/$pkgname/$pkgver/download")
+sha512sums=('49fdfcde0913e330e4f79e56d41ff675e2a1b0d0e11b09d8b3db348e11fabe9024ec71eeef72465113e92aa49324b6d5ab5e7607e196d35730d4fe059feeb5e9')
build() {
- cd "$srcdir/cargo-readme-$pkgver"
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # crates.io packages aren't supposed to contain a Cargo.lock file so
+ # don't use --locked flag
cargo build --release
}
package() {
- cd "$srcdir/cargo-readme-$pkgver"
- install -Dm755 "target/release/cargo-readme" -t "$pkgdir/usr/bin"
- install -Dm644 "$srcdir/LICENSE-MIT" -t "$pkgdir/usr/share/licenses/$pkgname"
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # change this if the crate has other binaries as well!
+ install -Dm755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
+
+ # install whatever license files the distribution included
+ for file in $(ls | grep -i -e license -e copying -e copyring); do
+ install -Dm644 "$file" -t "$pkgdir/usr/share/licenses/$pkgname"
+ done
}