archrelease: copy trunk to community-any
[ArchLinux/community.git] / git-absorb / repos / community-x86_64 / PKGBUILD
blobd3039bdddd677933ef43ac53c84d6ee97d4f55ae
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: AsamK <asamk@gmx.de>
5 pkgname=git-absorb
6 pkgver=0.6.10
7 pkgrel=2
8 pkgdesc="git commit --fixup, but automatic"
9 arch=('x86_64')
10 url="https://github.com/tummychow/git-absorb"
11 license=('BSD')
12 depends=('libgit2')
13 makedepends=('cargo')
14 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/tummychow/git-absorb/archive/${pkgver}.tar.gz")
15 sha256sums=('6cc58d2ae50027a212811faa065623666ccb6e8bd933e801319aaf92b164aa0a')
17 prepare() {
18   cd "${pkgname}-${pkgver}"
19   LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo fetch --locked
20   mkdir completions/
23 build() {
24   cd "${pkgname}-${pkgver}"
25   CFLAGS+=" -ffat-lto-objects"
26   LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo build --release --frozen
27   "target/release/$pkgname" --gen-completions bash > "completions/$pkgname.bash"
28   "target/release/$pkgname" --gen-completions fish > "completions/$pkgname.fish"
29   "target/release/$pkgname" --gen-completions zsh > "completions/_$pkgname"
32 check() {
33   cd "${pkgname}-${pkgver}"
34   LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo test --frozen
37 package() {
38   cd "${pkgname}-${pkgver}"
39   install -Dm 755 target/release/"${pkgname}" -t "${pkgdir}/usr/bin/"
40   install -Dm 644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
41   install -Dm 644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
42   install -Dm 644 "Documentation/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
43   install -Dm 644 "completions/$pkgname.bash" "${pkgdir}/usr/share/bash-completion/completions/$pkgname"
44   install -Dm 644 "completions/$pkgname.fish" -t "${pkgdir}/usr/share/fish/vendor_completions.d"
45   install -Dm 644 "completions/_$pkgname" -t "${pkgdir}/usr/share/zsh/site-functions"
48 # vim: ts=2 sw=2 et: