Date: Monday, July 4, 2022 @ 08:12:34 Author: grawlinson Revision: 1243878
addpkg: git-grab 1.0.0-1 Added: git-grab/ git-grab/repos/ git-grab/trunk/ git-grab/trunk/PKGBUILD ----------+ PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) Added: git-grab/trunk/PKGBUILD =================================================================== --- git-grab/trunk/PKGBUILD (rev 0) +++ git-grab/trunk/PKGBUILD 2022-07-04 08:12:34 UTC (rev 1243878) @@ -0,0 +1,56 @@ +# Maintainer: George Rawlinson <[email protected]> +# Contributor: Wesley Moore <[email protected]> + +pkgname=git-grab +pkgver=1.0.0 +pkgrel=1 +pkgdesc='A tool to clone git repositories to a standard location organised by domain and path' +arch=('x86_64') +url='https://github.com/wezm/git-grab' +license=('MIT' 'Apache') +depends=('git' 'gcc-libs') +makedepends=('rust') +options=('!lto') +_commit='43feb5be6564d25fc942690cf36e6abba24afca3' +source=("$pkgname::git+$url.git#commit=$_commit") +b2sums=('SKIP') + +pkgver() { + cd "$pkgname" + + git describe --tags | sed 's/^v//' +} + +prepare() { + cd "$pkgname" + + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +build() { + cd "$pkgname" + + cargo build --frozen --release --all-features +} + +check() { + cd "$pkgname" + + cargo test --frozen --all-features +} + +package() { + cd "$pkgname" + + # binary + install -vDm755 -t "$pkgdir/usr/bin" target/release/git-grab + + # documentation + install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE* + sed -n '/^Licence/,/^at your option./p' \ + README.md \ + > "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +}
