archrelease: copy trunk to community-any
[ArchLinux/community.git] / pueue / trunk / PKGBUILD
blobe5011637dcf1df55a9b0c416c210c5155ba651da
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Contributor: Arne Beer <privat@arne.beer>
4 pkgname=pueue
5 pkgver=3.1.2
6 pkgrel=2
7 pkgdesc="A CLI tool for managing long running shell commands"
8 arch=('x86_64')
9 url="https://github.com/nukesor/pueue"
10 license=('MIT')
11 depends=('gcc-libs')
12 makedepends=('cargo')
13 source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
14 sha256sums=('653eac9b7fc111cc4b9bddacbbf514932a8d273a059b20b1cc66af74e500eb5e')
16 prepare() {
17   cd "$pkgname-$pkgver"
18   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
19   mkdir -p utils/completions/
22 build() {
23   cd "$pkgname-$pkgver"
24   CFLAGS+=" -ffat-lto-objects"
25   cargo build --release --frozen
26   ./target/release/pueue completions bash utils/completions/
27   ./target/release/pueue completions fish utils/completions/
28   ./target/release/pueue completions zsh utils/completions/
29   cd utils/completions
30   sed -i 's/Pueue client/pueue/' pueue.bash _pueue
33 check() {
34   cd "$pkgname-$pkgver"
35   cargo test --frozen
38 package() {
39   cd "$pkgname-$pkgver"
41   # Install binaries
42   install -Dm755 "target/release/pueue" "$pkgdir/usr/bin/pueue"
43   install -Dm755 "target/release/pueued" "$pkgdir/usr/bin/pueued"
45   # Place systemd user service
46   install -Dm644 "utils/pueued.service" "$pkgdir/usr/lib/systemd/user/pueued.service"
48   # Install shell completions file
49   install -Dm644 "utils/completions/_pueue" "$pkgdir/usr/share/zsh/site-functions/_pueue"
50   install -Dm644 "utils/completions/pueue.bash" "$pkgdir/usr/share/bash-completion/completions/pueue.bash"
51   install -Dm644 "utils/completions/pueue.fish" "$pkgdir/usr/share/fish/completions/pueue.fish"
53   # Install License
54   install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/pueue/LICENSE"
57 # vim: ts=2 sw=2 et: