1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Maintainer: Caleb Maclennan <caleb@alerque.com>
3 # Contributor: AsamK <asamk@gmx.de>
8 pkgdesc="git commit --fixup, but automatic"
10 url="https://github.com/tummychow/git-absorb"
14 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/tummychow/git-absorb/archive/${pkgver}.tar.gz")
15 sha256sums=('6cc58d2ae50027a212811faa065623666ccb6e8bd933e801319aaf92b164aa0a')
18 cd "${pkgname}-${pkgver}"
19 LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo fetch --locked
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"
33 cd "${pkgname}-${pkgver}"
34 LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo test --frozen
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"