upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / cargo-sort / repos / community-x86_64 / PKGBUILD
blob08271df56291f986398aa52c9c8559bd39324519
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
3 # Contributor: Dominic Meiser [git at msrd0 dot de]
5 pkgname=cargo-sort
6 pkgver=1.0.9
7 pkgrel=1
8 pkgdesc="Check if tables and items in a .toml file are lexically sorted"
9 arch=('x86_64')
10 url="https://github.com/DevinR528/cargo-sort"
11 license=('Apache' 'MIT')
12 depends=('gcc-libs')
13 makedepends=('rust')
14 source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
15 sha512sums=('c86a30e4684e5a405524117b52cbe91d975e642b4b668fb3be3036ad832f85fb87921c50884b182bde29f76d0af392a0e365dc3bdb662954adc07c9dfa2342dc')
16 b2sums=('8e124653d2feecb1400bcfdbb1e9037eb73b3ef6a5393ca08a9d22352a9c8c5712f49628734ca757b58b4f2e5760c37054ea9c1b6d7ef67bf907b22eb1193ffd')
18 prepare() {
19   cd "$pkgname-$pkgver"
21   # download dependencies
22   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
25 build() {
26   cd "$pkgname-$pkgver"
27   cargo build --release --frozen
30 check() {
31   cd "$pkgname-$pkgver"
32   cargo test --frozen
35 package() {
36   cd "$pkgname-$pkgver"
38   # binary
39   install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
41   # licenses
42   install -vd "$pkgdir/usr/share/licenses/$pkgname"
43   sed -n '/^####.*$/,/^<\/sub>$/p' README.md \
44     > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
46   # documentation
47   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
48   cp -vr examp "$pkgdir/usr/share/doc/$pkgname/examples"