upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / mdbook-linkcheck / repos / community-x86_64 / PKGBUILD
blobd39a9facbbf3217687390ef5ca4aa35a05cc7d9e
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 pkgname=mdbook-linkcheck
4 pkgver=0.7.7
5 pkgrel=1
6 pkgdesc='A mdbook backend which will check all links in a document are valid'
7 arch=('x86_64')
8 url='https://github.com/Michael-F-Bryan/mdbook-linkcheck'
9 license=('MIT')
10 depends=('mdbook')
11 makedepends=('git' 'rust')
12 options=('!lto')
13 _commit='bed5ebbae325d41bdccec382ecbe30f795738ca2'
14 source=("$pkgname::git+$url.git#commit=$_commit")
15 b2sums=('SKIP')
17 pkgver() {
18   cd "$pkgname"
20   git describe --tags | sed 's/^v//'
23 prepare() {
24   cd "$pkgname"
26   # download dependencies
27   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
30 build() {
31   cd "$pkgname"
33   cargo build --frozen --release --all-features
36 check() {
37   cd "$pkgname"
39   cargo test --frozen --all-features
42 package() {
43   cd "$pkgname"
45   # binary
46   install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
48   # documentation
49   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
51   # license
52   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE