upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / git-grab / trunk / PKGBUILD
bloba9872a98cf94e7cf6ead7ecb7be76d5673a2bfd2
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
2 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
3 # Contributor: Wesley Moore <wes@wezm.net>
5 pkgname=git-grab
6 pkgver=1.0.1
7 pkgrel=1
8 pkgdesc='A tool to clone git repositories to a standard location organised by domain and path'
9 arch=('x86_64')
10 url='https://github.com/wezm/git-grab'
11 license=('MIT' 'Apache')
12 depends=('git' 'gcc-libs')
13 makedepends=('rust')
14 options=('!lto')
15 _commit='ae0fb16048691b9b26f8b28efa95087a9654b62f'
16 source=("$pkgname::git+$url.git#commit=$_commit")
17 b2sums=('SKIP')
19 pkgver() {
20   cd "$pkgname"
22   git describe --tags | sed 's/^v//'
25 prepare() {
26   cd "$pkgname"
28   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
31 build() {
32   cd "$pkgname"
34   cargo build --frozen --release --all-features
37 check() {
38   cd "$pkgname"
40   cargo test --frozen --all-features
43 package() {
44   cd "$pkgname"
46   # binary
47   install -vDm755 -t "$pkgdir/usr/bin" target/release/git-grab
49   # documentation
50   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
52   # license
53   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
54   sed -n '/^Licence/,/^at your option./p' \
55     README.md \
56     > "$pkgdir/usr/share/licenses/$pkgname/LICENSE"